Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

JavaScript. How to spawn movie clip on a specific spawnpoint?

New Here ,
Aug 31, 2021 Aug 31, 2021

Is this possible in this program? Just I can't find something like object spawning in documentation

136
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Aug 31, 2021 Aug 31, 2021

Hi.

 

In the HTML5 Canvas document, go to the Library, select the desired symbol and give it a linkage name.

image.png

 

Then add this code at say frame 0 of the main timeline:

var player = new lib.Player(); // Player is the linkage name in the Library
player.x = 275;
player.y = 200;
this.addChild(player);

 

I hope this helps.

 

Regards,

JC

Translate
Community Expert ,
Aug 31, 2021 Aug 31, 2021
LATEST

Hi.

 

In the HTML5 Canvas document, go to the Library, select the desired symbol and give it a linkage name.

image.png

 

Then add this code at say frame 0 of the main timeline:

var player = new lib.Player(); // Player is the linkage name in the Library
player.x = 275;
player.y = 200;
this.addChild(player);

 

I hope this helps.

 

Regards,

JC

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines