Skip navigation
Currently Being Moderated

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

May 23, 2012 4:01 AM

Tags: #ac3

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?.

  • Currently Being Moderated
    May 23, 2012 4:19 AM   in reply to azazguy

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

    Mark as:
  • Currently Being Moderated
    May 23, 2012 5:13 AM   in reply to azazguy

    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:  




    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();



    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).

    Mark as:
  • Currently Being Moderated
    May 23, 2012 5:54 AM   in reply to azazguy

    You're welcome

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points