IDE :: Image From Different Domain Loading But Not Triggering Complete?
Jan 15, 2009
My flash app (as3, flash9) needs to load images from multiple servers.
When running the site on localhost, the loading of images works, regardless of which address it was loaded from. I can load it from
[URL]
But what does NOT work is to have a "Event.COMPLETE" triggered from the Loader that I use, if the Url of the image is not the same address as the one where I load the flash file from. The image loads and displays, but no COMPLETE or even an ioError event is triggered.
This code works fine in my IDE but when I test it in a browser, the Event.COMPLETE function appears to trigger twice. I put a throw error command in to make it show up in Flash debug Player and the error gets thrown twice. I've even done a string search through the code to see if I've added more than one listener but no luck.
ActionScript Code: private function downloadCompleteHandler(event:Event):void { _s.removeEventListener(Event.COMPLETE, downloadCompleteHandler); // Clean up _s.removeEventListener(ProgressEvent.PROGRESS, preloaderBar); // Clean up
I have a banner that loads in XML and an image. The banner.swf is on domain1, while the image and XML data is on domain2. I got the data.xml to load using a crossdomain.xml policy file to allow crossdomain loading of the data.xml. The only problem I have now is loading in the image. Locally it works fine, unless I don't have the swf and the image in the same directory. I guess the real question is, how do I load in an image with XML, if the swf and the image are not in the same directory. My code is underneath:
I have loaded a jpeg image in flash. Now I need the handler after the loading complete. I have used ActionScript Code: var imageLoader:Loader = new Loader(); var req:URLRequest=new URLRequest(arr[0]); imageLoader.load(req); mc.addChild(imageLoader); imageLoader.addEventListener(Event.COMPLETE, image_func); function image_func(e:Event):void { trace("image laoded complete"); } The above code is not working for loading complete.
how can I load in flex spark Image control and wait for complete loading? MX:image have method load() and listen COMPLETE event this is not in spark Image...is there only source?? or how can i listen when image is complete loading??
I have no experience with Object Oriented Programming, so I wonder about the following:
1) Will the code past the .LOAD line (in red) be executed only after the image completes loading? 2) Can I nest several listeners as seeing in my code below?
I am loading in binary files with the url class which can be quite large 10mb + and it works fine on my server but another server I am testing on it can sometimes not work. Sometimes it will not load the file and other times it will only load about 20% and it throw a complete event??? Then of course other times it works fine. This server is https maybe that has something to do this it?
I'm using OSMF v.95 to handle my video playback. When my streaming videos finish, the following error is triggered:"NetStream.Play.StreamNotFound"I want to be able to re-play the videoor scrub back, but the stream is unusable after that error.I've tested against a few different streams - here is one:
I am using Google's Audio player to play an MP3 on a webpage. My issue is that I am overlaying an image on top of the the play/pause button. Yet when the image is clicked nothing happens. Here is the code:
That did not work. One thing I noticed is if I have visibility:hidden; the flash player will not respoind to any clicks regardless of what is over it. With that said I attempted to overlay the image using <input> without the visibility:hidden; and it still did not work.
I need to get this fixed if at all possible. I am willing to use another flash player that is similar as long as it works correctly and will use an mp3 like above.
I have a "loader.swf" after which my "main.swf" loades. I have used a loaderPro v3 (AS2) component. Doing that was easy but then when it starts loading, even before the loading completes the main.swf starts playing in the background. And i have no coding in my actions panel.
I am building a flash AS3 movie for a client that uses a facebook-connect authentication then loads some dynamic xml and plays.At the last minute the client has informed me that they actually need the flash movie and assets to reside on an external server, so the flash and the xml are not going to live on the same domain.I have the added problem that the xml comes from a PHP file with a session that has been authenticated, so I don't really have the option to use a proxy PHP include to make this work (I believe the session would be broken)
I am trying to load an xml file from wikipedia into my flash movie.
loader = new URLLoader(); loader.addEventListener(Event.COMPLETE, tweetLoaded); loader.load(new URLRequest("http://en.wikipedia.org/w/api.php?action=query&rvprop=content&format=xml&pageids="+subNum)); loader.addEventListener(IOErrorEvent.IO_ERROR, onIOErrorFunction);
This works fine when the flash file is run locally but when I upload to my domain it does not seem to work. I have read elsewhere that the cross domain rule does not apply to XML files only to images and other media. Is this true? If not is there a work around so that I can load in XML files from domains other than the one the swf is hosted on?
Okay I am really confused, my program queries both Bing API and the media wiki API. The Bing api call works fine, I can retrieve the XML search results back from it fine. But the wikipedia call does not work (online). I have tried listening for the Security_Error on the wikipedia call but it does not fire.
I'm trying to load swf like this:[code]but the problem is that some of the swf are in AS2 and their script don't excute (a simple stop() on the last frame is not executed and the movie loops)If I remove loader_context.securityDomain= SecurityDomain.currentDomain;it works, the AS2 files scripts are executed but flash throws a security error for the swf that come from a different domainSo I'm wondering if there is a way in an AS3 file to load AS2 swf from another domain ?
I have a flash file that uses actionscript to read a remote XML file. [URL] for the tutorial that allowed me to accomplish this. Everything is working pefectly except one little issue.
When the movie loops it requests the XML file again. How can I have it request the XML file only the first time and just re-utilize the data?
I've written an app that parses Atom and RSS feeds from a few popular sites, and reacts to this data. Everything works fine locally, but fails when uploaded. Is there a security setting I should be aware of?
I'm having the site at one domain. Within the site, i used loadVars to load txt content into it. The txt file is at another domain. So what security settings or any other thing that i have to look out for?
When i view it on my computer, it works fine. But when i view it from the browser, it doesnt work.
I created an XML gallery in as3 that will be loading images from a different domain.
I have a .swf (swf1) on serverA that loads an XML from serverB. The XML on serverB points to the image locations located on serverB (I need to host the images on serverB because server A doesn't have enough room).
The images load fine from swf1 locally in Flash, but when I publish swf1 to serverA, the images do not load. My guess is that the XML on serverB is not being loaded correctly because I can see that swf1 on the webpage.
I am trying to get a xml into flash from an external domain using a PHP proxy to get around the cross domain issue.
I have created a simple swf file that is meant to load the xml and print out some data from the received file. Unfortunately I havent been able to get it to work as yet. Here is the action script
Code: var Sender = new LoadVars(); var GetData = new XML(); GetData.ignoreWhite = true;
[Code].....
All right got that working as it was a simple syntax error with the php file!
Now all I need is to make the url dynamically sent from the flash
I'm making a flash-based website which would use some information from a separate domain to update its contents. The XML file (document.xml) rests under one domain (let's call it updater2.net), while the core site rests under another (e.g., coredommain.net). I looked at some literature and I picked the simpliest method utilizing this small .php file (called loadXML.php here) and the A/S excerpt:
so I have a problem. I made this Flash application that reads live commentary from an XML file and displays it on screen. There's a refresh every 30 seconds because the data is likely to change alot since it's a live commentary. The SWF file was made in 2 versions, using the same code, for two different URLs, both located on the same server ([URL] and [URL]). The path to the application is "oc2006"... the server is using SSI (server side includes) so there is one HTML file but it loads different templates depending on what URL you come through.
[Code]...
This is where I start going insane- because the XML files are located in the sub-folder "live/commentary/ergebnisse/olympia/" (from the server-root, not from the "oc2006" folder)... and the first commentary file that is opened on startup is "2006-02-10.xml"... opening that file is no problem.
Alright, I was told that I need some sort of file on the domain hosting an FLV in order to load it from another domain. Is this true? If so, step by step, how would I go about loading this FLV if I were to say.... put it on newgrounds, and host the video myself. I've posted on the newgrounds forums, but that place is a joke.
I've created a flash app using ActionScript 3 that basically does the following: Loads an XML file on Domain A. The XML file contains URL's to images on Domain B and Domain C.Pulls these URL's from the XML and creates Loaders Creates Flash Bitmaps out of the oader.content.When I test this on my local hard drive, the images load from Domain B and Domain C with no problem. However, when I host the flash file on a server, it's unable to load the images.
I'm trying to load external swf (with more than one frame and actionscript 3 on every frame - I used there "timeline" coding) from my main swf.code for loading external swf into main swf:
var loader01:Loader; function openGame1(evt:Event):void{ loader01 = new Loader(); var requestSWF01:URLRequest = new URLRequest("game01.swf");