A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Can you say: EMBED src="movie.swf?var=somthing"

  1. #1
    Member
    Join Date
    Jan 2002
    Location
    Dallas, TX
    Posts
    47
    I am wondering if you can pass variables through the "querystring" that embeds a SWF. If so, how do you get at this variable inside the movie?

    Thanks,
    John

  2. #2
    NerdInside's Avatar
    Join Date
    May 2001
    Location
    Penguin Island
    Posts
    3,439
    movie.swf?var=somthing

    That does it. If var was the variable for a textbox, that text box would then say something (or whatever is after the = ). You can also use multiple vars like so:

    movie.swf?var=somthing&var2=something else

    And they don't have to be var. They can be any variable at all.

  3. #3
    Junior Member
    Join Date
    May 2002
    Posts
    13
    How are these variables referenced in Actionscript in the SWF?

    Thx for the help!

    Stace

  4. #4
    Senior Member
    Join Date
    May 2002
    Posts
    248
    They're referenced exactly the way they're called in the HTML, and they live in the _root timeline. Using the example given by NerdInside, you can access the variables as _root.var and _root.var.

    -Dan

  5. #5
    Junior Member
    Join Date
    May 2002
    Posts
    13
    So if I've got this within the OBJECT tag:

    < PARAM NAME="uuid" VALUE="26e334c1-77ea-43ce-aac3-d652cc8ca368" >

    I can reference this by saying

    _root.uuid ?

    Thanks!

  6. #6
    Senior Member
    Join Date
    May 2002
    Posts
    248
    No, I don't think you can do that. But one of the PARAMS will = the movie's name.swf. You can attach the variables there like NerdInside did.

    -Dan

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