PDA

View Full Version : [AS3] Grow style game help


orofisch
07-15-2009, 07:51 AM
Hi,

I have to create a game similar to grow games (as3)at :http://www.eyezmaze.com/, but i do not know how to insert already created movieclips from library in an array and then display the appropriate one with a click on a button. ANY IDEAS ?.


Thanks a lot,
orofisch

DukeW
07-15-2009, 11:53 AM
Hey,

You can check Export for ActionScript for the mcs you want to use this way. Give them the names you want to have, and then use this code:
var tempClass:Class=getDefinitionByName("nameYouUsedAtExport") as Class;
var tempMc:MovieClip=new tempClass();
addChild(tempMc);

orofisch
07-20-2009, 05:52 PM
Hey,

You can check Export for ActionScript for the mcs you want to use this way. Give them the names you want to have, and then use this code:
var tempClass:Class=getDefinitionByName("nameYouUsedAtExport") as Class;
var tempMc:MovieClip=new tempClass();
addChild(tempMc);
Hi,
Thanks Dukew ,but i need more help.How you relate class and arrays, i do not know many things . Could you give me more details : ).