Re: [Flashcoders] about the MovieClipLoader class

2006-06-09 Thread elibol

onLoadComplete is called when the loading process is complete. onLoadInit is
called when whatever has loaded is initialized and ready to use.

The thing is that when a swf is finished loading, it takes one more frame to
initialize. The main point is that until it initializes, the swf is not
rendered and has no API.

It's about the same case with images, except when the image is done loading
it will not be rendered until it is initialized/read; this happens one frame
after the frame it was finished loading on.

The reason? Theoretically (please take note, I am making no claim) it makes
sense when you think about how the player runs code in frames. If the
current frame has a chunk of code that includes code that tests for loading
completion, then it will prepare the initialization code to execute on the
next frame.

For this to be true, it must be true that once code for the next frame is
prepared, it cannot be changed.

M.

On 6/9/06, Geoffrey Holland [EMAIL PROTECTED] wrote:


Hello,



Can someone please explain what I seem to be quirky behavior of the MCL
class which has prevented me from using it until I read about it on
another
post:



When loading an image or swf into a mc, using the MCL class,



Why does this fail (not only fail, but renders the mc unseeable):



loadListener.onLoadComplete = function(tmc:MovieClip):Void {

tmc._width = 100;

tmc._height = 100;

}



But this works:



loadListener.onLoadInit = function(tmc:MovieClip):Void {

tmc._width = 100;

tmc._height = 100;



}



Intuitively, it seems like it would be the opposite.

___
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] about the MovieClipLoader class

2006-06-09 Thread Geoffrey Holland
Aha,

Thank you, I was under the impression that onLoadInit was on initializing
the Loading process, not the mc itself. Makes total sense now.

-Geoff

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of elibol
Sent: Friday, June 09, 2006 4:01 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] about the MovieClipLoader class

onLoadComplete is called when the loading process is complete. onLoadInit is
called when whatever has loaded is initialized and ready to use.

The thing is that when a swf is finished loading, it takes one more frame to
initialize. The main point is that until it initializes, the swf is not
rendered and has no API.

It's about the same case with images, except when the image is done loading
it will not be rendered until it is initialized/read; this happens one frame
after the frame it was finished loading on.

The reason? Theoretically (please take note, I am making no claim) it makes
sense when you think about how the player runs code in frames. If the
current frame has a chunk of code that includes code that tests for loading
completion, then it will prepare the initialization code to execute on the
next frame.

For this to be true, it must be true that once code for the next frame is
prepared, it cannot be changed.

M.

On 6/9/06, Geoffrey Holland [EMAIL PROTECTED] wrote:

 Hello,



 Can someone please explain what I seem to be quirky behavior of the MCL
 class which has prevented me from using it until I read about it on
 another
 post:



 When loading an image or swf into a mc, using the MCL class,



 Why does this fail (not only fail, but renders the mc unseeable):



 loadListener.onLoadComplete = function(tmc:MovieClip):Void {

 tmc._width = 100;

 tmc._height = 100;

 }



 But this works:



 loadListener.onLoadInit = function(tmc:MovieClip):Void {

 tmc._width = 100;

 tmc._height = 100;



 }



 Intuitively, it seems like it would be the opposite.

 ___
 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