I'm creating an array with Buttons, then a set the label and icon.
When i display them, I only see the label and not the icon!! 

I tried:
        

var buttonArray = new Array(ar_documents.length);
                for(var i=0;i<buttonArray.length;i++){
                        buttonArray[i] = Button(owner.createClassObject( Button,
"button"+i, 2+i, owner));
                        buttonArray[i].label = ar_documents[i].title;
                        buttonArray[i].styleName = ("readmore");
                        
                        [Embed(source="news2.jpg")]
                        var newsIcon:String;
                        
                        Button(buttonArray[i]).icon = newsIcon;
                        Tracer.trace("buttonArray[i].icon: " + newsIcon);
                        
                        buttonArray[i].labelPlacement = "left";
                        buttonArray[i]._x = 0 + i*85; 
                        buttonArray[i]._y = 65; 
                }

but also:

Button(buttonArray[i]).icon = "@Embed('news2.jpg')";





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to