--- In flexcoders@yahoogroups.com, Alexander Baetz 
<[EMAIL PROTECTED]> wrote:
>
> Hi,
> 
> for a special tool i want to display buttons with icons that where 
> loaded at runtime (based on an xml document loaded at runtime)
> in adobe livedocs i read that i cant load icons at runtime.
> 
> To workaround that i switched to Images in buttonmode. But 
everytime the 
> displayed image changes because i changed the source attribute (for 
> example when my "button" is disabled) there is a timegap and the 
image 
> is empty.
> This happens even i used the same source-url before.
> My guess would be that my application "forgetts" the imagedata if 
no 
> object uses it anymore and therefore loads the url again.
> 
> So im looking either for a way to store the imagedata and supply it 
to 
> my "Button" when necessary.

http://www.magnoliamultimedia.com/flex_examples/Amys_Flex_FAQ.pdf
Q11

Also be aware that you can use literally any class as an icon.  For 
example, you could subclass UIComponent and put an image control in 
that.   If (say) you weren't averse to enquiring of 
Application.application, you could theoretically access a function or 
variable there from your icon.  Or...you could subclass Button or 
whatever to pass a style into the icon, for instance, and that style 
could, theoretically, contain a path to an image.

HTH;

Amy

Reply via email to