Far from PC, so my answer may be not accurate.
Instances of normal ("static") skin part are created and disposed
automatically by the framework (the host component is notified through
invocation of part added and part removed methods). This means that only
one instance of a skin part may exist at the same time for a given host
component instance.
Now think about cases when multiple (0 to n) instances may be needed at the
same time, but you still want to delegate its actual appearance to the
skin. A classic example is the column header skin part in a grid. This is
where dynamic skin parts may help.
A dynamic skin part is, actually, a factory to be used to create multiple
instances of the object, as needed by the host component. In MXML skin, the
component with the part name is usually a fx:declaration tag. In the as
host component, if I remember well the correct type to use is IFactory. The
host component then can use some base class methods to create and dispose
part instances. For example, a grid should react to columns changes to
properly dispose instances in excess or create additional required ones.
Unlike with the plain skin parts, its up to the host component to position
those instances, adding (and then removing) them to the correct parent in
the display list. For example, the grid add the skin part instances of each
column header in the header, size them correctly etc.
Hope this intro clarifies things a bit for you.
Cosma
Il 02/gen/2014 10:46 "Scott Matheson" <[email protected]> ha
scritto:
> Hi
> Not sure is I help.
>
> I always start by trying to use states , then as I am not using any of the
> standard button, but my own FGX files, I user the button attributes like
> color that skin are designed to handle dynamically
>
> <myskin. Color={dynamic value}
>
> You do. It have to pass color on this attribute
>
> I gave up on trying to write a totally dynamic skin class based on my own
> data, I know you can do this I did find some posts that talk about the
> process but nothing seemed to work 100%
>
>
>
> Sent from my iPad
>
> > On 2 Jan 2014, at 05:44, "Sumudu Chinthaka" <[email protected]> wrote:
> >
> > Hi All
> >
> > I'm facing problem with implementing dynamic skinpart in Actionscript
> > i found this post but could not find an answer
> >
> > http://forums.adobe.com/thread/1084961
> >
> > if anyone could answer this it would be great
> >
> > Best Regards
>
> ________________________________
>
> Disclaimer: This electronic mail and any attachments are confidential and
> may be privileged. If you are not the intended recipient, please notify the
> sender immediately by replying to this email, and destroy all copies of
> this email and any attachments. Thank you.
>