Of course :) thanks guys, totally escaped my mind
- A
Johannes Nel wrote:
you cast
var UIClock:Clock = Clock (content.attachMovie("clock","uiclock1",1));
the cleanest way is prob to put a static create function on the class
itself
IMO.
from the fdt template
public static function create(container : MovieClip,name : String,
depth : Number, init : Object) : Clock{
var mc : MovieClip = container.attachMovie("linkage", name, depth,
init);
return Clock(mc);
}
On 8/14/06, Andreas Rønning <[EMAIL PROTECTED]> wrote:
So say i have a movieClip in my library associated with the class Clock.
In my application i want an instance of Clock on stage, so i do
something like this:
var UIClock:Clock = content.attachMovie("clock","uiclock1",1);
naturally i'll get compiler errors, since attachMovie returns a
MovieClip.
Is there a way to circumvent this? I really enjoy associating library
clips with classes and attaching them; aside from this issue i've had no
problems.
- A
_______________________________________________
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
--
- Andreas Rønning
---------------------------------------
Flash guy
Rayon Visual Concepts, Oslo, Norway
---------------------------------------
_______________________________________________
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