A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Query String in Flash

  1. #1

    Query String in Flash

    I have a dynamic text field and the variable name for it is "name". I want to change this text field using query string.

    I have two pages.
    1) Where there is a link to the flash page called "Click here"

    2) The second page is flash html page and the name of the page is "hello.html".

    Both the files are in the same folder and I am using the following code as a hyperlink with "Click here".

    <a href="hello.html?name=John">Click here</a>

    I want the name field to print "John" but it does not work.

    Please help

  2. #2
    Senior Member sprout74's Avatar
    Join Date
    Oct 2000
    Posts
    134
    You need to create the querry string in the Object/Embed tags for the Flash Object.

    see mm tutorialon how to pass variables to a movie.

    You will need to use a scripting language to write the querry string into the HTML tags that then pass the values to the Flahs movie.

    good luck,

    sprout
    "If the implementation is hard to explain, it's a bad idea.
    If the implementation is easy to explain, it may be a good idea."
    from The Zen of Python (by Tim Peters)

  3. #3
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    The reason it does not qork is its embedded in html, calling a swf will work though.

    Embed the recieving swf in some javascript embed code and it will work with the html too ( the textfield has to be in the main timeline ).

    PHP Code:
    <script language="JavaScript">
    document.write ('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '
    +'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" '
    +'WIDTH=750 HEIGHT=500> <PARAM NAME=movie VALUE="knock.swf'+document.location.search+'">'
    +'<PARAM NAME=quality VALUE=high>'
    +'<EMBED src="knock.swf' +document.location.search+'" ' 
    +'quality=high  WIDTH=750 HEIGHT=500 '
    +'TYPE="application/x-shockwave-flash"></EMBED></OBJECT>')
    </
    script

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

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