dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Get vs. Post

  1. #1
    Member
    Join Date
    Jun 2003
    Posts
    30

    Get vs. Post

    I'm working on a project which is due friday, please need help.!!!!!

    I have a form in html and would like to send the variable to a flash file. I've been trying to do it using loadvariables in flash but nothing happens. How do i do it?

    If anyone could give me a hand I'd really appreciate it.

    T.

  2. #2
    graphic designer
    Join Date
    Aug 2002
    Location
    Brazil
    Posts
    112
    Send with GET to your html page...
    in it, you need to pass the query string variables to flash like

    flashfile.swf?var1=value1&var2=value2...

    these variables will be loaded in _root

    for this, you need to write a javascript to insert document.location.search after filename.swf like this:

    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=6,0,0,0" width="760" height="460" id="index2" align="middle">\n'+
    '<param name="allowScriptAccess" value="sameDomain" />\n'+
    '<param name="movie" value="index2.swf'+document.location.search+'" />\n'+
    '<param name="quality" value="high" />\n'+
    '<param name="bgcolor" value="#000000" />\n'+
    '<embed src="index2.swf"'+document.location.search+'" quality="high" bgcolor="#000000" width="760" height="460" name="index2" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"/>\n'+
    '</object>');
    //-->
    </script>
    I broked my head with it last week, but it is working now!

    Good luck.
    |calve|brazil|

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