Re: [Flashcoders] MovieClipLoader Oddness
Hi, We have had similar issues loading images this way - we cannot stream from our image server program so Flash loads the same image into 2 movie clips swapping them whilst the server saves to the same image. To solve some difficulties with refreshing, so we used a cache-killer method, e.g. var url:String = http://imageserver/image.jpg?; + new Date().getTime(); We also had some problems loading one image when the first one had finished, so I used setTimeout inside the onLoadInit handler to delay calling of loading the next image. Our server also caused problems - apache could not read the image when the server was writing it, so the programmer wrote to a 2nd image, then renamed it to our desirable one, but this might not affect you. Hope some of these tricks may help. Glen On 11/10/2011 23:42, [p e r c e p t i c o n] wrote: Hi All, I'm working on a project in which I continuously grab images from a server (don't ask..) using MovieClipLoader. everything works fine for a period of days then suddenly the player crashes with the dreadful ..script to run slowly... dialog. when I check my servers logs, i notice that the server at some point earlier than the crash, started to send 304 (http status - means the document hasn't been modified) as opposed to status code 200 (ok - document was found..) has anyone else encountered this? and if so, what headers might the flash player be sending to trigger this? anyone with in-depth knowledge of the headers flash sends? Thx, percy ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] MovieClipLoader Oddness
Hi Percy, Sounds like you need to keep it from caching if only to test. Like Glen said in his tips, try the ? + new Date().getTime(); when calling the image. Flash is most likely caching all the images and if you are fetching a grandios number of them, well flash is going to be reading all those files every time until its cleared or garbaged. If your storing 100,000+ every time, then the build up to a player stall is inevitable. At least that sounds right to me.. :) I've used ImageLoader and set a while loop that only continued unless incremented once the previous was at a ready state. Went very smoothly. Another thing you can do if you WANT to cache the images is set a .httaccess in your image directory that sets an expiration on images that are cached. Or even a cookie. Then flash can't cache everything forever, but if a user goes back to the same search, their results will open quickly for a period of time. Then the images are collected by the garbage man sooner than later. This may help in performance areas whereas the no-cache method may be a little intensive or take a min as you will always be downloading new images. For Apache: http://www.askapache.com/htaccess/apache-speed-compression.html For .httaccess http://www.bloghash.com/2006/11/beginners-guide-to-htaccess-file-with-examples/ http://www.catswhocode.com/blog/awesome-wordpress-hacks-to-make-your-blogger-life-easier (look at the bottom for .httaccess image caching) and then there is the option of loading per wither it has a status of 200 or not. HTH, Best, Karl On Oct 12, 2011, at 3:13 AM, Glen Pike wrote: Hi, We have had similar issues loading images this way - we cannot stream from our image server program so Flash loads the same image into 2 movie clips swapping them whilst the server saves to the same image. To solve some difficulties with refreshing, so we used a cache- killer method, e.g. var url:String = http://imageserver/image.jpg?; + new Date().getTime(); We also had some problems loading one image when the first one had finished, so I used setTimeout inside the onLoadInit handler to delay calling of loading the next image. Our server also caused problems - apache could not read the image when the server was writing it, so the programmer wrote to a 2nd image, then renamed it to our desirable one, but this might not affect you. Hope some of these tricks may help. Glen On 11/10/2011 23:42, [p e r c e p t i c o n] wrote: Hi All, I'm working on a project in which I continuously grab images from a server (don't ask..) using MovieClipLoader. everything works fine for a period of days then suddenly the player crashes with the dreadful ..script to run slowly... dialog. when I check my servers logs, i notice that the server at some point earlier than the crash, started to send 304 (http status - means the document hasn't been modified) as opposed to status code 200 (ok - document was found..) has anyone else encountered this? and if so, what headers might the flash player be sending to trigger this? anyone with in-depth knowledge of the headers flash sends? Thx, percy ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] MovieClipLoader Oddness
Thaks Guys, these suggestions are most helpful. in addition to what i wrote... i looked at the logs closer...and noticed that prior to the 304 status, my logs show repeated downloads of the same image with a status of 200??? the number of times it downloads it appears to be random..sometimes only twice sometimes as many as 10 times... at this point i can't tell if it's flash or the server or the hardware.. Thanks again.. percy On Wed, Oct 12, 2011 at 2:08 AM, Karl DeSaulniers k...@designdrumm.comwrote: Hi Percy, Sounds like you need to keep it from caching if only to test. Like Glen said in his tips, try the ? + new Date().getTime(); when calling the image. Flash is most likely caching all the images and if you are fetching a grandios number of them, well flash is going to be reading all those files every time until its cleared or garbaged. If your storing 100,000+ every time, then the build up to a player stall is inevitable. At least that sounds right to me.. :) I've used ImageLoader and set a while loop that only continued unless incremented once the previous was at a ready state. Went very smoothly. Another thing you can do if you WANT to cache the images is set a .httaccess in your image directory that sets an expiration on images that are cached. Or even a cookie. Then flash can't cache everything forever, but if a user goes back to the same search, their results will open quickly for a period of time. Then the images are collected by the garbage man sooner than later. This may help in performance areas whereas the no-cache method may be a little intensive or take a min as you will always be downloading new images. For Apache: http://www.askapache.com/**htaccess/apache-speed-**compression.htmlhttp://www.askapache.com/htaccess/apache-speed-compression.html For .httaccess http://www.bloghash.com/2006/**11/beginners-guide-to-** htaccess-file-with-examples/http://www.bloghash.com/2006/11/beginners-guide-to-htaccess-file-with-examples/ http://www.catswhocode.com/**blog/awesome-wordpress-hacks-** to-make-your-blogger-life-**easierhttp://www.catswhocode.com/blog/awesome-wordpress-hacks-to-make-your-blogger-life-easier (look at the bottom for .httaccess image caching) and then there is the option of loading per wither it has a status of 200 or not. HTH, Best, Karl On Oct 12, 2011, at 3:13 AM, Glen Pike wrote: Hi, We have had similar issues loading images this way - we cannot stream from our image server program so Flash loads the same image into 2 movie clips swapping them whilst the server saves to the same image. To solve some difficulties with refreshing, so we used a cache-killer method, e.g. var url:String = http://imageserver/image.jpg?**; + new Date().getTime(); We also had some problems loading one image when the first one had finished, so I used setTimeout inside the onLoadInit handler to delay calling of loading the next image. Our server also caused problems - apache could not read the image when the server was writing it, so the programmer wrote to a 2nd image, then renamed it to our desirable one, but this might not affect you. Hope some of these tricks may help. Glen On 11/10/2011 23:42, [p e r c e p t i c o n] wrote: Hi All, I'm working on a project in which I continuously grab images from a server (don't ask..) using MovieClipLoader. everything works fine for a period of days then suddenly the player crashes with the dreadful ..script to run slowly... dialog. when I check my servers logs, i notice that the server at some point earlier than the crash, started to send 304 (http status - means the document hasn't been modified) as opposed to status code 200 (ok - document was found..) has anyone else encountered this? and if so, what headers might the flash player be sending to trigger this? anyone with in-depth knowledge of the headers flash sends? Thx, percy __**_ Flashcoders mailing list Flashcoders@chattyfig.figleaf.**com Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/**mailman/listinfo/flashcodershttp://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com __**_ Flashcoders mailing list Flashcoders@chattyfig.figleaf.**com Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/**mailman/listinfo/flashcodershttp://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- . : . [ p e r c e p t i c o n ] . _ _ _ _ _ _ _ _ _ _ . ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] MovieClipLoader Oddness
Hi All, I'm working on a project in which I continuously grab images from a server (don't ask..) using MovieClipLoader. everything works fine for a period of days then suddenly the player crashes with the dreadful ..script to run slowly... dialog. when I check my servers logs, i notice that the server at some point earlier than the crash, started to send 304 (http status - means the document hasn't been modified) as opposed to status code 200 (ok - document was found..) has anyone else encountered this? and if so, what headers might the flash player be sending to trigger this? anyone with in-depth knowledge of the headers flash sends? Thx, percy -- . : . [ p e r c e p t i c o n ] . _ _ _ _ _ _ _ _ _ _ . ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] MovieClipLoader ...
That was already in the sample code I posted. Here's another example: import mx.events.EventDispatcher; class com.muzakdeezign.samples.Test extends MovieClip { // decorate class with EventDispatcher private static var dispatcherInit = EventDispatcher.initialize(com.muzakdeezign.samples.Test.prototype); // declare EvenDispatcher methods public var addEventListener:Function; public var removeEventListener:Function; public var dispatchEvent:Function; } regards, Muzak - Original Message - From: Stephen Ford [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Thursday, April 05, 2007 4:48 AM Subject: Re: [Flashcoders] MovieClipLoader ... Thanks Muzak,How to best initialize EventDispatcher outside the constructor via a static property ?How would you do this?___ ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] MovieClipLoader ...
Can anyone see why the callback events on the oLoadListener object in the following class aren't firing:import mx.data.binding.ObjectDumper;import mx.events.EventDispatcher;import mx.utils.Delegate;class TowerVideoPlayer extends MovieClip {// // PROPERTIES// // String values of class name and class versionpublic var sClassName:String; public var sVersion:String;// Class variables for EventDispatcher private var dispatchEvent:Functionpublic var addEventListener:Function; public var removeEventListener:Function;// Sound object for the video private var sndVideo:Sound;// Value of the video's sound object private var bSound:Boolean;// Data for loading of SWFsprivate var xmlVideo:XML;// Holder clip for the loaded SWFprivate var mcHolder:MovieClip;// MovieClipLoader for the SWFprivate var mclLoader:MovieClipLoader;// Load listener for SWFsprivate var oLoadListener:Object;// // CONSTRUCTOR// public function TowerVideoPlayer(){setup();}// // FUNCTIONS// private function setup():Void{trace(TowerVideoPlayer.setup()); sClassName = TowerVideoPlayer;sVersion = 0.0.1; bSound = true;oLoadListener = new Object();mcHolder = createEmptyMovieClip(mcHolder, this.getNextHighestDepth());mclLoader = new MovieClipLoader();// Initialise event dispatcher EventDispatcher.initialize(this); oLoadListener.onLoadComplete = function(mcTarget:MovieClip, httpStatus:Number):Void{trace( loadListener.onLoadComplete());} oLoadListener.onLoadInit = function(mcTarget:MovieClip):Void{ trace( loadListener.onLoadInit());} mclLoader.addListener(oLoadListener); mclLoader.loadClip(http://www.w3.org/Icons/w3c_main.png;, mcHolder); trace(ObjectDumper.toString(this));} }___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] MovieClipLoader ...
You email lost it's formatting at my end. Try sending again. Adrian -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Stephen Ford Sent: 04 April 2007 07:27 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] MovieClipLoader ... Can anyone see why the callback events on the oLoadListener object in the following class aren't firing:import mx.data.binding.ObjectDumper;import mx.events.EventDispatcher;import mx.utils.Delegate;class TowerVideoPlayer extends MovieClip { //-- --//PROPERTIES //-- -- // String values of class name and class versionpublic var sClassName:String;public var sVersion:String;// Class variables for EventDispatcherprivate var dispatchEvent:Functionpublic var addEventListener:Function;public var removeEventListener:Function; // Sound object for the videoprivate var sndVideo:Sound;// Value of the video's sound objectprivate var bSound:Boolean;// Data for loading of SWFsprivate var xmlVideo:XML;// Holder clip for the loaded SWFprivate var mcHolder:MovieClip;// MovieClipLoader for the SWFprivate var mclLoader:MovieClipLoader;// Load listener for SWFsprivate var oLoadListener:Object; //-- --//CONSTRUCTOR //-- -- public function TowerVideoPlayer(){setup();} //-- --//FUNCTIONS //-- -- private function setup():Void{ trace(TowerVideoPlayer.setup());sClassName = TowerVideoPlayer;sVersion = 0.0.1;bSound = true; oLoadListener = new Object();mcHolder = createEmptyMovieClip(mcHolder, this.getNextHighestDepth()); mclLoader = new MovieClipLoader();// Initialise event dispatcherEventDispatcher.initialize(this); oLoadListener.onLoadComplete = function(mcTarget:MovieClip, httpStatus:Number):Void{trace( loadListener.onLoadComplete());} oLoadListener.onLoadInit = function(mcTarget:MovieClip):Void {trace( loadListener.onLoadInit());} mclLoader.addListener(oLoadListener); mclLoader.loadClip(http://www.w3.org/Icons/w3c_main.png;, mcHolder); trace(ObjectDumper.toString(this));}}___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] MovieClipLoader ...
Works fine here. Allthough you should consider making the class the MovieClipLoader listener object, rather than creating a seperate object (and using nested functions etc..); I also prefer initializing EventDispatcher outside the constructor (through a static property), because then the mixin only occurs once (instead of each time the constructor is run). If loading the image doesn't work, check to make sure the Library Symbol is setup properly (Linkage) import mx.data.binding.ObjectDumper; import mx.events.EventDispatcher; import mx.utils.Delegate; class TowerVideoPlayer extends MovieClip { private static var dispatcherInit = EventDispatcher.initiliaze(Object(TowerVideoPlayer.prototype)); //-- // PROPERTIES //-- // Class variables for EventDispatcher private var dispatchEvent:Function; public var addEventListener:Function; public var removeEventListener:Function; // String values of class name and class version public var sClassName:String; public var sVersion:String; // Sound object for the video private var sndVideo:Sound; // Value of the video's sound object private var bSound:Boolean; // Data for loading of SWFs private var xmlVideo:XML; // Holder clip for the loaded SWF private var mcHolder:MovieClip; // MovieClipLoader for the SWF private var mclLoader:MovieClipLoader; //-- // CONSTRUCTOR //-- public function TowerVideoPlayer() { setup(); } //-- // FUNCTIONS //-- private function setup():Void { trace(TowerVideoPlayer.setup()); sClassName = TowerVideoPlayer; sVersion = 0.0.1; bSound = true; createEmptyMovieClip(mcHolder, this.getNextHighestDepth()); mclLoader = new MovieClipLoader(); mclLoader.addListener(this); mclLoader.loadClip(http://www.w3.org/Icons/w3c_main.png;, mcHolder); trace(ObjectDumper.toString(this)); } // function onLoadComplete(mcTarget:MovieClip, httpStatus:Number):Void { trace( loadListener.onLoadComplete()); } // function onLoadInit(mcTarget:MovieClip):Void { trace( loadListener.onLoadInit()); } } - Original Message - From: Stephen Ford [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Wednesday, April 04, 2007 8:27 AM Subject: [Flashcoders] MovieClipLoader ... Can anyone see why the callback events on the oLoadListener object in the following class aren't firing:import mx.data.binding.ObjectDumper;import mx.events.EventDispatcher;import mx.utils.Delegate;class TowerVideoPlayer extends MovieClip {// // PROPERTIES // // String values of class name and class version public var sClassName:String;public var sVersion:String;// Class variables for EventDispatcherprivate var dispatchEvent:Functionpublic var addEventListener:Function;public var removeEventListener:Function;// Sound object for the videoprivate var sndVideo:Sound;// Value of the video's sound objectprivate var bSound:Boolean;// Data for loading of SWFsprivate var xmlVideo:XML;// Holder clip for the loaded SWFprivate var mcHolder:MovieClip; // MovieClipLoader for the SWFprivate var mclLoader:MovieClipLoader; // Load listener for SWFsprivate var oLoadListener:Object;// // CONSTRUCTOR // public function TowerVideoPlayer() {setup();}// // FUNCTIONS // private function setup():Void{ trace(TowerVideoPlayer.setup());sClassName = TowerVideoPlayer;sVersion = 0.0.1;bSound = true; oLoadListener = new Object();mcHolder = createEmptyMovieClip(mcHolder, this.getNextHighestDepth());mclLoader = new MovieClipLoader();// Initialise event dispatcher EventDispatcher.initialize(this); oLoadListener.onLoadComplete = function(mcTarget:MovieClip, httpStatus:Number):Void{trace( loadListener.onLoadComplete());} oLoadListener.onLoadInit = function(mcTarget:MovieClip):Void {trace( loadListener.onLoadInit());} mclLoader.addListener(oLoadListener); mclLoader.loadClip(http://www.w3.org/Icons/w3c_main.png;, mcHolder); trace
Re: [Flashcoders] MovieClipLoader ...
Thanks Muzak,How to best initialize EventDispatcher outside the constructor via a static property ?How would you do this?___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] MovieClipLoader woes
Hi Dan (and Muzak), I've posted my solution to the problem, but am not entirely sure that it made the list given the errors we've been having the last few days. In short, it turned out to be a bug (or 'feature') in loadMovie() - if you have the same instance name repeatedly in the hierarchy of your clip (e.g. _level0.inst0.inst0.myclip) then loadMovie() _can_ fail (not always, oddly). Ensuring that all names in the chain were unique (_level0.inst0.inst1.myclip) solved the problem. A more complete explanation is here: http://wildwinter.blogspot.com/2007/02/irritating-bugs-no-1679a-loadmovie-and.html Thanks for the help, Ian On 2/27/07, Holth, Daniel C. [EMAIL PROTECTED] wrote: Have you tried listening for the onLoadError event in the MCL class to see if any errors are output? Also, is it that specific swf, or does it not load the third swf every time, regardless of the swf? (does order matter?) -Dan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ian Thomas Sent: Monday, February 26, 2007 3:16 AM To: Flashcoders mailing list Subject: [Flashcoders] MovieClipLoader woes Hi all, Has anyone ever come across a situation where MovieClipLoader just refuses to fire any events whatsoever? The situation: - Flash 8, running in IDE or as local projector (on Win XP) - A whole pile of successful MovieClipLoader calls have been made (probably 50 or so by this stage), _including_ the very same bit of code which later fails. - Nothing else is loading/streaming at the same time. - Three calls (in rapid succession) are made to a function which does the following: - creates a new MovieClipLoader - creates a new MovieClip (at a new depth) - assigns a new listener for the MovieClipLoader - starts loading a .swf into the clip. The first two times, it works perfectly. The third time, no events are fired and the clip apparently doesn't load. On each occasion, we wait for the previous load to successfully complete first (onLoadInit) before we call the function again. Completely repeatable each time. The loaded .swf isn't doing anything odd (it contains no code whatsoever). *sigh* Any ideas? Or robust alternatives to MovieClipLoader? (Bokel's LoaderClass is a little heavyweight for what I want to do, but I might take a look at it). Ian ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com This e-mail and its attachments are intended only for the use of the addressee(s) and may contain privileged, confidential or proprietary information. If you are not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution, displaying, copying, or use of this information is strictly prohibited. If you have received this communication in error, please inform the sender immediately and delete and destroy any record of this message. Thank you. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] MovieClipLoader woes
Please someone remove me from this mailing list. I ve tried to unsuscribe a lot of times, but i never got the email with the unsuscribing link. Maybe you should fix that error on the application Thank you in advance From: [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] MovieClipLoader woes Date: Mon, 26 Feb 2007 21:22:19 +0100 Show us some code. And get XRay. http://osflash.org/xray regards, Muzak - Original Message - From: Ian Thomas [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Monday, February 26, 2007 10:15 AM Subject: [Flashcoders] MovieClipLoader woesHi all, Has anyone ever come across a situation where MovieClipLoader just refuses to fire any events whatsoever? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com _ Prueba algunos de los nuevos servicios en línea que te ofrece Windows Live Ideas: tan nuevos que ni siquiera se han publicado oficialmente todavía. http://ideas.live.com___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] MovieClipLoader woes
sorry to post this to the list - I've tried unsubscribing 5+ times since the list came back up. I never recieve the confirmation email (despite the page saying it was sent) to actually finalize the unsubscribe. To the admin: please remove me from the list. Thanks, K --- Ian Thomas [EMAIL PROTECTED] wrote: Hi all, Has anyone ever come across a situation where MovieClipLoader just refuses to fire any events whatsoever? The situation: - Flash 8, running in IDE or as local projector (on Win XP) - A whole pile of successful MovieClipLoader calls have been made (probably 50 or so by this stage), _including_ the very same bit of code which later fails. - Nothing else is loading/streaming at the same time. - Three calls (in rapid succession) are made to a function which does the following: - creates a new MovieClipLoader - creates a new MovieClip (at a new depth) - assigns a new listener for the MovieClipLoader - starts loading a .swf into the clip. The first two times, it works perfectly. The third time, no events are fired and the clip apparently doesn't load. On each occasion, we wait for the previous load to successfully complete first (onLoadInit) before we call the function again. Completely repeatable each time. The loaded .swf isn't doing anything odd (it contains no code whatsoever). *sigh* Any ideas? Or robust alternatives to MovieClipLoader? (Bokel's LoaderClass is a little heavyweight for what I want to do, but I might take a look at it). Ian ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] MovieClipLoader woes
Show us some code. And get XRay. http://osflash.org/xray regards, Muzak - Original Message - From: Ian Thomas [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Monday, February 26, 2007 10:15 AM Subject: [Flashcoders] MovieClipLoader woes Hi all, Has anyone ever come across a situation where MovieClipLoader just refuses to fire any events whatsoever? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] MovieClipLoader woes
Have you tried listening for the onLoadError event in the MCL class to see if any errors are output? Also, is it that specific swf, or does it not load the third swf every time, regardless of the swf? (does order matter?) -Dan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ian Thomas Sent: Monday, February 26, 2007 3:16 AM To: Flashcoders mailing list Subject: [Flashcoders] MovieClipLoader woes Hi all, Has anyone ever come across a situation where MovieClipLoader just refuses to fire any events whatsoever? The situation: - Flash 8, running in IDE or as local projector (on Win XP) - A whole pile of successful MovieClipLoader calls have been made (probably 50 or so by this stage), _including_ the very same bit of code which later fails. - Nothing else is loading/streaming at the same time. - Three calls (in rapid succession) are made to a function which does the following: - creates a new MovieClipLoader - creates a new MovieClip (at a new depth) - assigns a new listener for the MovieClipLoader - starts loading a .swf into the clip. The first two times, it works perfectly. The third time, no events are fired and the clip apparently doesn't load. On each occasion, we wait for the previous load to successfully complete first (onLoadInit) before we call the function again. Completely repeatable each time. The loaded .swf isn't doing anything odd (it contains no code whatsoever). *sigh* Any ideas? Or robust alternatives to MovieClipLoader? (Bokel's LoaderClass is a little heavyweight for what I want to do, but I might take a look at it). Ian ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com This e-mail and its attachments are intended only for the use of the addressee(s) and may contain privileged, confidential or proprietary information. If you are not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution, displaying, copying, or use of this information is strictly prohibited. If you have received this communication in error, please inform the sender immediately and delete and destroy any record of this message. Thank you. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] MovieClipLoader woes
Hi all, Has anyone ever come across a situation where MovieClipLoader just refuses to fire any events whatsoever? The situation: - Flash 8, running in IDE or as local projector (on Win XP) - A whole pile of successful MovieClipLoader calls have been made (probably 50 or so by this stage), _including_ the very same bit of code which later fails. - Nothing else is loading/streaming at the same time. - Three calls (in rapid succession) are made to a function which does the following: - creates a new MovieClipLoader - creates a new MovieClip (at a new depth) - assigns a new listener for the MovieClipLoader - starts loading a .swf into the clip. The first two times, it works perfectly. The third time, no events are fired and the clip apparently doesn't load. On each occasion, we wait for the previous load to successfully complete first (onLoadInit) before we call the function again. Completely repeatable each time. The loaded .swf isn't doing anything odd (it contains no code whatsoever). *sigh* Any ideas? Or robust alternatives to MovieClipLoader? (Bokel's LoaderClass is a little heavyweight for what I want to do, but I might take a look at it). Ian ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders]MovieClipLoader http error codes
I'm getting an httpStatus code of 0 back from a MovieClipLoader error. This only happens on a Mac with the Flash IDE. Every once and a while I get a 403 http error but not all of the time. I was wondering if anyone else has run into that error before or not? - Original Message From: [EMAIL PROTECTED] [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Sunday, January 21, 2007 10:23:49 AM Subject: [Flashcoders] Q:The case for Functional vs OOP programming I am a strong believer of the power of OOP, but recently came across the following blog posts that argue for the advantges, and some would say supremacy of functional over imperative/procedural and OOP programming. http://blog.lostlake.org/index.php?/archives/18-Functional-languages- will-rule.html http://www.joelonsoftware.com/items/2006/08/01.html http://www.developerdotstar.com/community/node/544 I think the best approach would be to find a way to gain the advantages of functional based programming while keeping the easy-to- understand OOP metaphor. Is Actionscript ideally suited for functional programming? Can someone give/point me to some examples? Thanks again Jim Bachalo ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com Be a PS3 game guru. Get your game face on with the latest PS3 news and previews at Yahoo! Games. http://videogames.yahoo.com/platform?platform=120121 ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders]MovieClipLoader http error codes
From the docs: If Flash Player cannot get a status code from the server, or if Flash Player cannot communicate with the server, the default value of 0 is passed to your ActionScript code. A value of 0 can be generated in any player (for example, if a malformed URL is requested), and a value of 0 is always generated by the Flash Player plug-in when run in the following browsers, which cannot pass HTTP status codes from the server to Flash Player: Netscape, Mozilla, Safari, Opera, and Internet Explorer for the Macintosh. A value of 0 can also be generated if the player did not try to make the URL request to perform the load operation. This can happen because the request violates security sandbox rules for the SWF file. The 403, in case you were asking about that, is the server restricting access to a resource. Typically, this is because you need to provide some type of authorization to get access. Derek Vadneau - Original Message - From: Donald Desloge [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Monday, January 22, 2007 9:24 AM Subject: [Flashcoders]MovieClipLoader http error codes I'm getting an httpStatus code of 0 back from a MovieClipLoader error. This only happens on a Mac with the Flash IDE. Every once and a while I get a 403 http error but not all of the time. I was wondering if anyone else has run into that error before or not? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders]MovieClipLoader http error codes
Thanks for the info, I look into it on the server end. - Original Message From: Derek Vadneau [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Monday, January 22, 2007 9:52:03 AM Subject: Re: [Flashcoders]MovieClipLoader http error codes From the docs: If Flash Player cannot get a status code from the server, or if Flash Player cannot communicate with the server, the default value of 0 is passed to your ActionScript code. A value of 0 can be generated in any player (for example, if a malformed URL is requested), and a value of 0 is always generated by the Flash Player plug-in when run in the following browsers, which cannot pass HTTP status codes from the server to Flash Player: Netscape, Mozilla, Safari, Opera, and Internet Explorer for the Macintosh. A value of 0 can also be generated if the player did not try to make the URL request to perform the load operation. This can happen because the request violates security sandbox rules for the SWF file. The 403, in case you were asking about that, is the server restricting access to a resource. Typically, this is because you need to provide some type of authorization to get access. Derek Vadneau - Original Message - From: Donald Desloge [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Monday, January 22, 2007 9:24 AM Subject: [Flashcoders]MovieClipLoader http error codes I'm getting an httpStatus code of 0 back from a MovieClipLoader error. This only happens on a Mac with the Flash IDE. Every once and a while I get a 403 http error but not all of the time. I was wondering if anyone else has run into that error before or not? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com Never Miss an Email Stay connected with Yahoo! Mail on your mobile. Get started! http://mobile.yahoo.com/services?promote=mail ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] MovieClipLoader/loadMovie vs. digit on instance name
Yesterday I was building a WindowManager class, and I wanted to assign random names to each created window. So I went for the obvious: var randName:String = String(Math.round( Math.random() * 100 )); var _newWin:Window = Window( _tgt.attachMovie(_linkage, newWin_ + randName, _tgt.getNextHighestDepth(), initObj) ); which gives me something like: _level0.windowContainer.newWin_123456 however, when I tried to load an external image into a movieclip inside this new Window, MovieClipLoader.loadClip() failed silently, and loadMovie() gives an error in the path (doesn't specify which path, but then I found it was the destination movie's path) setting properties like _newWin.textContainer.text = 'xyz'; works ok, but I could not load an image into _newWin.imageContainer, even though I can trace it (gives me _level0.windowContainer.newWin_123456.imageContainer) then I did this, and the image loaded correctly, along with the text properties: var randName:String = String(Math.round( Math.random() * 100 )); var randNameArray:Array = randName.split( '' ); var newNameArray:Array = new Array( randNameArray.length ); for ( var i:Number = 0; i randNameArray.length; ++i ) { newNameArray[i] = String.fromCharCode( 97 + Number(randNameArray[i]) ); } randName = newNameArray.join( '' ); var _newWin:Window = Window( _tgt.attachMovie(_linkage, newWin_ + randName, _tgt.getNextHighestDepth(), initObj) ); basically I converted the numbers into their letter equivalent, starting from a, which gives me something like: _level0.windowContainer.newWin_abcdef and now both loadMovie() and MovieClipLoader.loadClip() loads the image correctly my question is, why is this happening? isn't a digit a valid 'variable-letter' in flash ? is this a known issue, or is it just me? am I doing something wrong? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] MovieClipLoader/loadMovie vs. digit on instance name
Hi Wagner, INMHO, the best way to add your numbers to the name of MovieClip is to first define a variable as the base name of your mc, then add the number (id) to that base name. I do it like this : var baseName:String = newWin_; var mcID:Number = Math.round( Math.random() * 100 ); var mcName:String = baseName + mcID; you'll be sure to allways have a string that way! I usually use this in a loop (for or while) where I use an incremental number (i++) var baseName:String = newWin_; for (var i:Number = 0; i maxMC; i++) { var mcName:String = baseName + i; } HTH Alain Wagner Amaral wrote: Yesterday I was building a WindowManager class, and I wanted to assign random names to each created window. So I went for the obvious: var randName:String = String(Math.round( Math.random() * 100 )); var _newWin:Window = Window( _tgt.attachMovie(_linkage, newWin_ + randName, _tgt.getNextHighestDepth(), initObj) ); which gives me something like: _level0.windowContainer.newWin_123456 however, when I tried to load an external image into a movieclip inside this new Window, MovieClipLoader.loadClip() failed silently, and loadMovie() gives an error in the path (doesn't specify which path, but then I found it was the destination movie's path) setting properties like _newWin.textContainer.text = 'xyz'; works ok, but I could not load an image into _newWin.imageContainer, even though I can trace it (gives me _level0.windowContainer.newWin_123456.imageContainer) then I did this, and the image loaded correctly, along with the text properties: var randName:String = String(Math.round( Math.random() * 100 )); var randNameArray:Array = randName.split( '' ); var newNameArray:Array = new Array( randNameArray.length ); for ( var i:Number = 0; i randNameArray.length; ++i ) { newNameArray[i] = String.fromCharCode( 97 + Number(randNameArray[i]) ); } randName = newNameArray.join( '' ); var _newWin:Window = Window( _tgt.attachMovie(_linkage, newWin_ + randName, _tgt.getNextHighestDepth(), initObj) ); basically I converted the numbers into their letter equivalent, starting from a, which gives me something like: _level0.windowContainer.newWin_abcdef and now both loadMovie() and MovieClipLoader.loadClip() loads the image correctly my question is, why is this happening? isn't a digit a valid 'variable-letter' in flash ? is this a known issue, or is it just me? am I doing something wrong? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] MovieClipLoader/loadMovie vs. digit on instance name
On 12/9/06, Wagner Amaral [EMAIL PROTECTED] wrote: Yesterday I was building a WindowManager class, and I wanted to assign random names to each created window. So I went for the obvious: var randName:String = String(Math.round( Math.random() * 100 )); var _newWin:Window = Window( _tgt.attachMovie(_linkage, newWin_ + randName, _tgt.getNextHighestDepth(), initObj) ); which gives me something like: _level0.windowContainer.newWin_123456 A bit of a tangent, but this doesn't seem like a good strategy to me. Although the odds are against it (literally a million to one), it is possible to have a duplicate name (especially since random numbers are not really random). If the goal is to have a unique name for each instance, why not just keep a static integer variable and increment it each time? public static var LINKAGE_ID:String = Window; private static var windowNameIndex:Number = 0; public static function createWindow(parent:MovieClip, init:Object):Window { var windowName:String = window + String(windowNameIndex++); var clip:MovieClip = parent.attachMovie(LINKAGE_ID, windowName, parent.getNextHighestDepth(), init); return Window(clip); } Or am I missing some requirement? -- T. Michael Keesey The Dinosauricon: http://dino.lm.com Parry Carney: http://parryandcarney.com ISPN Forum: http://www.phylonames.org/forum/ ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] MovieClipLoader, onLoadInit: not working properly / bug
I've run into an issue with MovieClipLoader, that I haven't been able to find an mention of anywhere else online. The issue is with the onLoadInit firing before the first frame actionscript has executed. The issue was repeatable, but only on specific machines, and ONLY through the browser. When played in the IDE or EXE then it worked as expected. I personally was not able to see this error, but it happened consistently on my client's internal network. Here is the issue: The external swf files have AS on frame 1: // var myClass:CustomClass = new CustomClass(); function getInstance():CustomClass { return myClass;} / The main swf has the following: var holder_mc:MovieClip var myMCL:MovieClipLoader = new MovieClipLoader(); myMCL.addListener(this) function onLoadInit(p_target) { var myInst:CustomClass = holder_mc.getInstance(); if (myInst == undefined) { trace(Error, your file doesn't contain the appropriate class); } else { //Working as it should } } myMCL.loadClip(myUrl.swf,holder_mc); / Now, I know what you are saying... This should work... And it does - usually... But then I ran into this perplexing problem. In trying to resolve this issue I did the following: private var loadInitInterval:Number; private var doLoadInitCount:Number = 0; function onLoadInit() { doLoadInit() } function doLoadInit() { clearInterval(loadInitInterval); var myInst:CustomClass = holder_mc.getInstance(); if (myInst == undefined) { //Let's try waiting for a couple of frames if (doLoadInitCount 1) { trace(Error, your file doesn't contain the appropriate class); } else { var duration:Number = 1/30*1000 * 2 // wait for 2 frames at 30 fps clearInterval(loadInitInterval); loadInitInterval = setInterval(this,doLoadInit, duration) } doLoadInitCount++ } else { //Working as it should } } /// Setting up the interval, essentially an onEnterFrame, the onLoadInit worked as it should, where the code in frame 1 of the swf had executed. I see this as a HUGE ISSUE, in the fact that MovieClipLoader might not be reliable. Has ANYBODY run into this? Or know of what might cause it. We are publishing to the main swf to v7, external swfs are v6 and v7, and this issue has appeared when playing back on player 8 and 9. I haven't been able to duplicate the issue on v7... Actually I haven't been able to duplicate it at all, but my client has and has consistently. I don't expect anybody to really know the answer, because I'm sure that when/if you try it, it will work as expected. But if you could theorize about why this might happen... Or what set of circumstances might have occurred to cause onLoadInit to fail, or execute too early - I'd greatly appreciate it? Thanks for your time! Cheerio! Drew Shefman ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] MovieClipLoader, onLoadInit: not working properly / bug
hmm...you said the external swf's are 6 and 7...do youknowif it's only the version 6 swfs giving you the propblem? or is it both? just trying to isolate. On 10/28/06, Drew Shefman [EMAIL PROTECTED] wrote: I've run into an issue with MovieClipLoader, that I haven't been able to find an mention of anywhere else online. The issue is with the onLoadInit firing before the first frame actionscript has executed. The issue was repeatable, but only on specific machines, and ONLY through the browser. When played in the IDE or EXE then it worked as expected. I personally was not able to see this error, but it happened consistently on my client's internal network. Here is the issue: The external swf files have AS on frame 1: // var myClass:CustomClass = new CustomClass(); function getInstance():CustomClass { return myClass;} / The main swf has the following: var holder_mc:MovieClip var myMCL:MovieClipLoader = new MovieClipLoader(); myMCL.addListener(this) function onLoadInit(p_target) { var myInst:CustomClass = holder_mc.getInstance(); if (myInst == undefined) { trace(Error, your file doesn't contain the appropriate class); } else { //Working as it should } } myMCL.loadClip(myUrl.swf,holder_mc); / Now, I know what you are saying... This should work... And it does - usually... But then I ran into this perplexing problem. In trying to resolve this issue I did the following: private var loadInitInterval:Number; private var doLoadInitCount:Number = 0; function onLoadInit() { doLoadInit() } function doLoadInit() { clearInterval(loadInitInterval); var myInst:CustomClass = holder_mc.getInstance(); if (myInst == undefined) { //Let's try waiting for a couple of frames if (doLoadInitCount 1) { trace(Error, your file doesn't contain the appropriate class); } else { var duration:Number = 1/30*1000 * 2 // wait for 2 frames at 30 fps clearInterval(loadInitInterval); loadInitInterval = setInterval(this,doLoadInit, duration) } doLoadInitCount++ } else { //Working as it should } } /// Setting up the interval, essentially an onEnterFrame, the onLoadInit worked as it should, where the code in frame 1 of the swf had executed. I see this as a HUGE ISSUE, in the fact that MovieClipLoader might not be reliable. Has ANYBODY run into this? Or know of what might cause it. We are publishing to the main swf to v7, external swfs are v6 and v7, and this issue has appeared when playing back on player 8 and 9. I haven't been able to duplicate the issue on v7... Actually I haven't been able to duplicate it at all, but my client has and has consistently. I don't expect anybody to really know the answer, because I'm sure that when/if you try it, it will work as expected. But if you could theorize about why this might happen... Or what set of circumstances might have occurred to cause onLoadInit to fail, or execute too early - I'd greatly appreciate it? Thanks for your time! Cheerio! Drew Shefman ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] MovieClipLoader, onLoadInit: not working properly / bug
Hi On the same line as Rich's question. Version 6 SWFs use a different security sandbox then v7 SWFs and thus you can get some interesting side effects. One such side-effect is if you try to query said clip it should return null or 0 for things like _bytesLoaded, _bytesTotal etc. The same type of thing happens when mixing version 7 and version 8 swfs. For best results and reliability, a project should attempt to use swfs of all the same version and from the same subdomain/domain to prevent goofy things. Another thing that might have an impact on the firing of onLoadInit is if a shared library is referenced by the swf. If I remember right, MovieClipLoader will load the swf but not its shared libraries. Thus there is an extended delay after loading in which the first frame cannot execute because it needs to load any items in a shared library (if referenced on that frame). I believe one of my coworkers noticed that in this case, onLoadInit occurs before the first frame executes as well. So beaware that the shared library thing can have a negative effect even if all swfs come from the same server and are the same version. Sincerely Mark R. Jonkman ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] MovieClipLoader Class and Simulate Download
I have just encountered to an interesting issue. If I terminate the MovieClipLoader's loadClip process within the Simulate Download environment, the Flash IDE crashes without exception. If you do the same in Test Movie, SA Player, or browser plug-in, it works fine as expected. The boiled down code is as follows: // var mcl:MovieClipLoader = new MovieClipLoader(); mcl.addListener(this); this.onLoadProgress = function(mc:MovieClip, loadedBytes:Number, totalBytes:Number):Void { trace(mc._url); trace(totalBytes); mcl.unloadClip(mc); mc.removeMovieClip(); }; this.createEmptyMovieClip(mc, 1); mcl.loadClip(1.swf, mc); stop(); // The code above crashes IDE in Simulate Download mode, but nowhere else. Do you guys have any ideas for why? -- // Kenneth Kawamoto (on the road) // materia prima limited // [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] // www.materiaprima.co.uk http://www.materiaprima.co.uk ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] MovieClipLoader Reusage
Probably because of a scope problem. Lookup Delegate On 9/8/06, Helmut Granda [EMAIL PROTECTED] wrote: Can the MovieClipLoader class be reused? I have the following code: var myMCL:MovieClipLoader = new MovieClipLoader(); var myListener:Object = new Object(); myListener.onLoadComplete = function(targetMC:MovieClip):Void { trace(loaded + targetMC); myMCL.loadClip(right2.swf, img2);//--This makes the Movie Loop and never load the next item. } myListener.onLoadStart = function(targetMC:MovieClip):Void { //targetMC.stop(); trace(Started); } myListener.onLoadProgress = function(targetMC:MovieClip):Void { trace(In Progress); } this.attachMovie(img, img, 50); this.attachMovie(img, img2, 51); myMCL.addListener(myListener); myMCL.loadClip(right1.swf, img); //-- It is straight forward, creae a Loader as well as an object and it works great for the first load, but once I fire the next load it fails. Basiclly what I want to do is have an array with different movies that will load to the users cache for later use. TIA. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- Ramon Miguel M. Tayag ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] MovieClipLoader Reusage
Can the MovieClipLoader class be reused? I have the following code: var myMCL:MovieClipLoader = new MovieClipLoader(); var myListener:Object = new Object(); myListener.onLoadComplete = function(targetMC:MovieClip):Void { trace(loaded + targetMC); myMCL.loadClip(right2.swf, img2);//--This makes the Movie Loop and never load the next item. } myListener.onLoadStart = function(targetMC:MovieClip):Void { //targetMC.stop(); trace(Started); } myListener.onLoadProgress = function(targetMC:MovieClip):Void { trace(In Progress); } this.attachMovie(img, img, 50); this.attachMovie(img, img2, 51); myMCL.addListener(myListener); myMCL.loadClip(right1.swf, img); //-- It is straight forward, creae a Loader as well as an object and it works great for the first load, but once I fire the next load it fails. Basiclly what I want to do is have an array with different movies that will load to the users cache for later use. TIA. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] MovieClipLoader Reusage
try subbing your code from onLoadComplete to an onLoadInit function, that looks like it should do the trick On 9/7/06, Helmut Granda [EMAIL PROTECTED] wrote: Can the MovieClipLoader class be reused? I have the following code: var myMCL:MovieClipLoader = new MovieClipLoader(); var myListener:Object = new Object(); myListener.onLoadComplete = function(targetMC:MovieClip):Void { trace(loaded + targetMC); myMCL.loadClip(right2.swf, img2);//--This makes the Movie Loop and never load the next item. } myListener.onLoadStart = function(targetMC:MovieClip):Void { //targetMC.stop(); trace(Started); } myListener.onLoadProgress = function(targetMC:MovieClip):Void { trace(In Progress); } this.attachMovie(img, img, 50); this.attachMovie(img, img2, 51); myMCL.addListener(myListener); myMCL.loadClip(right1.swf, img); //-- It is straight forward, creae a Loader as well as an object and it works great for the first load, but once I fire the next load it fails. Basiclly what I want to do is have an array with different movies that will load to the users cache for later use. TIA. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] MovieClipLoader Reusage
thanks for your suggestion, still I cant get it to work. all I am trying to acomplish is a preloader that will load files in order so if it is done with 1 then load the next one and so forth. I have found some information in how to load 5 files at the same time. Also I was able to call the function from different buttons but for some reason when I try to call a new function onLoadComplete it seems to make the player to choke and get confused. Thanks again On 9/7/06, Peter O'Brien [EMAIL PROTECTED] wrote: try subbing your code from onLoadComplete to an onLoadInit function, that looks like it should do the trick On 9/7/06, Helmut Granda [EMAIL PROTECTED] wrote: Can the MovieClipLoader class be reused? I have the following code: var myMCL:MovieClipLoader = new MovieClipLoader(); var myListener:Object = new Object(); myListener.onLoadComplete = function(targetMC:MovieClip):Void { trace(loaded + targetMC); myMCL.loadClip(right2.swf, img2);//--This makes the Movie Loop and never load the next item. } myListener.onLoadStart = function(targetMC:MovieClip):Void { //targetMC.stop(); trace(Started); } myListener.onLoadProgress = function(targetMC:MovieClip):Void { trace(In Progress); } this.attachMovie(img, img, 50); this.attachMovie(img, img2, 51); myMCL.addListener(myListener); myMCL.loadClip(right1.swf, img); //-- It is straight forward, creae a Loader as well as an object and it works great for the first load, but once I fire the next load it fails. Basiclly what I want to do is have an array with different movies that will load to the users cache for later use. TIA. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- ...helmut helmutgranda.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] MovieClipLoader vs component
Hi to all on the list from a new sign-up. I'm also new to the whole AS thing, so do please bear with me if I ask questions that seem obvious or stupid to those with more experience then I (which will be all of you). The book that I used to teach myself Flash offered two ways of loading a SWF inside another movie; one was by using a movieClipLoader, and the other was by using a Loader component. The first way seems more complicated (needs for AS code), but I'm also wondering if it offers more control than the component option. What is generally considered to be the better way? Thanks in advance; -- Rick Lecoat ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] MovieClipLoader vs component
Rick, I use the MovieClipLoader object seeing as I'm anti-component usage, at least the stock components that come with the Flash IDE. The MovieClipLoader works well with great event handlers and a simple loadClip() method. I utilize the onLoadStart, onLoadProgress, onLoadComplete, and onLoadError events for each clip loaded. I use this class for every subclip to be loaded except for the parent clip's pre-loader which is neither a preloader component or an instantiation of the MovieClipLoader class, but that's a whole different discussion. The idea is to be concerned with the actual flash bytecode size of the exported movie in the end. That's essentially why I develop without using the stock flash IDE components and build all of my own via classes. On that note, I have not tested the difference in size of the exported movie for the loading of the preloader component opposed to the moviecliploader class. But an easy way to see the end result is to use the Generate size report in the publish settings which summarizes the size of your exported movie. Try with the component, and try with the class. -- Jim Palmer ! Mammoth Web Operations -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Rick Lecoat Sent: Friday, June 30, 2006 9:18 AM To: FlashCoders list Subject: [Flashcoders] MovieClipLoader vs component Hi to all on the list from a new sign-up. I'm also new to the whole AS thing, so do please bear with me if I ask questions that seem obvious or stupid to those with more experience then I (which will be all of you). The book that I used to teach myself Flash offered two ways of loading a SWF inside another movie; one was by using a movieClipLoader, and the other was by using a Loader component. The first way seems more complicated (needs for AS code), but I'm also wondering if it offers more control than the component option. What is generally considered to be the better way? Thanks in advance; -- Rick Lecoat ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] MovieClipLoader - onProgress
I am trying to use the MovieClipLoader and onProgress in a way similar to this example: http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Partsfile=2546.html I use the onProgress to send info to function that visualizes the preload status. Works great when I test in flash (using control-enter, and running as a download simulation). However, when uploading the swf files (loader and loaded) to a server, the onProgress function does not seem to get hit. Movie may take 10s to load, but I cannot get responses from the functions onProgress, onInit, etc, (via tracing to a text field). Has anyone come across this or have a workaround? I see similar problems as I research this, but I'm not coming up with an answer. Thanks Wendy ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] MovieClipLoader Script Timeout Bug?
I have had this problem too, I don't know of a way in code to get rid of it, but there are tools around that you can lengthen the script timeout of a flash movie to whatever you want. Obviously this is a bit dangerous, but if you are careful you can get the results you desire. Jim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of clark slater Sent: 12 May 2006 21:43 To: [FlashCoders] Subject: [Flashcoders] MovieClipLoader Script Timeout Bug? Posted this yesterday but it looks like there was a problem with the list, sorry if some people get it twice. I think I may have come across a bug in the intrinisc MovieClipLoader class. When loading a large file using an instance of this class on a slow connection, the script timeout error is thrown if the content takes longer than ~ 1 minute to load. Replacing the MovieClipLoader with old fashioned loadMovie resolves the issue. This can be demonstrated with the following code: - Empty FLA with emptymovieclip on stage instance name container import mx.utils.Delegate; class ContentLoader extends Object { private var mcl:MovieClipLoader; public function ContentLoader () { loadContent (); } private function loadContent () : Void { mcl = new MovieClipLoader (); mcl.onLoadProgress = Delegate.create (this, onLoadProgress); mcl.loadClip (myFile.swf, _level0.container); } private function onLoadProgress (target:MovieClip, loadedBytes:Number, totalBytes:Number) : Void { trace (bytesLoaded: + bytesLoaded); } } Anyone else encounter this issue? Kinda freaks me out because I have used MovieClipLoader a LOT in past projects and now I'm thinking users with very slow connections might be encountering this issue. Clark ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] MovieClipLoader Script Timeout Bug?
Posted this yesterday but it looks like there was a problem with the list, sorry if some people get it twice. I think I may have come across a bug in the intrinisc MovieClipLoader class. When loading a large file using an instance of this class on a slow connection, the script timeout error is thrown if the content takes longer than ~ 1 minute to load. Replacing the MovieClipLoader with old fashioned loadMovie resolves the issue. This can be demonstrated with the following code: - Empty FLA with emptymovieclip on stage instance name container import mx.utils.Delegate; class ContentLoader extends Object { private var mcl:MovieClipLoader; public function ContentLoader () { loadContent (); } private function loadContent () : Void { mcl = new MovieClipLoader (); mcl.onLoadProgress = Delegate.create (this, onLoadProgress); mcl.loadClip (myFile.swf, _level0.container); } private function onLoadProgress (target:MovieClip, loadedBytes:Number, totalBytes:Number) : Void { trace (bytesLoaded: + bytesLoaded); } } Anyone else encounter this issue? Kinda freaks me out because I have used MovieClipLoader a LOT in past projects and now I'm thinking users with very slow connections might be encountering this issue. Clark ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] MovieClipLoader :: onLoadInit
Hey guys, I'm using this MovieClipLoader thing to load in some movieclips... And when they're loaded, I want them to play... Very simple, no? Well... For some reason, some are playing and some aren't... I was just wondering... We currently have stop() commands in the first frame of each loaded swf so they don't start playing before we want them to actually play so we can add some variables to it before it starts playing. Now, onLoadInit is called when the actions in the first frame of the loaded clip are executed, right? So if the first frame holds a stop(); command and onLoadInit is like this: mclListener.onLoadInit = function(target_mc:MovieClip) { // loading done // setting some vars here before we play it target_mc.play(); }; the loaded movieclip should start playing, no? Well... some are, and some aren't... :-( Any thoughts? Serge ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] MovieClipLoader :: onLoadInit
Yeah... I know they're inconsistent... But I mean... Why is this still the case...? I've now added a 200ms interval that executes the play command... That works... Serge Try moving the stop (and related content) down to frame 2. That usually clears up problems of stop + play (or stop + gotoAndPlay) not working at all or inconsistently. Helen ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] MovieClipLoader - Crash in player 7, fine in player 8
Hello folks, once again flash strikes my mind: I've made a small test movie to test my ClipLoader-class, which stores and handles loading queues using a MovieClipLoader. To make a stress test I queue 5 larger swf files for loading on button press (made another button for testing a stop-function). When trying it out using flash player 8 everithing works just fine, when I try the same using player 7 (as browser plugin, that is), then the whole thing crashes. When using my ClipLoader-class in an actual project, everithing works fine when only one file is added to the queue, but even the Flash IDE crashes completely when adding several files for loading. We've been through all of the code and debugging output for two days with two programmers now, but we can not find any clue on about what the problem is. Anyone out there ever has made experience like this? MovieClipLoader.loadClip crashing flash ide/flash plugin under certain conditions?! Any comment welcome, regards, roman. -- --- gosub communications gmbh | fredersdorfer str. 10 | 10243 berlin t [030] 29 36 39 1 - 43 | f [030] 29 66 88 84 | http://www.gosub.de --- ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] MovieClipLoader - Crash in player 7, fine in player 8
Roman, Yes, I've had this - but it seems to only be an issue when working with local files. I've never yet had an issue with online files, even when cached. The only workaround I've found is to queue the requests rather than issue them together - but in most cases that does slow things down... It'd be great to find the root cause of this. It only seems to be in certain circumstances - most of the time it all works fine, but some particular loading sequences just break things and cause FP7 to crash, and I have to revert to queuing for that particular load sequence to work. Ian On 4/4/06, Roman Blöth [EMAIL PROTECTED] wrote: Hello folks, once again flash strikes my mind: I've made a small test movie to test my ClipLoader-class, which stores and handles loading queues using a MovieClipLoader. To make a stress test I queue 5 larger swf files for loading on button press (made another button for testing a stop-function). When trying it out using flash player 8 everithing works just fine, when I try the same using player 7 (as browser plugin, that is), then the whole thing crashes. When using my ClipLoader-class in an actual project, everithing works fine when only one file is added to the queue, but even the Flash IDE crashes completely when adding several files for loading. We've been through all of the code and debugging output for two days with two programmers now, but we can not find any clue on about what the problem is. Anyone out there ever has made experience like this? MovieClipLoader.loadClip crashing flash ide/flash plugin under certain conditions?! Any comment welcome, regards, roman. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] MovieClipLoader - Crash in player 7, fine in player 8
i got similar problem, not possible to access MovieClip.getBytes...() methods, and also affecting progress value of movieClipLoader onProgress event . Maybe show more of your script Martin - Original Message - From: Roman Blöth [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Tuesday, April 04, 2006 12:03 PM Subject: [Flashcoders] MovieClipLoader - Crash in player 7, fine in player 8 Hello folks, once again flash strikes my mind: I've made a small test movie to test my ClipLoader-class, which stores and handles loading queues using a MovieClipLoader. To make a stress test I queue 5 larger swf files for loading on button press (made another button for testing a stop-function). When trying it out using flash player 8 everithing works just fine, when I try the same using player 7 (as browser plugin, that is), then the whole thing crashes. When using my ClipLoader-class in an actual project, everithing works fine when only one file is added to the queue, but even the Flash IDE crashes completely when adding several files for loading. We've been through all of the code and debugging output for two days with two programmers now, but we can not find any clue on about what the problem is. Anyone out there ever has made experience like this? MovieClipLoader.loadClip crashing flash ide/flash plugin under certain conditions?! Any comment welcome, regards, roman. -- --- gosub communications gmbh | fredersdorfer str. 10 | 10243 berlin t [030] 29 36 39 1 - 43 | f [030] 29 66 88 84 | http://www.gosub.de --- ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] MovieClipLoader - Crash in player 7, fine in pl ayer 8
I've had some trouble in the Flash 7 plugin when loading JPEGs that were Saved for the Web in Adobe Photoshop CS2 with the Optimized checkbox ticked on : the images simply weren't displayed with Flash plugin 7. (After re-saving without that option everything was ok.) Please note that the getBytes-method cannot be called if your externally loaded content comes from a different domain (Flash plugin sandbox security) and in that case you need to allow the accessing domain first with a System.allowDomain in the external content. Problem : with JPEGs loaded from an different you can't possibly put code on it and the getBytes simply doesn't work (!) Hans. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Martin Weiser Sent: dinsdag 4 april 2006 12:08 To: Flashcoders mailing list Subject: Re: [Flashcoders] MovieClipLoader - Crash in player 7, fine in player 8 i got similar problem, not possible to access MovieClip.getBytes...() methods, and also affecting progress value of movieClipLoader onProgress event . Maybe show more of your script Martin - Original Message - From: Roman Blöth [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Tuesday, April 04, 2006 12:03 PM Subject: [Flashcoders] MovieClipLoader - Crash in player 7, fine in player 8 Hello folks, once again flash strikes my mind: I've made a small test movie to test my ClipLoader-class, which stores and handles loading queues using a MovieClipLoader. To make a stress test I queue 5 larger swf files for loading on button press (made another button for testing a stop-function). When trying it out using flash player 8 everithing works just fine, when I try the same using player 7 (as browser plugin, that is), then the whole thing crashes. When using my ClipLoader-class in an actual project, everithing works fine when only one file is added to the queue, but even the Flash IDE crashes completely when adding several files for loading. We've been through all of the code and debugging output for two days with two programmers now, but we can not find any clue on about what the problem is. Anyone out there ever has made experience like this? MovieClipLoader.loadClip crashing flash ide/flash plugin under certain conditions?! Any comment welcome, regards, roman. -- --- gosub communications gmbh | fredersdorfer str. 10 | 10243 berlin t [030] 29 36 39 1 - 43 | f [030] 29 66 88 84 | http://www.gosub.de --- ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] MovieClipLoader - Crash in player 7, fine in player 8
Martin Weiser schrieb: i got similar problem, not possible to access MovieClip.getBytes...() methods, and also affecting progress value of movieClipLoader onProgress event . Maybe show more of your script O.k., seems like I have hit a spot. ;) One addition to the phenomenons we're observing along with lodClip-issues: At the start of our swf movie we issue manually a MovieclipLoader.loadClip(one_image.jpg) (don't know the target etc. now) ONCE, and when observing the browser traffic - e.g. using the Firefox-Addon LiveHTTPHeaders we see the loading of the jpg TWICE! The same is happening with SOME of the swf files that are loaded with my ClipLoader-class. As for the queueing-issue (Ian said queueing could slow things down): I am queueing the downloads, so programmatically only one download is in progress at a time. The debugging output out methods produce also shows that always at most ONE SINGLE download is in progress, nevertheless the great modem simulator tool Charles (maybe some ppl. here know it - it is much better than LiveHTTPHeaders for observing what's going on between browser and the rest of theworld) shows - for some swf's - that actually two simultaneous downloads are going on - two simultaneous downloads of the same file! Nevertheless we know that there is only one single instance of my ClipLoader-class with only one single instance of a MovieClipLoader running, and this MovieClipLoader only gets it's next loadClip-call after onLoadInit has been called, that is, after the loading has fully finished. Debugging output shows that this seems to work, though LiveHTTPHeaders and Charles tell another story. Please note that this double loading is not an issue of my ClipLoader-class, since it also happens when manually issuing a MovieClipLoader.loadClip(one_image.jpg), thus not using my class. The bottom line so far is that there seems to be an issue with MovieClipLoader and Flash player 7 and 8 - in player 8 it seems to work better in some way... I'll be keeping you informed on this, roman. -- --- gosub communications gmbh | fredersdorfer str. 10 | 10243 berlin t [030] 29 36 39 1 - 43 | f [030] 29 66 88 84 | http://www.gosub.de --- ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] MovieClipLoader - Crash in player 7, fine in pl ayer 8
To work around the sandbox security problem when loading JPEGs from a different domain, you can always make a proxy. For example, you can make a servlet that fetches a JPEG from a different domain. And in the loadClip you give the name of the servlet. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Van De Velde Hans Sent: dinsdag 4 april 2006 12:25 To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] MovieClipLoader - Crash in player 7, fine in pl ayer 8 I've had some trouble in the Flash 7 plugin when loading JPEGs that were Saved for the Web in Adobe Photoshop CS2 with the Optimized checkbox ticked on : the images simply weren't displayed with Flash plugin 7. (After re-saving without that option everything was ok.) Please note that the getBytes-method cannot be called if your externally loaded content comes from a different domain (Flash plugin sandbox security) and in that case you need to allow the accessing domain first with a System.allowDomain in the external content. Problem : with JPEGs loaded from an different you can't possibly put code on it and the getBytes simply doesn't work (!) Hans. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Martin Weiser Sent: dinsdag 4 april 2006 12:08 To: Flashcoders mailing list Subject: Re: [Flashcoders] MovieClipLoader - Crash in player 7, fine in player 8 i got similar problem, not possible to access MovieClip.getBytes...() methods, and also affecting progress value of movieClipLoader onProgress event . Maybe show more of your script Martin - Original Message - From: Roman Blöth [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Tuesday, April 04, 2006 12:03 PM Subject: [Flashcoders] MovieClipLoader - Crash in player 7, fine in player 8 Hello folks, once again flash strikes my mind: I've made a small test movie to test my ClipLoader-class, which stores and handles loading queues using a MovieClipLoader. To make a stress test I queue 5 larger swf files for loading on button press (made another button for testing a stop-function). When trying it out using flash player 8 everithing works just fine, when I try the same using player 7 (as browser plugin, that is), then the whole thing crashes. When using my ClipLoader-class in an actual project, everithing works fine when only one file is added to the queue, but even the Flash IDE crashes completely when adding several files for loading. We've been through all of the code and debugging output for two days with two programmers now, but we can not find any clue on about what the problem is. Anyone out there ever has made experience like this? MovieClipLoader.loadClip crashing flash ide/flash plugin under certain conditions?! Any comment welcome, regards, roman. -- --- gosub communications gmbh | fredersdorfer str. 10 | 10243 berlin t [030] 29 36 39 1 - 43 | f [030] 29 66 88 84 | http://www.gosub.de --- ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] MovieClipLoader - Crash in player 7, fine in player 8
O.k., we've some sort of cure for strange loadClip-behaviors: Between onLoadInit and the next call to loadClip we set a delay of about 500ms (using a setInterval which then invoces the next loadClip) and now we have no crashes any more. That is: When (pre-) loading several external files in queue put a delay of about 500ms between onLoadInit and loadClip to prevent flash from crashing. Best regards, Roman. -- --- gosub communications gmbh | fredersdorfer str. 10 | 10243 berlin t [030] 29 36 39 1 - 43 | f [030] 29 66 88 84 | http://www.gosub.de --- ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] MovieClipLoader - Crash in player 7, fine in player 8
Thanks Roman - I'll try it next time I encounter another MCL situation which crashes FP7. Cheers, Ian On 4/4/06, Roman Blöth [EMAIL PROTECTED] wrote: O.k., we've some sort of cure for strange loadClip-behaviors: Between onLoadInit and the next call to loadClip we set a delay of about 500ms (using a setInterval which then invoces the next loadClip) and now we have no crashes any more. That is: When (pre-) loading several external files in queue put a delay of about 500ms between onLoadInit and loadClip to prevent flash from crashing. Best regards, Roman. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] MovieClipLoader - Warning / onLoadComplete vs. onLoadInit
Hello again, some final words about this thread: One part of our problems we had with the MovieClipLoader has been our handling of events. So after having tested our thing some billion times and burning several brain cells I want to issue a warning: Beware of onLoadComplete! If possible, put your code into a onLoadInit-handler instead of a onLoadComplete-handler. For example if you handle a loading queue and invoke the loadClip for the next swf file in the queue, then you could end up in a mess if you loadClip in a onLoadComplete-handler, since nevertheless at least sometimes the onLoadInit will still happen. The problem is hard to tell here, since it must be a special situation where problems occur. But to prevent you from hunting hard to find bugs please always prefer onLoadInit over onLoadComplete! This is the more important as the name of the onLoadComplete-handler makes you easily forget that _after_ the complete loading there still is a init about to happen - so the naming is sort of unlucky... Best regards and thanks for your replies, Roman. -- --- gosub communications gmbh | fredersdorfer str. 10 | 10243 berlin t [030] 29 36 39 1 - 43 | f [030] 29 66 88 84 | http://www.gosub.de --- ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] MovieClipLoader - Crash in player 7, fine in player 8
/ loading several external files in queue put a delay of about 500ms between onLoadInit and loadClip/ _or put them on an http server while developping instead of locally, that worked for me. _ _Latcho _ Roman Blöth wrote: O.k., we've some sort of cure for strange loadClip-behaviors: Between onLoadInit and the next call to loadClip we set a delay of about 500ms (using a setInterval which then invoces the next loadClip) and now we have no crashes any more. That is: When (pre-) loading several external files in queue put a delay of about 500ms between onLoadInit and loadClip to prevent flash from crashing. Best regards, Roman. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] MovieClipLoader - onLoadComplete event
Could they have ment that they weren't available until the MC had fully loaded? Ade -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Nils Millahn Sent: 15 September 2005 11:19 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] MovieClipLoader - onLoadComplete event Hi all, just asking for clarification on what properties/methods I can access in the onLoadComplete event of the MovieClipLoader class. The documentation states that: At this point it is impossible to access the loaded movie clip’s methods and properties, and because of this you cannot call a function, move to a specific frame, and so on. However I seem to be able to call 'stop()' and change the _x value of a target clip. Is it the case then that the built-in MovieClip properties/methods ARE available, whereas any custom code isn't? Thanks - Nils. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.344 / Virus Database: 267.10.25/102 - Release Date: 14/09/2005 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] MovieClipLoader
Hi Which of the MovieClipLoader events are you using ?I ask only because I've had similar problems with the class in Flash 8. I did a bit of digging and found this. http://www.betriebsraum.de/blog/downloads/ http://www.betriebsraum.de/external_data/downloads/QueueLoader/QueueLoad er.zip It offers far great flexibility - and proper queuing of assets. It might be a better solution to your problem than tackling the caching problem. Pete -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of dancedrummer Sent: 09 December 2005 21:50 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] MovieClipLoader I'm running into a problem that only occurs with Flash8. I have a swf that loads additions swf's with a MovieClipLoader object. The first time I hit the page it works fine. On subsequent tries when the external swf's have been cached in the browser they are not getting recognized as being loaded by the MCLoader object. Is not an issue with Flash7. Anybody here know anything about this? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] MovieClipLoader
I'm running into a problem that only occurs with Flash8. I have a swf that loads additions swf's with a MovieClipLoader object. The first time I hit the page it works fine. On subsequent tries when the external swf's have been cached in the browser they are not getting recognized as being loaded by the MCLoader object. Is not an issue with Flash7. Anybody here know anything about this? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders