Click to See Complete Forum and Search --> : v7-AS3 [RESOLVED] Symbol Library in KM
manuel-jrs
06-26-2009, 01:12 PM
Hi, I need use a movieclips in my Symbol Library with ActionScript 3.0, in old version of KM I do it with "attachMovie", but in KM 7 I can't do it, I search information about use Symbol Library in this forum but i couldn't find nothing.
Can you help me?
Thanks for helping. :)
Bob Hartzell
06-26-2009, 02:13 PM
In AS3, use "new name_of_class" where class is in the symbol library
manuel-jrs
06-26-2009, 02:21 PM
OK, thx I try to do it...
Bob Hartzell can you give an example please?
Thanks for helping!
byweb
06-26-2009, 03:06 PM
Hola Manuel eso es simple, ahora no se llama con attachMovie, eso es en AS1 o AS2, con KoolMoves 7 y AS3 utiliza addChild.
Crea un objeto por ejemplo un circulo, lo conviertes en Movie Clip.
Guardas en bliblioteca y le das un nombre de clase ( donde pone Class Name ) por ejemplo:
Class: myMovieClip.
base class: flash.display.MovieClip
Marcas la casilla de Include in Export
Export Order: export at beginning
Y ahora lo llamas al Stage con as3
//Creamos la variable Circulo para myMovieClip
var Circle:myMovieClip = new myMovieClip();
//Esto centrará nuestro mc en el Stage
var PosX:Number = stage.stageWidth*.5;
var PosY:Number = stage.stageHeight*.5;
Circle.x = PosX;
Circle.y = PosY;
//Añadimos el Movie Clip a la escena principal
addChild(Circle);
Como dirá aquel "...y eso es todo amigo" :cap:
manuel-jrs
06-26-2009, 05:28 PM
Wow!!! Excelente explicación!!! Muchas gracias byweb, funcionó a la perfección!
Gracias por ayudar!!!
Thanks for helping!!!
flashkit.com
Copyright WebMediaBrands Inc., All Rights Reserved.