×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Sep 2009
    Posts
    4

    Question First focused button nudges the stage upwards?

    Hi,

    I'm testing a Flash Lite (3+) application in full screen on a Nokia E71.

    I have a list of various sized movieclips on a page (scrollable page, I've built my own UI).

    These movieclips are acting as buttons (triggered by "onPress" functions).

    I have a scrollbar anchored to the right side of the page, showing how much content sits below the fold. This scrollbar's track height is set to the stage's height, so it'll always fit snug from top to bottom on the right side of the page.

    If the first button hangs over, or sits below the fold, Flash Lite nudges my whole content up to show that button clearly when it's focused for the first time.

    But no "_y" postion data seems to have changed for me to programatically nudge it back again.

    It's like the _root of the Flash Lite movie has had it's _y position nudged upwards by the difference between the fullscreen screen height and the regular (with soft key and title bar) screen height.



    Any ideas what's going on, and how I can override it?

    Cheers,

    - James.

  2. #2
    Nokia Developer Champion
    Join Date
    Jul 2008
    Location
    Pakistan
    Posts
    1,065

    Smile Re: First focused button nudges the stage upwards?

    What is the resolution of ur swf file? Is your swf resolution is 320x240 for e71 ? Stage.height returns the height of the swf file by default because Stage scaling is set to showAll (by default).May be this is the issue in ur case.So, just set ur Stage to noScale by this AS:
    Code:
    Stage.scale = "noScale";
    But remember, it is always good to make place holder (movie clip) for your flash component , so it can be used with any resolution (& can be placed anywhere) and can easily take the properties of movie clip by simple actionscript i.e
    Code:
    my_placeholder.height = my_component_scrollbar.height; 
     my_placeholder._y = my_component_scrollbar._y;
    . Hope it helps u.

    Best Regards,
    SajiSoft

  3. #3
    Registered User
    Join Date
    Sep 2009
    Posts
    4

    Question Re: First focused button nudges the stage upwards?

    Hi SajiSoft - thanks for your reply.

    First, a little bit about myself. I've been designing and developing in Flash for 10 years, and this is my first foray into Flash for mobile. I also recently signed up as a "Forum Nokia Pro" member. I'm packaging my Flash Lite app for distribution with (the now *unsupported*) "Adobe Mobile Packager".

    What I'm trying to achieve here is a single app that works across every resolution, so the dimensions of the FLA (240x320) are really irrelevant. I'm testing in the real world on a Nokia E71 (more in the future), and in Adobe Device Central on many different phones (Nokia 5800, Nokia N95, etc) at many different resolutions (360x640, 240x320, etc).

    I've set "Stage.scaleMode" to "noScale";

    I've set "FullScreen" to "true" via fscommand2.

    Each screen in the application lays itself out dynamically when it's loaded. Originally, I was using "Stage.width" and "Stage.height" as width and height values for my dynamic layouts, but there were discrepancies across the different phones (I'm guessing this is because I'm running at fullscreen with "scaleMode" set to "noScale"). So I'm now using "System.capabilities.screenResolutionX" and "System.capabilities.screenResolutionY" as my width and height values, and my dynamic layouts are now accurate.

    The problem is...

    If the first button on one of my screens overhangs or sits below the fold of the mobile screen, the first time it is focused (by using "Selection.setFocus" on page load, or by pressing the "down" directional button on a mobile phone), the entire flash movie (like, everything on the screen), nudges *upwards*. But the _y value of _root is "0"! As in, I have no way to nudge it back downwards.

    a) Can someone explain to me the changing of focus of buttons in Flash Lite using the directional keys?
    b) Anyone have any ideas on this "nudging" thing?

    This only seems to be happening on the E71 (real and Device Central), and the "Flash Lite 3.1 32 320x240" in Device Central.

    Kind regards,

    - James.

  4. #4
    Registered User
    Join Date
    Nov 2009
    Posts
    12

    Re: First focused button nudges the stage upwards?

    I had that problem and there are three solutions I’m aware of
    Option 1.The simplest is to change the stage size so it is smaller than the screen of the phone you’re running it on. In cs3/4 got to the Stage’s properties menu and change the Stage’s default width and height to 50. This is the easiest fix.
    Option 2. Make sure none of the buttons are too near the screen’s edge.
    Option 3. Disable the auto tabing (for each button do .tabEnabled = false;) then use key events to manually change between buttons.

  5. #5
    Registered User
    Join Date
    Sep 2009
    Posts
    4

    Thumbs up Re: First focused button nudges the stage upwards?

    Hi fp_david - thanks for your reply.

    You, my cyberfriend, are a lifesaver.

    Option 1.The simplest is to change the stage size so it is smaller than the screen of the phone you’re running it on. In cs3/4 got to the Stage’s properties menu and change the Stage’s default width and height to 50. This is the easiest fix.
    "Option 1" worked perfectly.

    Thankyou.

    - James.

Similar Threads

  1. [moved] Q: How to change toolbar button text
    By bartbiemond in forum Symbian User Interface
    Replies: 1
    Last Post: 2009-10-22, 14:37
  2. how about create a button it support the repeat event?
    By 42452938@qq.com in forum Symbian C++
    Replies: 7
    Last Post: 2009-08-25, 08:21
  3. Add a control (e.g. button) programmatically
    By ViRuSTriNiTy in forum Symbian User Interface
    Replies: 2
    Last Post: 2008-01-02, 21:05
  4. How to handle events (e.g. button click)
    By ViRuSTriNiTy in forum Symbian User Interface
    Replies: 2
    Last Post: 2008-01-02, 14:12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •