If you want to know why we can't create an object of MovieClip using 'new'
operator?

This technote is worth reading:
http://moock.org/asdg/technotes/movieclipDatatype/

-abdul

-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 27, 2005 11:42 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] MovieClip and Flex question


> I'm new at using movieclips with Flex, so if I may ask a basic 
> question please. 
> 
> I'm trying to make a movieclip appear in my flex application, but for 
> some reason, it's not working. Here is my code in the "initialize" 
> handler of my flex app:
> 
>       var mcSplash = new MovieClip();
>       
>       mcSplash.width = 200;
>       mcSplash.height = 200;
>       mcSplash.setStyle("backgroundColor", 0xFF0000);
>       mcSplash.x = 200;
>       mcSplash.y = 200;
> 
> All I'm trying to accomplish here is just to see if a 200 x 200 pixel 
> red square would appear, but it's not.
> 
> Could someone give me advise on how to do this right, please?

This is actually more of a Flash question than a Flex question.
MovieClips are (*cough*currently) somewhat funny critters with an less
than obvious contract.

Anyway, you'll probably want to use MovieClip.createEmptyMovieClip():

http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/comm
on/html/wwhelp.htm?context=Flash_MX_2004&file=00001491.html

also see MovieClip.attachMovie() and Object.registerClass().

-Roger

Roger Gonzalez
mailto:[EMAIL PROTECTED]


 
Yahoo! Groups Links



 





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to