what want to make is let people submit a URL and then show the image on the stage ..
so i went an wrote my code but it doesn't work as i expected .. here is the code
var myurl:String ; // a var to load the text in it
var reques:URLRequest = new URLRequest (myurl) ; // the urlrequest (i know that this only accept strings but what to do !!)
var loader:Loader = new Loader(); // the loader
how to pass a variable from FLASH to PHP?I'm trying to upload an image through the URLRequest and pass a unique name for each file.( I want to store the name elsewhere and need flash to know the name of the file.)
Since I'm using the request.data for the ByteArray of the image, I read that I can't use the URLVariables to pass any other variables.
It is almost working, except for the filename.AS3 function calling the request and query string:
Code: function uploadTheImage(GuidName:String):void { //create image var stage_snapshot:BitmapData = new BitmapData(imgprev.width, imgprev.height); stage_snapshot.draw(imgprev);
I am sending userID through urlRequest like below code,
[Code]...
now when new window is opening in that new swf is opening(new project) that is also in flex only.there i need to retrive userID when initailizing only how can i retrive?
Could someone help me with this? I'm unclear as to why this bit of code won't work and my eyeballs are about ready to pop Is it not possible to assign a URL to a variable and then pass that variable back to the URLRequest? I'm getting two errors:1151: A conflict exists with definition movieURL in namespace internal.Warning: 3596: Duplicate variable definition.[code]
I'm using AS3 to get variables from a plain text file. The variables are loaded, and assigned as a variable in Flash.
Code: var checkNew:Timer = new Timer(2000); checkNew.addEventListener(TimerEvent.TIMER, reConnect); checkNew.start();
[Code].....
So basically as you can see here, the gamertag is loaded from a plain text PHP file and converted into a variable. What I need to be able to do is tell whether or not that variable has changed (ex. 1 changed to 2).
Quite simply what should the code look like to include four URLRequest buttons in the same Actions keyframe. I'm working on a slideshow so the actions layer spans four frames. I've tried using four separate keyframes but no luck.
I this code a setup a button that calls a url request from another variable and that works fine: var venue_www:String = "http://www....1"; var venue_url:URLRequest = new URLRequest(venue_www); function venue_Click(event:MouseEvent):void { navigateToURL(venue_url); vInfo.highlight1.alpha = 1; } vInfo.venue.addEventListener(MouseEvent.CLICK, venue_Click);
But later on I have a function that changes the venue_www variable among other details. But my button won't update with the new url variable. I've actually also already removed the event listener and re-added it through the script, for whatever its worth. function setInfo1() {// one for each venue if (currentVenue=="ATL") { venue_www = "http://www.....2"; }}
In my movie i have a link button with following, simple, function creating a link:
[Code]...
lately i've associated a class file (.as) to my movie and immediately after, when publishing the movie i got the following error message: 1046: Type was not found or was not a compile-time constant: URLRequest. as well as a couple of other related error messages: 1180: Call to a possibly undefined method URLRequest. 1180: Call to a possibly undefined method navigateToURL. when i remove the link to the class file, the problem goes away. also, i have checked the class file for mentioning of "URLRequest" and nothing is there.
I've decided to take the jump to AS3 now but im having a lot of issues... Im trying to load an external swf into a movieclip.
In AS2 it would be:
PHP Code:
var mcLoader:MovieClipLoader = new MovieClipLoader(); var myListener:Object = new Object (); mcLoader.addListener(myListener); mcLoader.loadClip("mainLoader.swf","externalLoader_mc");
[Code].....
How can i load the URLRequest into an actual movieclip as i have done in AS2? As far as i know the load function only accepts one variable. ATM the external swf im loading is just going into thin air and i can't get anything to happen (i have the functions created to deal with the events btw).
Edit: Just fixed it by adding externalLoader_mc.addChild(myLoader);
there you are, you set up your AS3 code to load XML via a URLLoader and URLRequest, as normal. You then take your XML file, and upload it to a server. You then run your program, and trace out the XML you receive. So far so great, and you see the results of your XML traced out. Then you change something on your XML, either adding to it or removing a line. You then run your program again from CS5.5, and trace out the XML, and it shows the same results that it did before you made any changes. I deleted the XML file from the remote server, and it is like it stored it in cache, and still able to read it. If I change the url or file name, it gives me an error, which it should.
If I point the url back to my remote XML file, and run the program again, it gives me the XML results I had in the beginning, before I made any changes to it (regardless if the XML file exists). The only fix I have found so far, is closing CS5.5, and reopening, and then it can see the changes. I did that, and it was able to see my XML changes on my remote server, but again, only one time. If I try to change anything, or delete the XML file, it still pretends as if its there, reading the results that it read the first time I run the program. Is this a cache issue? Anybody else experience this? I never remember running into this problem using CS5/CS4/CS3, only CS5.5. Of course, I can test it all locally first, and then upload the XML file to the remote server when I know that no other changes need to be made, but still, this is really weird!
I have made a XMLloader with URLrequest, and it works locally by calling the file directly by its name ie. "myFile.swf". var presLoader:Loader = new Loader(); presLoader.load(new URLRequest("myFile.swf")); addChild(presLoader);
But when I uploaded the loader to the server, I have no file, only "URL not found"-error. So I found out that I should change to URL to "/Files/Images/subloader/myFile.swf" then it will load. But thats a real problem, because I have several loaders.
Im building a flash banner that takes dynamic xml data from another domain and displays them as links. To make the swf reload the xml (the xml links change all the time) every time Internet explorer is updated (instead of loading from the cache) I added +new Date().time to my URLrequest, and suddenly the links takes 9 seconds to display. Firefox doesnt have the cache problem and without the +new Date().time it displays the updated links almost instantaneously. Can anyone tell me why this happens and how I can fix it?? a 9 seconds loadtime is too long.
Here is the first parts of my code: __________________________________________________ ____________ var xmlLoader:URLLoader = new URLLoader(); var xmlData:XML = new XML(); //en trace variabel til hover state. Fjern da ogs� variablen de steder den benyttes. var hover:Boolean;
[code]....
After that I use the linkList to dynamically create the links as textfields, with some formatting, hoverstate, linebreaks etc. only thing I changed was adding the +new Date().time, and it displays the links so slow.
Depending on which button a user clicks, my project will generate a different variable "b" in the URL
If a user navigates to my page titled "default.asp?b=1", and I have the swf embedded on my page how do I send the URL variable to my flash movie through HTML. If someone could also explain how I retrieve this variable in my actionscript code
I'm trying to combine PHP/SQL and Flash. I've got a problem now. I want to load a variable that contains an url to an image. so the variable is like this: [URL] Now I want flash to load the image, not the text. The variable is called 'img1' but the loadmovie function doesn't work when I put it in.
at the moment I've got a (perhaps) requirement for specifying precedence to certain queries within a movie, which will be dealing with the upload of assets through flash to a php backend.
Does anyone have any info, or maybe a pointer in the right direction with regards to how flash deals with the internal URLRequest stack. If that's even how it works.
I may be vastly over simplifying the way flash works, but the only analogy I have is my own exploration into protoyping an AJAX query stack a couple of years ago, where you'd be able to alter the stack ordering depending on request priority as it were.
I'm working on a little game/quiz where the user has to get 8 or more questions correct.If they get 8 or more correct and hit submit, their scores will be sent to a server. I don't have the server info yet, but I believe I'm pretty close to solving this on the flash end of things, as far as sending out the url with the total number correct appended.I'm getting the following error.
Code: TypeError: Error #1034: Type Coercion failed: cannot convert "http://www.website.com/complete.asp?13" to flash.net.URLRequest.
So basically I have this map. On this map I have points, and when you click on these points it goes to a URL.The code setup is as follows:
Arrays to define the movieclip locations and another for the urls (this one is an associative array). I then create a function loop to make an event listener for each point. When the point is clicked it will run another function that handles the URLs. The URL function is to grab the target point that has been click, use the url array type to find the key, and then throw it in to the URLRequest.
So far I have this code:
var places:Array = new Array(); places = [ map.paulsens, map.paraburdoo, map.plutonic, map.wiluna, map.gwalia, map.wallaby, map.sunrise, map.moora, map.marvel, map.flyingFox, map.ernest, map.rosebery,
[code]....
So it's obvious to me that the openLink(); function isn't doing what I want it to. I can kind of guess because event.target isn't being turned in to a string or not pulling the array's type?
I have a music player that loads 2 files, and then plays the 2 files on 2 separate soundchannels. I need to test to see if the 2nd music file is able to load, and then let the play controls check for this to determine how many sound channels to play.
if website is opened as [URL] so this URL works fine- URLRequest("[URL]"); BUT if opened without WWW as [URL], this URL doesn't work. If I change link in url without www than works. HOW TO CHANGE SCRIPT OR TO ADD URL TO MAKE THIS CONTACT FORM WORK WITH WWW AND WITHOUT
I'm new to AS3 and I'm having a problem with an extended class that uses a URLRequest. I have a basic class called 'imageLoader' that I use for loading in external images
Im trying to make a SWF that sends some variables (query string) to ASP. Then the ASPfile is responding with "response.write". Everything works great except i dont know how to get the asp-answer back into flash again.I got a few variables that's added in a movieclip called form, then use this command on the button.in the flash button, (on release)
Code: success = 0; form.loadVariables ("http://xxxx/Code.asp", "GET") in Code.asp