ActionScript 2.0 :: Pass A Query Parameter In The Url Portion Of MovieClipLoader.loadClip
May 9, 2005
I'm using Actionscript 2.0, and I'm trying to pass a query parameter in the url portion of MovieClipLoader.loadClip, e.g. mcLoader.loadClip("movie1.swf?param=1234", blahblah);
but got the error "URLNotfound". If I omit "?param=1234", then it works. I need to put clip loading inside a class definition, so when I tried to use MovieClip.loadMovie, I find difficult to correctly setup the event handlers "onClipEvent(load)" or even worse with "onLoad".
I only discovered this problem when I started tracing values within and without different functions. In the onLoadInit function within my for loop, it only ever receives the last iteration of the loop:[code]Assuming that imgArray's length is 4, then the first trace statement will give me 0,1,2,3. However, the trace inside the loadClips's onLoadInit function will just spit out the last iteration for the number of loops, i.e. 3, 3, 3, 3.I really wanted to be able to use loadClip specifically for the onLoadInit function so I could size and place all my thumbnails dynamically,
I'm having a fun little bug with the loadClip function of the MovieClipLoader class. I've passed it a valid MovieClip and a valid filename (verified by traces) and it still returns false. It never calls the listener object I created with a onLoadStart or onLoadError event.
Code: import mx.events.EventDispatcher; import mx.utils.Delegate; class MultiSWFManager_MiniLoader { public var dispatchEvent:Function; public var addEventListener:Function; public var removeEventListener:Function; [Code] ......
It never calls onLoadStart (I figured it might be a scope issue, so I placed the function inline. Otherwise, I created private functions for each event.)
I created a MovieClipLoader a few days ago that is reuseable. I will be using the same preloader graphics when I am loading in external swf on my stage. My MovieClipLoader functions fine with jpegs and smaller sized swf files. But whenever I load a larger sizes swf it loads the movie before it has fully downloaded in simulation mode. The odd part is that everything works fine with smaller swf files but not larger ones . I have tested a few movies and that seems to be the common theme.
In the example below main.swf is the clip I am loading into "mcBackground".
I'm currently trying to figure out a way for a user to select their own variety of SWF files from a list for customization. This data is saved in a database and when the SWF is loaded it grabs an XML page which tells the SWF container which clips to load. My co-worker found something useful that grabs the location of the SWF and loads it in the container using the MovieClipLoader's loadClip() function. So that works fine as it grabs each little file, it plays, and then another plays right after.
However, some of the files have custom data I would like to place inside the child SWF files. There are variables saved in the files and if I load it up as movie01.swf?param1=TEST it works fine. However if I grab that as the location of the file and use the loadClip() function the query string parameters are not loaded. Here are the simple functions used to call the SWF file into the container:
I'm making a XML photogallery. Im using a MovieClipLoader to load multiple images on the screen at the same time. I've assigned variable path to hold image
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 am working on adding functionality to where the URL takes in a parameter as defined by an MVC style looking way.eg. (URL... )where 12345 is the corresponding Id number that I want to get.I have this functionality working.I am using Internet Explorer 7.My issue is that when a user attempts to enter a new query string id into the URL, the page doesn't refresh when the user hits enter or the refresh button. (The user can navigate to the url/#/Id/12345 only when opening a new window/tab)Does anyone know if this is a feature that doesn't work in Flex or if there is some code or configuration needed to allow this?
Forgive me for this stupid noob question but I want to call a function (loadList) that originally gets triggered after a mouseevent from another function (addToXML) that does not have an event.
The loadList function takes info from a XML var, sticks it into an array which then gets loaded into a tile list and that is working fine.
The addToXML function when called adds elements to the XML var after which I want to call the first function with the event parameter so it refreshes the items in the tile list.
I know it can do this by creating a new array and loading that into the tile list in the addToXML function, but it be much simpler to just recall the function.
but all the event constants I have tried give me error messges like "1061: Call to a possibly undefined method addEventListener through a reference with static type Function."
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 trying to pass a variable (an mp3 URL) generated from a SQL query with PHP to a small flash mp3 player embedded in the page. I am using FlashVars and its not receiving the .swf is not receiving the variable.
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]
I am asking this question as a complete Flash novice, so please do point out if I'm doing anything wrong here (I suspect I am). I have a Flash MPU size animation with a link in it which has been created by using a full sized transparent layer as a button (is that the correct way) with the following ActionScript:
I want to pass variables to php, then the php runs a query from the mysql database, and then sends back the new variable... I looked for tutorial, but nothin' seemed to work.
I have a Facebook application that has a picture gallery. It's build in Flex 4. I want to allow users to link to a specific image. How can that be done?
The only way I see this being done is adding a GET var like &my_picture=asd.jpg in the Facebook page URL, but I don't know how to read that from the iFrame.
for (var i:Number=0; i<numFaces;i++){ var faceLoader:Loader = new Loader(); faceLoader.contentLoaderInfo.addEventListener( Event.INIT, function(fle:Event){
[code]....
The problem is that im sending the variable i to the function LoadCara on every iteration, and its always called with the last value of i. I would like this function to be called with the appropiate index.
I have seen this code in ultitouch gesture samples. But I don't kno how can I pass a bitmap parameter to the statement [Embed(source="imagenes/prueba.jpg")], how can I use this code with other bitmaps using parameters in this class?
I have an AIR application that is downloaded from a webpage. In order to download the application, one must be logged in. I would like the first time the user opens the application, to be able to acces the userId that was logged in.
I must be missing something obvious. I'm trying to pass a parameter from a URL into a text field in flash, but it doesn't seem to work. I've got a dynamic text field (display as html is checked), with an instance name txt_txt. Here's the only line of code in the file: txt_txt.htmlText="test "+this.loaderInfo.parameters.nameVar; And, when I upload it and use the following, I get "test undefined" as my return!? [URL]