ActionScript 2.0 :: Making Banner - Var From URL String Query
Jun 9, 2009
I'm working on making a banner that sends some informations to a Url
Like this
Code: Select allbmi.aspx?hojde=2&kon=male&alder=4&vaegt=45
The itself is working like a dream, but now I want it to be more userfriendly. I want the banner to check if ex. the var from the query string "hojde" exist if so then pt this value in the text field for "hojde". If it doesn't exist then set a standard value of 100. For now I've worked only on the "hojde" var, so that's where you should look
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?
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 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();
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.
I have a form that sends data to a results page. I would like the results to manipulate a SWF file through the actionscripts.
EXAMPLE: Form uses 3 radio button submissions. Upon SUBMIT it sends data to results page creating a string seen below Results page receives data (form_record.php?Q1=Q1D&Q2=Q2D&Q3=Q3A) Results page houses SWF SWF uses the string to control the action of the Flash.
Can be a simple as if "Q1=Q1D&Q2=Q2D&Q3=Q3A" is recognized it does a gotoAndPlay
Im building this AIR app on Flash CS5, and I have this TileList that loads its data (images and names) from a database. I want to do a query with the name any item of the Tilelist when its clicked, so i need to send the name of that item to a PHP file that will execute the query. I am thinking of a function that loads the item name to a variable when the item is clicked. How can I send it to the PHP file and how would I load it to the query? The query I want on the php file goes something like this: Select lat, lon from mapdata where name=theVariable;
When we reference a SWF file from our ASP.NET page we append the version number to the SWF url, like App.swf?1.1.0.0. In a recent update, Firefox has continued to use a cached swf even when the version number changed, App.swf?1.2.0.0. We haven't noticed this behavior in other browsers.
Has anyone else seen this behavior? We don't want to disable caching completely. At this point we're probably going to change the name of the swf for each version, like App.1.2.0.0.swf, which seems a bit excessive.
how I could remove anything after a prefix in this string... [URL] so need to end up with [URL] The query string may change so need a way of telling it to remove anything after .flv
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.
this seems like it should be simple but for some reason i can't figure out how to get the value of a variable out of a URL query string. if this is in my location bar: [URL] and i just want the value of "chosenCLIP" to use in my loaded SWF file, how do i do it in AS3?
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 have been reading this page about passing a query string to a flash file and I have it all set up using Javascript.URL...My next question that the page doesnt seem to cover is how do you then get flash to manipulate the data from the query string?So say I pass example.swf?testtype=1, I want flash to grab the value of testtype.
I'm attempting to use mod_rewrite to clean up the URL's to a flash video player. First,here is the original URL that I'm trying to rewrite to:library/player.swf?path=path-to-file.flvhe above URL works perfectly fine when I access it directly. I have coded the swf to automatically grab the path parameter and play the video. No problems there. Now here is my attempted rewrite rule:RewriteRule ^player/(.+)$ library/player.swf?path=$1 [QSA,L]When visiting the url player/path-to-file.flv, I get the swf but no video loads. I set up a popup window in the flash to tell me the path name for debugging purposes, and it looks like the path isn't being passed at all.On the other hand if I use the exact same rule but point it to a test.php instead of player.swf, the test.php file is able to echo out the parameter
In as2 it was very easy to access query string just using _root, but this doesn't seem to work on as3.[code]How do i access value of a? I tried it with _root as well as in flash client tried this userNameTextField.text=root.loaderInfo.parameters.a;But both doesn't seem to work. What can be the problem?
I cant pass the query string while using the debugger or else i cant debug when there is a query string. how to use the bothAm using a web application in flex using php for ex : [URL]