0 Replies Latest reply on May 20, 2008 10:10 AM by sinious

    Skinning a component with AS

    sinious Most Valuable Participant
      Hi all,

      I'm trying to change the graphics on the UIScrollBar component (which is attached to a scrollpane). Problem is, any that I specify an alternate movieclip (skin) for are not showing up. For example, if I specify the mouse over clip for the scrollbars arrows, they disappear.

      I opened the standard and halo theme provided FLA files and copied the entire ScrollBar Assets folder over to my project. I altered the graphics and just tried it like this (making sure asset MCs were export in first frame). That had no effect. I then specified some changes in the init portion of my createClassObject() (e.g. {ScrollUpArrowOver:"SomeValidLinkageID"}) but the clip just keeps disappearing. Since the change is global to my whole project I started adding it to the prototype (e.g. mx.controls.UIScrollBar.prototype.upArrowOverName = "SomeValidLinkageID";), and that does (you guessed it), the same thing.. disappears!

      How can I change the graphics on a scrollpane components scrollbar that I'm dynamically adding via createClassObject()??

      Thanks for any info!

      edit:

      I should note that if I comment out the prototype lines or the init object declarations and such, the scrollpanes scrollbar goes back to normal. So I'm sure I'm affecting the right scrollpane with the code. I copied the assets from the FLAs flash comes with (via open external library and dragging into my project) so I'm sure the movieclips I'm using are good (I didn't make 'em). I didn't make any drastic changes to the movieclips, I literally changed the themeColor of the clips, just to see if I could do it so it can't be some wacky movieclip issue. I also tried enabling export on first frame for each clip I'm using as a skin (and tried with export in first frame disabled) and neither have any effect.