I agree, styles are better for styles. Again, just answering some ones
question. What I have learned in flex is, there a re a lot of ways to climb
the mountain.
Ok, because I'm a big loser and I don't like using mx_internal... sorry
that I'm so lame Mike
Thats a joke right? I don't like it
Michael Schmalle wrote:
I agree, styles are better for styles. Again, just answering some ones
question. What I have learned in flex is, there a re a lot of ways to
climb
the mountain.
Ok, because I'm a big loser and I don't like using mx_internal... sorry
that I'm so lame Mike
Thats a
Thanks Mike and Paul for the style solution. I changed my class so
that the icon is controlled by styles rather than using mx_internal.
The only change I made was to override the styleChanged() function
rather than retrieving style information in updateDisplayList().
Paul
--- In
Well here's the deal. I've created an simple icon class that draws a
red square like this:
package components {
import mx.skins.ProgrammaticSkin;
public class Icon extends ProgrammaticSkin {
private var iconColor:uint = 0xFF;
public function Icon() {
Hi,
For one I see you are missing;
graphics.clear();
Try that, I don't think you are erasing the old color.
Peace, Mike
PS hehe I was thinking about something else when I responded and forgot the
internal icon is typed IFlexDisplayObject.
On 4/27/07, Paul Whitelock [EMAIL PROTECTED]
Ah,
I know why you are not seeing updateDisplayList() called.
Since this is ProgrammaticSkin, if the size doesn't change, the method will
skip. The layoutManager calls setActualSize() and in that call if height or
width did not change, you won't get the call.
I had this same problem.
In your
Unfortunately that did not work. It looks like the setter is not
really being called after all. When I do this:
myPanel.titleIcon.color = 0x00FF00;
What seems to be happening is that it is creating a property called
color just as if myPanel.titleIcon was a generic Object.
I tried creating a
HAHA,
Man, it must be Friday.
Ok, the problem is this;
titleIcon is the setter for the reference to the class that is creating the
icon.
You need the actual reference to the icon instance.
try this;
import mx.core.mx_internal;
use namespace mx_internal;
I got a different error this time:
TypeError: Error #1034: Type Coercion failed: cannot convert
components::[EMAIL PROTECTED] to Namespace.
Are you sure it's not Friday the 13th?
Paul
--- In flexcoders@yahoogroups.com, Michael Schmalle
[EMAIL PROTECTED] wrote:
HAHA,
Man, it must be
Sorry, that error should be:
TypeError: Error #1034: Type Coercion failed: cannot convert
mx.containers::[EMAIL PROTECTED] to Namespace.
My copying and pasting got a little mixed up there :-)
Paul
--- In flexcoders@yahoogroups.com, Paul Whitelock [EMAIL PROTECTED] wrote:
I got a different
ok,
I have wasted enough time here, listening to music, I will go make it work.
Will post the class. :)
Peace, Mike
On 4/27/07, Paul Whitelock [EMAIL PROTECTED] wrote:
I got a different error this time:
TypeError: Error #1034: Type Coercion failed: cannot convert
components::[EMAIL
Ok, I got it;
MXML APP
---
?xml version=1.0 encoding=utf-8?
mx:Application
xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute
mx:Script
![CDATA[
import mx.core.mx_internal;
use namespace
Maybe I should be listening to whatever music
you're listening to
You have Chemical Brothers :) haha
No, my problem is I try to do 20 things at once. I just needed to focus on
what you were witting and I could have had it solved 3 hours ago :)
mx_internal is the namespace Adobe engineers use
Ahhh, the Chemical Brothers -- I haven't heard them in a while. Maybe
I should dig them out of my collection :-)
Thanks for the colorful description of mx_internal. I also just found
a good description here:
http://tinyurl.com/3y62jd
However, yours is more fun :-)
Thanks again for the help.
Ok, because I'm a big loser and I don't like using mx_internal... sorry
that I'm so lame Mike... but here is a modified version that doesn't
use mx_internal.
Basically three things change from Mikes example.
private function changeIcon(event:MouseEvent):void {
15 matches
Mail list logo