ActionScript 2.0 :: Passing Variables Via Query String?
Mar 21, 2007
i am trying to load different xml that get generated through .net when I am trying to pass varibels i am getting undefined. Can someone give me a heads up on what i might be doing wrong. from what I have read and learned I can pull via-
I am trying to pass the variable myMOV to my flash using the following additions in my object tag:[code]I want flash to gotoandplay the label "music" but it seems I am not passing the variable correctly.
I need to be able to pass some variables FROM flash and append it to the end of my address. I assumed that if I used LoadVars, I can append the vars to the end of the string like this:
ActionScript Code: send_btn.onRelease = function () { var my_lv:LoadVars = new LoadVars();
How you pass a query string using the AC_FL_RunContent? in the old days you would do something like move.swf?isOn=something;How is that done today using the AC_FL_RunContent.
my Problem is that i want to load a external swf in the main swf main by passing Querystring from flash cs4(AS3) and get variables from html page...... but Not working Iam attaching the fla files folder
I hope someone can help me with my dilemma. I have built a video player in ActionScript 3.0 which consists of a FLA file which has the video player on it and a separate AS file that contains all my ActionScript 3.0 code for the video player. I have moves (FLV & MP4 files) stored on my Flash Media Server 3.0 server. If I hard code the name of the movie in the AS file and publish the FLA file, it creates an SWF file that will actually play the movie on the FMS3 server. That lets me know the video player works.
I want to pass a variable to my Flash .swf file through a query string.In my Flash movie I have an animation of 2 goats fighting, I want the query string to tell the movie to skip to the end of the movie if variable goats==attacked. I used the following ActionScript:[code]The problem is that no matter whether I attach the query string goats=attacked at the end of the html address or not the movie never skips to the end.
I need to read the variables from a URL:[url]....I tried all sorts of info from google and i coudn't make it work.I'm interested in the option when i don't need to do any modifications to the html file, but just do all the coding in flash.I found several examples that are using ExternalInterface and could not make any single one of them work.
I've been searching ferociously and can't seem to find a solution that works for me. I am trying to pass variables via query string on a PHP page to Flash, and then have the swf add movie clips to the stage depending on the information it receives. Here is what the PHP outputs:
I'm developing a web training application that must interact with a SQL database. I'm using ASPX pages with VB code-behind to transfer data in- and out-of the flash file.I've got my data coming into the flash file just fine. I used the ASPX VB code below to send data to flash on a page called Send.aspx (I realize this is not hooked up to my database, but I thought I'd test the concept first):
Code: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Is there a standard way to send variables through a banner ad? A client wants a banner that lets the user enter his mobile number, then receives a code by sms, and then enters the code into the banner. If the code then validates, the user is sent to a page with a login form with the phone number and code filled in. It must be possible to add the phone number and code as parameters to the clickTag somehow? I found that Adform supports using ";cppar=1&" and then variable=value pairs, but is this a standard, or a special feature of Adform?
We have implemented a Flash photo slideshow on our site and it works just fine for most of our users. Whenever the xml.load(success) returns false I have the Flash email me a debug report. For the life of me I can not find a common thread between all of these people having problems with the Flash. I don't think it's a cross-domain issue because it works for most people, and I have the crossdomain.xml files where they should be.
I'm trying to design an interface that to simplify the construction of a string. Here's an example: My output (using the getURL command) needs to be in the form of: http:[url].....
I'm able to define variables for x, y, and z, however I am unable to figure out how to substitute the defined values for those variables into the string when it is time to send it.
I'm trying to design an interface that to simplify the construction of a string. Here's an example: My output (using the getURL command) needs to be in the form of: [URL] I'm able to define variables for x, y, and z, however I am unable to figure out how to substitute the defined values for those variables into the string when it is time to send it.
Error: Error #2101: The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs. at Error$/throwError() at flash.net::URLVariables/decode() at flash.net::URLVariables() at flash.net::URLLoader/onComplete()
Error: Error #2101: The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs. at Error$/throwError() at flash.net::URLVariables/decode() at flash.net::URLVariables() at flash.net::URLLoader/onComplete() _____________________________________________________________________ ________________________________ stop(); var DepartVars:URLVariables = new URLVariables(); var DepartURL:URLRequest = new
Error: Error #2101: The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs.
[Code]...
I'm not where error exactly the error happen so I post the whole thing. As far I know bottom code that relate to send_loc.php works fine, get_loc.php is having a problem. The output from get_loc.php is
I normally send vars to php and build my query there, but this time I need to pass a complete query from Flash to PHP, but I'm having a little trouble:
I'm having to work on some old AS2 stuff and my AS2 brain is sadly atrophied.
ActionScript Code: on (press) { arrivaldate = day.text+" "+month.text; //trace(arrivaldate);
[code]....
Is working fine, passing all the variables into the URL. The question is... why? I can't see any mechanism whereby getURL is given all the variables defined above. Does it pass in all local vars by default?
I've looked up quite a few tutorials, how-to's, etc. on how to pass a query string into my SWF, but it isn't working. The page where the SWF resides is an ASPX page, and this is the code I used:
As you can see, it pulls the "ProjID" querystring and is supposed to pass it into Flash. I have executed the page and viewed the source to make sure it is pulling the querystring appropriately, as shown below: Code: Select all<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="[URL]" width="756" height="433" id="gallery" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="allowFullScreen" value="false" /> <param name="movie" value="gallery.swf?ProjID=1" /> [Code] .....
I used "1" for the value, and "1" was what is in the page source, so I know it's at least getting that far. As for what is in the ActionScript, here it is: Code: Select allvar myProj = root.loaderInfo.parameters.ProjID; var myGalleryXML2 = new XML(); myGalleryXML2.ignoreWhite = true; myGalleryXML2.load("[URL]"+myProj); myGalleryXML2.onLoad = function(success) { if(success){ _root.myImages = myGalleryXML2.firstChild.childNodes; _root.myImagesTotal = myImages.length;
It is supposed to load XML from an ASPX page that builds the XML from a database depending on the project ID (ProjID). If I hardcode the variable to "1" (or whatever other ProjID), it works and the correct images are shown for the respective ID. However, I can not get it to pass the ID from the URL to the Flash file. I've even tried "_root.ProjID", and a QueryString class I found through Google, as well as passing the ProjID through Param tags as FlashVars with no luck.