A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: ActionScript Gurus: Please help, very weird problem

  1. #1
    Member
    Join Date
    Jul 2003
    Location
    california
    Posts
    36

    ActionScript Gurus: Please help, very weird problem

    I have been trying to fix this for about 8 hours now, and if I look at this any more I am seriously going to go crazy. Please help.

    Site: www.berkeleyscion.com

    I have a flash navigation bar that gets variables from a URL (via ASP, flash.swf?url=blah method. The movie gets a variable in the first frame on the timeline, and then forwards the movie to the appropriate frame_label on the same timeline. Easy as pie? Not quite.

    In theory, by clicking the "Financing" button, the page should load and the bar should display the sub-menu items under the Financing section. However, for some reason, the menu ALWAYS goes to the "New Vehicles" submenu, regardless of the main/sub menu component that you click on. Here is the kicker: in order to have the correct submenu display, I have to click on each button twice/reload the page, and the menu displays properly.

    The movie and page are definitely getting the variables, as the appropirate content is loaded, and the correct sub-menu item in the flash navigation bar is highlighted. However, the movie does not react to that variable the first time the page is loaded, but displays the correct segment when the page is loaded again/refreshed.

    Could someone please take a look at this for me? You can download the file here:

    www.berkeleyscion.com/navbar.zip

    TIA

  2. #2
    Senior Member
    Join Date
    Jul 2001
    Posts
    354
    Hmmm, Im not haveing anyproblems at all with it. Click finance and goes to the finance page with other button on financing to click on.

  3. #3
    Registered User
    Join Date
    Feb 2001
    Posts
    13,041
    Hi,

    when the movie is loaded and gets a chance to see the goto variable, the relevant section of the movie may not have loaded (even if the movie loads from cache)
    So it might be an idea to include an internal "preloader"

    Musicman

  4. #4
    Member
    Join Date
    Jul 2003
    Location
    california
    Posts
    36
    What I mean is this:

    1. Close all browswer windows
    2. Go to www.berkeleyscion.com
    3. Mouseover "Service", and when the sub-link menu appears, click on "Hours and Locations"
    4. Page loads
    5. The "New Vehicles" submenu appears instead of the Parts submenu.
    6. Refresh the page
    7. The links are now in the right place, the "Parts" submenu is displayed, and the "Hours & Locations" button is highlighted.

    Why does it have to be loaded twice to work properly??

    I was able to replicate this problem on about 5 different computers, 3 operating systems and 6 browsers at this point, so I know that the problem is there.

    Any ideas?

  5. #5
    Member
    Join Date
    Jul 2003
    Location
    california
    Posts
    36
    Musicman: good point, I will try it out tonight. Should have had one in there anyway.

    However, I am not so sure if it will help, and here is why. The actionscript that determines what vars to load and which frame to go to resides in the very first frame on the timeline. Once the variables are determined in an "If" statement, it simply tells the movie to go and play a frame label according to the variables it loaded. The only thing that is being loaded is the "background" movie (i.e. the images of vehicles), and the buttons/submenus are placed on the movie from the start.

    Moreover, the first frame tells the movie to jump to a frame label based on a variable from the URL. So, theoretically, it should not just move to the "New Vehicles" frame label, but go to the correct frame label instead and load that sub-menu?

    I am seriously losing my mind here.

  6. #6
    Registered User
    Join Date
    Feb 2001
    Posts
    13,041
    Hi,

    if it wants to go to frame "finance", and that frame is not yet loaded, it should just wait a bit.
    You do not really need to add a visible preloader - it should be sufficient to stop the movie on the first frame and goto the target only after enough of the movie has loaded.
    If there is any swf / variables loading going on, make sure that these can proceed while you are waiting

    Musicman

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center