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

Calling a library item

Explorer ,
Nov 08, 2018 Nov 08, 2018

Copy link to clipboard

Copied

hi i would like to ask how i can call an library item to appear in a allocated space /movie clip with a border around the edge, using a button called get and a bordered movie clip called placeholder.

can someone help me with this please, does the item have to be in the fla library because it is.

Message was edited by: João César de Lima / Reason: title entirely in uppercase

Views

205

Translate

Translate

Report

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 , Nov 08, 2018 Nov 08, 2018

First you need a Movie Clip in the Library set to export for ActionScript.

Then, for example, put this code in the first frame of the main timeline:

var test:Test = new Test();

test.x = stage.stageWidth * 0.5;

test.y = stage.stageHeight * 0.5;

addChild(test); // you could also write something like 'container.addChild(test);' to add the Test instance to a Movie Clip instance called 'container'

I hope this helps.

Regards,

JC

Votes

Translate

Translate
Community Expert ,
Nov 08, 2018 Nov 08, 2018

Copy link to clipboard

Copied

Hi.

AS3 or HTML5?

Regards,

JC

Votes

Translate

Translate

Report

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
Explorer ,
Nov 08, 2018 Nov 08, 2018

Copy link to clipboard

Copied

hi Joåo, as3,

Votes

Translate

Translate

Report

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
Community Expert ,
Nov 08, 2018 Nov 08, 2018

Copy link to clipboard

Copied

LATEST

First you need a Movie Clip in the Library set to export for ActionScript.

Then, for example, put this code in the first frame of the main timeline:

var test:Test = new Test();

test.x = stage.stageWidth * 0.5;

test.y = stage.stageHeight * 0.5;

addChild(test); // you could also write something like 'container.addChild(test);' to add the Test instance to a Movie Clip instance called 'container'

I hope this helps.

Regards,

JC

Votes

Translate

Translate

Report

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