Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7918771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T15:37:14+00:00 2026-06-03T15:37:14+00:00

I’m trying to write an item renderer (in Flash Builder 4.6) purely in action

  • 0

I’m trying to write an item renderer (in Flash Builder 4.6) purely in action script, as action script seems to provide a faster and more customisable interface compared to the built in renderers. (Label / Icon etc).

I wanted the list to display an image, and two text fields. Currently it places all these elements on the canvas, but as soon as I begin scrolling (and virtual list takes affect) My old elements are not removed from the stage. Eg:
Before Scrolling
https://i.stack.imgur.com/Mk5HX.png
After Scrolling
https://i.stack.imgur.com/Qt7wZ.png

Data is stored in name, image, Company and Title.

Any help regarding this issue or in fact a better way to do what I’m trying to do would be greatly appreciated.

Currently I have a class (I’ve removed the imports etc)

public class UILabel2 extends IconItemRenderer
    {
        public function UILabel2() {
            super();
        }
override public function set data(value:Object):void
        {
            super.data = value;
            var DBname:String = data.name as String;
            var DBimage:String = data.image as String;
            var DBcompany:String = data.Company as String;
            var DBtitle:String = data.Title as String;

            //iconField = location;

            trace(DBname);
            label = DBname;
            messageField = "Peanuts";

            //iconWidth=64;
            //iconHeight=64;
            avatarHolder = new Graphic();
            avatar = new BitmapImage();

            iconField = DBimage;

            avatar.fillMode = "clip";
            avatar.source = DBimage;
            avatarHolder.width = 64;
            avatarHolder.height = 64;

            avatarHolder.addElement( avatar );
            addChild(avatarHolder);

            text2 = new TextField();
            text2.x = textMargin;
            text2.y = 45;
            text2.text = DBcompany;
            addChild(text2);

            var text3:TextField = new TextField();
            text3.x = textMargin;
            text3.y = 25;
            text3.text = DBtitle;
            addChild(text3);
            //trace(listArrow1MED);

            arrowHolder = new Graphic();

            //arrowHolder.width = 20;
            //arrowHolder.height = 20;
            arrowHolder.x= Wsize-40;
            //trace(Wsize);

            arrow = new BitmapImage();



            arrow.fillMode = "clip";
            arrow.source = listArrow1LGE;



            arrowHolder.addElement( arrow );
            addChild(arrowHolder);


            //iconField = avatar;
        }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T15:37:15+00:00Added an answer on June 3, 2026 at 3:37 pm

    In order to minimize resource use, Flash recycles ItemRenderers. This means that each ItemRenderer may be constructed once, and then have its data changed multiple times.

    What this means in your case is that each time a renderer’s data is set, it creates new components (text fields, image) in the renderer.

    What you need to do to fix this:

    1. Move all of the create component / addElement / addChild code into the constructor.
    2. Create variables to store references to those components.
    3. In set data, change the data shown by those objects, instead of creating new components.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am trying to render a haml file in a javascript response like so:
In my XML file chapters tag has more chapter tag.i need to display chapters
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I'm trying to create an if statement in PHP that prevents a single post

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.