#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2003
    Posts
    4
    Rep Power
    0

    Angry passing variables!!!


    i have a link from a flahs movie to an html page which loads in the same window....when a link in the page returns the user to the flash movie (the homepage) i would like to skip certain parts of the movie by the use os say a flag variable that gets passed to the movie....is there anyway i can do this in javascript fro instance okay thanks for your help!!!
  2. #2
  3. No Profile Picture
    flash junkie
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2003
    Location
    CO, USA
    Posts
    172
    Rep Power
    12
    hey,

    whatever name you give your flash movie wheny ou embed it, you can pass variables by referring to that name. But it won't work on a mac. Another method would be to have javascript write the actual embed and object tags, flag a javascript variable and then have javascript write a variable into the .swf by appending the src attribute like:

    src=mymovie.swf?alreadyseen=true

    then have your flash movie looking for that. If the javascript variable that tells you if they've seen the page already isn't there, you can just embed it like you always do. You could pass these variables by having a hidden frame or something.

    make sense?

    bret
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2003
    Posts
    4
    Rep Power
    0

    thanks!!!


    hey bret,

    thanks a lot for the speedy reply...the whole passing by appending to a url suddenly seemed really obvious to me....i don't even need to use javascript...just two html files with different values passed for the different states of the movie....now to see if i can get it working!
  6. #4
  7. No Profile Picture
    flash junkie
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2003
    Location
    CO, USA
    Posts
    172
    Rep Power
    12
    right, that would work, but only if they use a link to go back to your page. If they hit the back button, they will be taken to the page without the appended url... at least i think that's how it would work... well, good luck anyway

    bret
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2003
    Location
    Provo
    Posts
    36
    Rep Power
    12
    You'll probably also want to look into FlashVars:

    http://www.macromedia.com/support/fl.../flashvars.htm

IMN logo majestic logo threadwatch logo seochat tools logo