A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Getting Information from object/embed tags

  1. #1
    Junior Member
    Join Date
    Mar 2004
    Location
    Austin, TX
    Posts
    9

    Getting Information from object/embed tags

    This is probably a major softball, but I can't find it.

    I want to pass information into a swf in the object, embed tags, like this:
    Code:
    <object blah blah>
    <param name="movie" value="theMovie.swf?variable1=1&variable2=2">
    <embed src="theMovie.swf?variable1=1&variable2=2">
    How do I get that information out of the src for the swf?

  2. #2
    Monkey Moderator Lexicon's Avatar
    Join Date
    Jul 2001
    Location
    UK
    Posts
    2,038
    these variables will just be placed in the root.

    so in the movie you can access these with

    _root.variable1

    e.g.

    trace(_root.variable1);

    and you only need to put these variables in the param tag (not the embed tag), to save you writing twice

    <param name="movie" value="theMovie.swf?variable1=1&variable2=2">
    www.lexicon-design.co.uk
    If we aren't supposed to eat animals, then why are they made of meat?
    If Vegetarians like animals so much, why do they eat all their food?

  3. #3
    Junior Member
    Join Date
    Mar 2004
    Location
    Austin, TX
    Posts
    9
    and you only need to put these variables in the param tag (not the embed tag), to save you writing twice
    Are you sure that isn't browser-specific? I could have sworn that we tested that once (with a swf by a friend who is much more versed in Flash programming than I am).

  4. #4
    FK Slacker
    Join Date
    Jun 2000
    Location
    vancouver
    Posts
    3,208
    From this Macromedia tech note:

    http://www.macromedia.com/support/fl...tm#querystring

    Note: Multiple variables can be passed with this syntax: "movie.swf?variable1=value1&variable2=value2". The value must be assigned in both the OBJECT and EMBED tags for this method to work in all browsers.

    K.

  5. #5
    Monkey Moderator Lexicon's Avatar
    Join Date
    Jul 2001
    Location
    UK
    Posts
    2,038
    ok my bad, thanks for the info
    www.lexicon-design.co.uk
    If we aren't supposed to eat animals, then why are they made of meat?
    If Vegetarians like animals so much, why do they eat all their food?

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