You should look at the loadvars object. It is much more robust and gives you proper event listening / error checking etc.
http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00002336.html Aran On Fri, Jun 19, 2009 at 11:41 AM, Lukeidiot <[email protected]> wrote: > > Yes, I successfully get the values into a textbox thats on my flash > doc, but when I try to pass the var through geturl, it returns > undefined. > > On Jun 18, 9:27 pm, Aran Rhee <[email protected]> wrote: > > Luke. > > > > SWFObject has built in ultility methods to grab variables from the url: > > > > http://code.google.com/p/swfobject/wiki/api > > > > swfobject.getQueryParamValue(paramStr) > > > > example: > > > > var flashvars = {}; > > if (swfobject.getQueryParamValue("foo") && > > swfobject.getQueryParamValue("abc")) { > > flashvars.foo = swfobject.getQueryParamValue("foo"); > > flashvars.abc = swfobject.getQueryParamValue("abc");} > > > > var params = {}; > > var attributes = {}; > > swfobject.embedSWF("myContent.swf", "altContent", "800", "600", > > "9.0.0","expressInstall.swf", flashvars, params, attributes); > > > > test page: > http://www.bobbyvandersluis.com/swfobject/testsuite_2_2/test_api_getq... > > > > In regards to posting the vars up to PHP, this is not a SWFobject issue, > but > > a general Flash one (and would be better handled on a general Flash > forum). > > Basically you can send via: > > > > - getURL > > - loadvars > > etc > > > > basically all flashvar values are availabe as _root level vars. You can > do > > whatever you want to with these values once in Flash. > > > > Aran > > > > On Fri, Jun 19, 2009 at 12:34 AM, Lukeidiot <[email protected]> wrote: > > > > > AIM: Bom33 > > > MSN: [email protected] > > > > > If you have any further questions. > > > > > On Jun 18, 10:15 am, Lukeidiot <[email protected]> wrote: > > > > Basically I am trying to get data from a url var to flash (which I > > > > have done succesfully), then I am trying to pass this variable to php > > > > using get/post, which I always end up with "undefined", I have > another > > > > textbox, that I send data to another php file just fine, so its not > > > > that I am doing it wrong, as I have 1 working method... (diagram) > > > > > > Url Var -> Flash -> process.php (undefined) textfield 1 > > > > Flash -> process.php (working) textfield 2 > > > > > > well, i am retrieving data from a url var "?id=test", and I am trying > > > > to use that var to send with the form process to an email, it showed > > > > correctly on the flash applet, but when i try to send it via GET it > > > > says undefined > > > > > > The tutorial I used: > > >http://redirectingat.com/?id=474X833&url=http%3A//blog.guya.net/2006/. > .. > > > > > > An example: > > >http://redirectingat.com/?id=474X833&url=http%3A//blog.guya.net/wp-co. > .. > > > > (Note: I am trying to get the displayed vars, to send with post/get > > > > data, once they are received) > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "SWFObject" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/swfobject?hl=en -~----------~----~----~----~------~----~------~--~---
