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
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()
I don't know why but i always get this error everytime I will get a dynamic value in my file.php.Or it's just that my file.php has many echos in it and FLASH can get the exact thing im looking for.
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 need to convert a base64 encoded string from a server (being sent via amf) to an image. on the server the raw image data (gif / jpeg / png) is being encoded to base64 (which already works fine), and I need to decode this string and display the image in my flash movie.
In the following example (yes, I am coding on my timeline while I try to work this out - I know, I know) I am loading an SWF in an HTML page and then directing the SWF to get the query parameters from the current URL. The query parameter will contain the source for the video to play.
This seems straight forward to me but I cannot get myURL = urlVars.videoloc; to work. More specifically, urlVars.videoloc seems to be undefined rather than holding the query parameter from the URL. All other variables are correct; both wholeURL and urlVars are defined.[code]...
I'm using as3corelib to decode/encode JSON strings. In my little experiment I want to encode an object (UserInfo) to JSON string and decode it back to the object, however it seems to fail at the convertion point (the last line), why would that happen? how can I make it work?
The UserInfo class
public class UserInfo { public var levelProgress : int; }
How can I unescape HTML encoded characters (such as >, <, etc.) from a string, in Flex (AS3)?So, I have a string "x > 3" and I want the result string as "x > 3".
Like the subject says, I'm passing in a url string through swjobject, and then using that variable to make a url request upon an event. Here is the code. If I remove the loaderInfo and just declare my url in the actionscript itself, it works fine.
Is there a size limit on strings passed to a new XML variable during construction?I have noticed what I think is a hard limit on the size of strings passed as an argument to the constructor of a new XML variable in actionScript3. I noticed it while trying to pass a large string from javascript to a method in AS3.
Everything works fine as long as the string is less than about 330,000 characters, but as soon as the string I pass gets a little bigger than that (say 360,0000 or more) I always get a js error somewhere in the ExternalInterface and a ActionScript error when the data is recieved. I am running on IE.Here is what I am doing:In javascript I have:
flashPlayer.generateFromXml(text);
Where text is some large string of serialized valid xml.Then in AS3, I have
ExternalInterface.addCallback("generateFromXml", generateFromXml); (called in initialize handler)
then
public function generateFromXml(serializedXml:String):void { var x:XML = new XML(serializedXml); }
Everything works fine until the string exceeds about 340,000 characters, then I get this js error at this line in adobe code:
function __flash__addCallback(instance, name) { instance[name] = function () { return eval(instance.CallFunction("<invoke name=""+name+"" returntype="javascript">" + __flash__argumentsToXML(arguments,0) + "</invoke>")); //<<<<<--- line with breakpoint in js debugger
So I have now tested my file with a test xml and it works just fine, but I need to get the dat from the server so it becomes dynamic. I've gotten some php to generate a xml document, but I can't get it to "be" an xml, it's just formatted like it and it's a String.
Can I somehow convert the String to a XML variable, or will I have to cut up the string and get out the info I need.
In the second case, what would be the best way to parse the data in php (what formatting)?
And with all those < > " = symbols I think I would have a hard time to break it apart. The result should become an Array which contains project Objects with properties and another Array to hold file Objects with their own properties.
But the general question is: String to XML, how? If not possible, how to build this xml shaped String so it can be picked apart easily?
I tried to write a function that will strip the carriage return off of strings in a text file... it works fins inside the function, but the changed string is not passed back out... trace commands show that the word is being stripped of the extra characters inside the function, but after the function is called the changed string is not passed back out because the length is back to the original size again
I am passing a simple string from a PHP file, that looks like this.[code]I am asking flash to prase this data and display each field in a text field, it seems as it is failing at the myTextLoader.dataFormat = URLLoaderDataFormat.VARIABLES; because when i take it out or switch the dataFormat to TEXT, it does not produce that error.[code]Any Suggestion as to what needs to be changed in order for it to work, i tried to trace stuff, change the variable scope etc.
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