Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Placing varible in HTML which tells Flash to goto a specific frame?

  • 25-11-2004 9:44pm
    #1
    Closed Accounts Posts: 606 ✭✭✭


    Hi there,

    I'm trying to tell a Flash movie to go to a specific frame from a HTML file.

    I'm trying to do is:
    So the HTML page will load & flash will sees a variable in the HTML & jumps to frame (then the swf going to load a specific movie)

    Has anyone done this?


Comments

  • Registered Users, Registered Users 2 Posts: 2,647 ✭✭✭impr0v


    You can embed variable values in the html for the page which holds the movie, using Flashvars, and then set up some actionscript to check for this variable and perform an action accord to the value.

    Check here for a guide to using flashvars. Note that they need to be included twice in the html, once on the 'EMBED' tag, and once as part of the 'OBJECT' tag to cater for different browsers. They will also only work with flashplayer 6 and up, and may not work on all browsers.

    If you want the movie to go to a specific frame, why not put a gotoAndPlay() action on the first frame of the movie?


  • Closed Accounts Posts: 606 ✭✭✭pencil


    cheers impr0v

    That's what I'm looking for.

    gotoAndPlay() is no good to me - I have a movie that plays on the index page is then cached. On the second page I want to jumb past the 'into animation' bit in this first swf & on to a frame that loads a second swf in.

    thanks again.


  • Closed Accounts Posts: 606 ✭✭✭pencil


    Hey impr0v,

    In my HTML I have set:
    <param name="FlashVars" value="var1=about">

    I can get the variable "about" into to the swf from the HTML as suggested by the article you posted. I can display the variable in the swf - all ok.

    I wan to use this variable to send the movie to a frame called "about_frame".
    So I'm trying:

    if (var1=about) {
    gotoAndPlay("about_frame");
    }


    But its not working - how do I do this, were var1 is about, goto frame "about_frame".

    Cheers


  • Registered Users, Registered Users 2 Posts: 2,647 ✭✭✭impr0v


    you need another '=' sign:
    if (var1==about) {
    gotoAndPlay("about_frame");
    }
    


  • Closed Accounts Posts: 606 ✭✭✭pencil


    line1_txt.text=var1;

    if (var1==about) {
    gotoAndPlay("about_frame");
    }

    na, not working - the variable is definity making it in because I can display it in a dynamic text item.

    But it won't jump to that frame label. R U sure thats the correct Actionscript?


  • Advertisement
  • Closed Accounts Posts: 606 ✭✭✭pencil


    sh1te don't know whats going wrong, even this won't work & the frame label is defined.

    test = "12345";
    if (test == 12345) {
    gotoAndPlay("about-frame");
    }


    This is placed on the first frame on the top row


  • Registered Users, Registered Users 2 Posts: 2,647 ✭✭✭impr0v


    Make sure the frame label is the exact same as the gotoAndPlay label, about_frame or about-frame.

    Also, you'll need quotation marks around the 12345 in your if condition as you've defined it as a string.
    test="12345";
    if (test == "12345"){
    gotoAndPlay("about_frame");
    }
    


Advertisement