Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 02-04-2009, 10:08 AM   #1
Senior Member
Join Date: May 2008
Posts: 112
Default Custom skinNames for custom states

I'm desperately trying to implement custom states with skinnames, but i'm unable to get this to work.

The docs do not have much info about this.

Here's what i've got so far in a custom component derived from UIComponent:

  [Style (name="fooSkin", type="Class", inherit="no", states="foo")]
  [Style (name="barSkin", type="Class", inherit="no", states="bar")]

  <mx:State name="foo"/>
  <mx:State name="bar"/>
what i'd like to do is create a stateful skin that can use my custom states.
As far as i can tell from the builtin skin code, the skin class check's it's name in the updatedisplaylist function to determine how to draw itself.

I'm setting the style for the component as follows:

.myStyle {
  fooSkin: ClassReference('MySkin');
  barSkin: ClassReference('MySkin');
However, none of the code inside MySkin gets executed.

Anyone ever done this ?
pulse00 is offline   Reply With Quote
Old 03-04-2009, 01:36 AM   #2
Registered User
Join Date: Jan 2009
Posts: 1

This might be a silly question, but in your ClassReference, is that your full class path to that skin object? Also while i cant see your full code, are you actually assigning your skin to that object? like upSkin: fooSkin?

tont0r is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
creating separate classes for custom event frank grimes ActionScript 3.0 6 06-27-2009 10:55 PM
Define custom states for skins to use with degrafa pulse00 Flex 2, 3 & 4 3 01-28-2009 12:01 PM
how to trigger a custom event from a grid? j.steele Components 0 10-29-2008 08:51 PM
Do ALL Custom Events REQUIRE clone() and toString() overrides? frank grimes ActionScript 3.0 9 10-24-2007 01:30 AM
ColorTransform within custom class wmbenedetto ActionScript 2.0 2 05-12-2006 07:59 AM

All times are GMT. The time now is 10:19 AM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.