Skip to main content
Inspiring
October 28, 2020
Answered

Add Symbol in Scene with Actionscript

  • October 28, 2020
  • 1 reply
  • 301 views

Hi,

I want to add symbol in scene use actionscript. How can i do it? Can you help me? 
Thanks.

    This topic has been closed for replies.
    Correct answer kglad

    you can use addChild() to add objects that you create in the ide and were once on stage (so they have an instance name) or that you created with actionscript.

     

    if it's a library symbol, you'll need to assign a linkage id and create an instance using that id (using the new constructor) and then apply addChild() to the instance:

     

    var mc:MC = new MC();  // where you have a symbol in the library with linkage id = MC

    addChild(mc);

    1 reply

    kglad
    Community Expert
    kgladCommunity ExpertCorrect answer
    Community Expert
    October 28, 2020

    you can use addChild() to add objects that you create in the ide and were once on stage (so they have an instance name) or that you created with actionscript.

     

    if it's a library symbol, you'll need to assign a linkage id and create an instance using that id (using the new constructor) and then apply addChild() to the instance:

     

    var mc:MC = new MC();  // where you have a symbol in the library with linkage id = MC

    addChild(mc);