A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: [RESOLVED] Symbol Library in KM

  1. #1
    Junior Member
    Join Date
    Jul 2008
    Location
    Ags.,Mx
    Posts
    14

    resolved [RESOLVED] Symbol Library in KM

    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.

  2. #2
    Senior Member
    Join Date
    Jun 2000
    Posts
    3,512
    In AS3, use "new name_of_class" where class is in the symbol library

  3. #3
    Junior Member
    Join Date
    Jul 2008
    Location
    Ags.,Mx
    Posts
    14
    OK, thx I try to do it...
    Bob Hartzell can you give an example please?


    Thanks for helping!

  4. #4
    Senior Member byweb's Avatar
    Join Date
    Apr 2007
    Location
    Andalucia (spain)
    Posts
    267
    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

    Code:
    //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"

  5. #5
    Junior Member
    Join Date
    Jul 2008
    Location
    Ags.,Mx
    Posts
    14
    Wow!!! Excelente explicación!!! Muchas gracias byweb, funcionó a la perfección!

    Gracias por ayudar!!!

    Thanks for helping!!!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center