Print Reseller Scheme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Text from url into flash files

Discussion in 'Website Design Forum:' started by tbwcf, Sep 29, 2009.

  1. tbwcf

    tbwcf Active Member

    Hi All,

    Does anyone know how to pull text from a url into a swf file on a webpage basically like how you would pass info from one web form page to another using javascript.

    So your url might be

    Then somewhere in your swf file you would have the field / element with id=name which would display the text "Dave" pulled in from the url....

    I'm in the process of working it out but if anyone can speed up the process it would be appreciated!

    Let me know if I'm unclear and I'll try to explain

    Thanks in advance

  2. If you can get the text go dynamically go to a text file then it can be done by dynamic text from Flash to load from that txt file Andy.. I will have a look through my old Flash books for more info :)
  3. CSparkes

    CSparkes Senior Member

    Theres a couple of ways of doing it.

    For example Filename would be got from the url by php etc......

    If using objext to display flash have this in html
    <param name="FlashVars" value="xmlFilename=FILENAME" />

    Then in actionscript, off top of head something like _root. xmlFilename That bit is case sensitive.
  4. tbwcf

    tbwcf Active Member

    hmmm... thanks guys I really need it to work from the url... effectively like this IS GASH Walmart Generator

    I've just come out a meeting so gonna get back on it, if/when I get it sorted I'll let you know
  5. tbwcf

    tbwcf Active Member

  6. CSparkes

    CSparkes Senior Member

    Ok, dont know how to grab for PHP but coldfusion would be like

    <cfoutput><param name="FlashVars" value="" /> </cfoutput>

    Then in flash actionscript have = ( _root. urlName);
  7. darren

    darren Member

    As mentioend by CSparkes, you need to use FlashVars;

    Using FlashVars to pass variables to a SWF

    That page you linked too is not working from the URL, what is actually happening is that the ASP is reading the URL and variables and writing them into the flash tags... if you look at the source you can see this...

    That is where flash is reading it from.
  8. darren

    darren Member

    for php it would be

  9. tbwcf

    tbwcf Active Member

    Hi Darren yeah that's pretty much it, it does pull info from the url then adds to the end of the swf?=etcetc from the looks it can be done with php javascript or whatever takes your fancy I'm gonna get jiggy with it this morning
  10. darren

    darren Member

    Javascript is messy and client side. Unless you need to allow the user external control (for e.g. buttons outside of the flash, like on the webpage to change the flash video) then stay away :)

    PHP/ASP etc are all server side and much cleaner. As you can see from my example PHP code or CSparkes example ColdFusion it is very little code that is needed.

    If you have any problems and need some code. Just shout :)

Share This Page