loaderinfo

AS3: How do I get dynamic loader URL from LoaderInfo in Event Listener Function?

一曲冷凌霜 提交于 2021-02-08 12:43:19
问题 I'm loading many pictures, and am using an array to do so. loader[i].load(new URLRequest(picture[i])); My Event Listener function is enabled like this: loader[i].contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete); My onComplete event handler shows this: trace(e.target); //OUTPUT: [object LoaderInfo] I've looked for properties in LoaderInfo that might identify which loader initiated the listener (the value of "i") so that I can putz around with each one specifically, like this:

ProgressEvent.PROGRESS not firing in AS3

此生再无相见时 提交于 2019-12-25 04:17:22
问题 I trying to create a preloader for a game in Flash CS6. I've already slowed down the download speed to 1,2 kb but the ProgressEvent.PROGRESS is never fired. This is what I have: import flash.events.Event; import flash.events.ProgressEvent; stop(); loaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressMade); function onProgressMade( progressEvent:ProgressEvent ):void { trace( loaderInfo.bytesLoaded, loaderInfo.bytesTotal ); } The stage stays blank but onProgressMade gets never called.

AS3 - How do you receive parameters in a swf from a GET request?

孤者浪人 提交于 2019-12-13 05:19:27
问题 I tried using var params: Object = ((this.stage.loaderInfo) as LoaderInfo).parameters; to get the parameters, but it returns an Object with no properties. That LoaderInfo will give me the correct URL without the parameters though if I use LoaderInfo.url. I'm using the request: http://localhost/foo.swf?start=foobar. params.hasOwnProperty("start") returns nothing, and using a for loop shows that "params" has no properties. How do I receive the start/foobar pair in my code? I would much prefer