ActionScript 3.0 :: Passing Variable To FLVPlayback Via Query String
Jan 23, 2009Here's the html that I'm trying to pass the flv name to the FLV component
View 1 RepliesHere's the html that I'm trying to pass the flv name to the FLV component
View 1 RepliesI am successfully Passing HTTP Query String to Flash Query String.
Resuming:
inside html
Code:
' <EMBED src="Film1.swf'+document.location.search+'"
'+
inside as3
[Code].....
Then Film1.swf can't grab no more the userName parameter.
I am successfully Passing HTTP Query String to Flash Query String.Resuming:inside html
HTML Code:
' <EMBED src="Film1.swf'+document.location.search+'"
'+
[code].....
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-
Code:
xmlData.load("/family/galleryimage.xml.aspx?pid=" + _root.loaderInfo.parameters.pid.toString());
Then I am defining pid in within the object class.
Code:
<param name="pid" value='<% =Request.QueryString["pid"] %>'>
However I am getting undefined.
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.
View 1 RepliesHow to pass the same query string from one webpage to another? E.g. [URL]
View 1 Repliesmy 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
View 0 RepliesI 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.
View 9 RepliesI 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.
[Code]...
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.
View 4 RepliesI'd like to dynamically load a image into my script. Ie/ myMovie.swf?image=myimage.jpg If no image gets passed - the script should use the default.jpg instead and load normally. This is what I've tried so far....
var CoverName = stage.loaderInfo.parameters["CoverName"];
if (CoverName == null) {
CoverName = "images/default.png";
}
I'm using a Coldfusion Dreamweaver template with cfinclude tags. The header contains a flash movie where I'd like to pass 2 variables via a query string to load the correct image and menu button based on the variables in the ActionScript.
Example: <param name="movie" value="flash/header_v8.swf?pic=1&button=1" />
pic variable can be 1 - 3 and button variable can be 1 - 7 depending on the each pages body element id. So the logic would be something like this for my flash movie:
if body id =home, then pic=1 and button=1
if body id =about, then pic=current variable and button=2
if body id =page3, then pic=1 variable and button=3
[Code].....
What's the best way to pass these variables depending on the current page body element id?
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.
[Code]...
I'm having trouble passing my variable (dayValue ) into my string. The goal is to be able to count backward or forward x amount of days. I keep getting compiler errors. time.
ActionScript Code:
var dayValue = "+7";
var myTime:Date = new Date(2008,9,19,12,0,0);
[code]........
I can then access it and get to to trace from anywhere like this:[code]However...I need to to go into something being converted to a string...like this...txt.load("xml/january/1.xml");Where the Janauary is replaced with the global variable. However, everything inside the quotations is being converted to strictly text, so that txt.load("xml/monthvariable/1.xml");Literally looks for the "monthvariable" folder instead of the January Folder. How can I put a variable into a string like this, so the variable is actually the variable and not the strict text?
View 5 RepliesI am struggling with this bit of code
var bgimage:String = new String();
var myTextLoader:URLLoader = new URLLoader();
myTextLoader.dataFormat=URLLoaderDataFormat.VARIAB LES;
[code].....
I really don't understand why this won't work? I've made a test which sends some POST data to a script on my page which works fine.[code]
View 14 RepliesError: 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()
[Code]...
I get following Error when trying to pass variables via URLRequestMethod.POST;
Error: Error #2101: The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs.
Is there a method for string URL Encoding?
I am trying to make a contact form. When I test the form, I get the following error message in the Output:
[Code]....
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
[code]....
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
[Code]...
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();
[Code].....
I'm currently trying to use the FLVPlayback component and pass a source FLV that's living on a cloudfront webserver. The problem is that the cloudfront requires authentication in the form of query strings in the source FLV. For example:[code]It adds on "&FLVPlaybackVersion= 2.1" to the end.I saw a different article that said I should add a dummy variable at the end like "&dummy=.flv" because I was told that Flash is basically looking for an .flv extension at the end and you can trick it, but it doesn't work because they add on additional code.
View 9 RepliesI 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:
[Code]....
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 wish to do something similar to what is shown on the top banner of this website [URL] like passing the result of a mysql query to the flash banner.
View 1 RepliesHow to get query string from URL? The characters past the ? in IE. [URL]
View 1 RepliesHow to get the query string in AS2.0.
View 2 RepliesI'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:
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=<%=Request.QueryString["ProjID"]%>" />
<param name="quality" value="high" />
[Code] .....
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.