Re: [flexcoders] Programatic Icon

2007-04-27 Thread Michael Schmalle

Wow, I messed up.

I need to rethink this, I was thinking about something else.

IFlexDisplayObject is right. :)

Peace, Mike

On 4/27/07, Manish Jethani <[EMAIL PROTECTED]> wrote:


  From what I understand, you want to be able to change the icon based
on the state of your window. You can do this by setting the titleIcon
property every time your state changes. Internally, the old icon
object will be discarded and a new one created from the class
specified to the titleIcon property.

As for the class, it just needs to implement the IFlexDisplayObject
interface, as far as I can remember.

On 4/27/07, Paul Whitelock <[EMAIL PROTECTED] >
wrote:
> Would anyone know if there is a way to create an component that can be
> used as an icon for any component that accepts an icon?
>
> For example, TitleWindow accepts a titleIcon. I would like to create
> an AS3 class that I can instantiate and specify for the TitleWindow's
> titleIcon. As conditions change in the window, I'd like to be able to
> make a function call to the icon class and have it update the icon
> displayed by the TitleWindow. The class would programatically create
> the icon (i.e., it would not use an embedded asset).
>
> Ideally the icon component should be able to be used for any component
> that accepts an icon.
>
> Any idea if this can be done and if so where I should start looking to
> create such a component? Thanks!
>
> Paul
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
> Yahoo! Groups Links
>
>
>
>
 





--
Teoti Graphix
http://www.teotigraphix.com

Blog - Flex2Components
http://www.flex2components.com

You can find more by solving the problem then by 'asking the question'.


Re: [flexcoders] Programatic Icon

2007-04-27 Thread Manish Jethani
>From what I understand, you want to be able to change the icon based
on the state of your window. You can do this by setting the titleIcon
property every time your state changes. Internally, the old icon
object will be discarded and a new one created from the class
specified to the titleIcon property.

As for the class, it just needs to implement the IFlexDisplayObject
interface, as far as I can remember.

On 4/27/07, Paul Whitelock <[EMAIL PROTECTED]> wrote:
> Would anyone know if there is a way to create an component that can be
> used as an icon for any component that accepts an icon?
>
> For example, TitleWindow accepts a titleIcon. I would like to create
> an AS3 class that I can instantiate and specify for the TitleWindow's
> titleIcon. As conditions change in the window, I'd like to be able to
> make a function call to the icon class and have it update the icon
> displayed by the TitleWindow. The class would programatically create
> the icon (i.e., it would not use an embedded asset).
>
> Ideally the icon component should be able to be used for any component
> that accepts an icon.
>
> Any idea if this can be done and if so where I should start looking to
> create such a component? Thanks!
>
> Paul
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
> Yahoo! Groups Links
>
>
>
>


Re: [flexcoders] Programatic Icon

2007-04-27 Thread Paul J DeCoursey
I've been able to get it to work for buttons and the like by extending 
ProgrammaticSkin and passing in the class.  I've never even used the 
icon on a TitleWindow to even know how it's supposed to work.  It should 
work, because everything is a class, but it might not know what to do 
with it.

Paul

Michael Schmalle wrote:
> Hi,
>
> The simple answer is no.
>
> Why?
>
> The titleIcon class is of type Class. This class cannot be subclassed.
>
> My advice to you is create a subclass of TitleWindow and create the 
> method
> you are talking about there.
>
> Since you cannot load icons at runtime, you could create a simple
> iconLibraryModule that held your extra icons and then the method you 
> created
> in the subclass would then load the icons from the icon library on demand
> through some type of string call into the library.
>
> Conclusion, there is no way to create an image like component in 
> components
> with properties of type Class. In my custom window, I wrap the icon in a
> UIComponent, this way when I am rendering the icon, I have 2 options. The
> icon property is the 'source' but not the actual instance that is
> manipulated in the component UI.
>
> Peace, Mike
>
> On 4/27/07, Paul Whitelock <[EMAIL PROTECTED]> wrote:
>>
>>   Would anyone know if there is a way to create an component that can be
>> used as an icon for any component that accepts an icon?
>>
>> For example, TitleWindow accepts a titleIcon. I would like to create
>> an AS3 class that I can instantiate and specify for the TitleWindow's
>> titleIcon. As conditions change in the window, I'd like to be able to
>> make a function call to the icon class and have it update the icon
>> displayed by the TitleWindow. The class would programatically create
>> the icon (i.e., it would not use an embedded asset).
>>
>> Ideally the icon component should be able to be used for any component
>> that accepts an icon.
>>
>> Any idea if this can be done and if so where I should start looking to
>> create such a component? Thanks!
>>
>> Paul
>>
>>  
>>
>
>
>



Re: [flexcoders] Programatic Icon

2007-04-27 Thread Michael Schmalle

Hi,

The simple answer is no.

Why?

The titleIcon class is of type Class. This class cannot be subclassed.

My advice to you is create a subclass of TitleWindow and create the method
you are talking about there.

Since you cannot load icons at runtime, you could create a simple
iconLibraryModule that held your extra icons and then the method you created
in the subclass would then load the icons from the icon library on demand
through some type of string call into the library.

Conclusion, there is no way to create an image like component in components
with properties of type Class. In my custom window, I wrap the icon in a
UIComponent, this way when I am rendering the icon, I have 2 options. The
icon property is the 'source' but not the actual instance that is
manipulated in the component UI.

Peace, Mike

On 4/27/07, Paul Whitelock <[EMAIL PROTECTED]> wrote:


  Would anyone know if there is a way to create an component that can be
used as an icon for any component that accepts an icon?

For example, TitleWindow accepts a titleIcon. I would like to create
an AS3 class that I can instantiate and specify for the TitleWindow's
titleIcon. As conditions change in the window, I'd like to be able to
make a function call to the icon class and have it update the icon
displayed by the TitleWindow. The class would programatically create
the icon (i.e., it would not use an embedded asset).

Ideally the icon component should be able to be used for any component
that accepts an icon.

Any idea if this can be done and if so where I should start looking to
create such a component? Thanks!

Paul

 





--
Teoti Graphix
http://www.teotigraphix.com

Blog - Flex2Components
http://www.flex2components.com

You can find more by solving the problem then by 'asking the question'.


[flexcoders] Programatic Icon

2007-04-27 Thread Paul Whitelock
Would anyone know if there is a way to create an component that can be
used as an icon for any component that accepts an icon?

For example, TitleWindow accepts a titleIcon. I would like to create
an AS3 class that I can instantiate and specify for the TitleWindow's
titleIcon. As conditions change in the window, I'd like to be able to
make a function call to the icon class and have it update the icon
displayed by the TitleWindow. The class would programatically create
the icon (i.e., it would not use an embedded asset).

Ideally the icon component should be able to be used for any component
that accepts an icon.

Any idea if this can be done and if so where I should start looking to
create such a component? Thanks!

Paul