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

how to build a custom movie clip that will be used as a cell renderer for column in a grid ?

New Here ,
May 23, 2012 May 23, 2012

Copy link to clipboard

Copied

i want to build a datagrid that shows a picture and underneath it a name.

the problem is i dont want to see all of the pictures, but all the pictures that have certain requirements, so i cant just make one movie clip that includes all the pictures and names.

so my question is how do i build a movie clip that contains photo and text?.

TOPICS
ActionScript

Views

785

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
LEGEND ,
May 23, 2012 May 23, 2012

Copy link to clipboard

Copied

Create a new MovieClip symbol and add an image and a textfield to it.

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
New Here ,
May 23, 2012 May 23, 2012

Copy link to clipboard

Copied

yea but i dont know how many pictures i will be needed to show..

so how do i create this movie clip on the timeline by code? because i might need to create more than one movieClip

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
LEGEND ,
May 23, 2012 May 23, 2012

Copy link to clipboard

Copied

You do not create movieclips on the timeline using code, though you can create them and add them as children of something that has been manually placed in the timeline.

To create a MovieClip using code you use: 

    var mc:MovieClip = new MovieClip();

If you need to add an image, then however you intend to acquire the image, after it has been acquired, you add it to the MovieClip using:  

    mc.addChild(img); 

where img is the instance of whatever form of object the image takes (Bitmap, Loader)

If you need to add a TextField to the MovieClip then you use: 

    var tf:TextField = new TextField();

    mc.addChild(tf);

and you can set up properties for the textfield such as the font and color and position as well after it has been instantiated (the first line).

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
New Here ,
May 23, 2012 May 23, 2012

Copy link to clipboard

Copied

thank you very much

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
LEGEND ,
May 23, 2012 May 23, 2012

Copy link to clipboard

Copied

LATEST

You're welcome

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