Peter Elst

Flash Platform Consultant
  • Home
  • About me
  • Articles
  • Downloads
  • Contact me

Skinning Components in Flash CS3

4 12 2007

I’ve had an article on component skinning in the works for several months but finally got it done and its now published on the Adobe Developer Center.

The article walks you through the different options for skinning components in the Flash CS3 authoring environment: manually editing the assets, code-based skinning and talks about how you can package up your skinned component as an SWC to easily share it with the rest of your team.

http://www.adobe.com/devnet/flash/articles/skinning_flash_cs3.html

Enjoy!

« ActionScript 3.0 - where’s my LoadVars? Calling Belgium’s French community »



Actions

  • rss Comments rss
  • trackback Trackback

Informations

  • Date : 4 December 2007
  • Categories : Flash, Publications

One response to “Skinning Components in Flash CS3”

12 12 2007
Tom (01:29:20) :

I read your article on skinning Flash CS3 components and found it very helpful. When I test the movie, it looks great and works well. however, when I try to import the swf with the text scrollbar into another swf file, the scrollbar does not show up at all. In the output window, it shows:

TypeError: Error #2007: Parameter child must be non-null.
at flash.display::DisplayObjectContainer/addChildAt()
at fl.controls::BaseButton/fl.controls:BaseButton::drawBackground()
at fl.controls::BaseButton/fl.controls:BaseButton::draw()
at fl.core::UIComponent/drawNow()
at fl.controls::ScrollBar/fl.controls:ScrollBar::draw()
at fl.controls::UIScrollBar/fl.controls:UIScrollBar::draw()
at fl.core::UIComponent/::callLaterDispatcher()
TypeError: Error #2007: Parameter child must be non-null.
at flash.display::DisplayObjectContainer/addChildAt()
at fl.controls::BaseButton/fl.controls:BaseButton::drawBackground()
at fl.controls::BaseButton/fl.controls:BaseButton::draw()
at fl.core::UIComponent/::callLaterDispatcher()
TypeError: Error #2007: Parameter child must be non-null.
at flash.display::DisplayObjectContainer/addChildAt()
at fl.controls::BaseButton/fl.controls:BaseButton::drawBackground()
at fl.controls::LabelButton/fl.controls:LabelButton::draw()
at fl.core::UIComponent/::callLaterDispatcher()
TypeError: Error #2007: Parameter child must be non-null.
at flash.display::DisplayObjectContainer/addChildAt()
at fl.controls::BaseButton/fl.controls:BaseButton::drawBackground()
at fl.controls::BaseButton/fl.controls:BaseButton::draw()
at fl.core::UIComponent/::callLaterDispatcher()
TypeError: Error #2007: Parameter child must be non-null.
at flash.display::DisplayObjectContainer/addChildAt()
at fl.controls::BaseButton/fl.controls:BaseButton::drawBackground()
at fl.controls::BaseButton/fl.controls:BaseButton::draw()
at fl.core::UIComponent/::callLaterDispatcher()

Clearly, it’s the component that’s causing it. Is there a particular way in which the component needs to be addressed in the codes? I’m using this to load text dynamically:

import fl.controls.UIScrollBar;

var my_sb:UIScrollBar = new UIScrollBar();
my_sb.x = my_txt.x + my_txt.width;
my_sb.y = my_txt.y;
my_sb.height = my_txt.height;
my_sb.scrollTarget = my_txt;
addChild(my_sb);

function loadMyText():void {
var url:String = “assets/text/testHTML.txt”;
var loadIt:URLLoader = new URLLoader();
loadIt.addEventListener(Event.COMPLETE, textCompleteHandler);
loadIt.load(new URLRequest(url));
}

function textCompleteHandler(event:Event):void {
var urlV:URLVariables = new URLVariables(event.currentTarget.data);
//my_txt.condenseWhite = true;
my_txt.htmlText = urlV.content as String;
my_txt.styleSheet = myStyleSheet;
}

var flash_css:URLLoader = new URLLoader();
flash_css.addEventListener(Event.COMPLETE, cssCompleteHandler);
flash_css.load(new URLRequest(”assets/text/brWht.css”));

var myStyleSheet:StyleSheet;

function cssCompleteHandler(event:Event):void {
myStyleSheet = new StyleSheet();
myStyleSheet.parseCSS(event.currentTarget.data);
my_txt.styleSheet = myStyleSheet;
loadMyText();
}

I can’t seem to find the answer anywhere. Can you help?
TIA.

Leave a comment

You can use these tags : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>





Conferences

Flash on the Beach Speaker

Training Partners

multimediacollege

SkillsMatter

Badges

Alltop, confirmation that I kick ass

  • Categories

    • AIR RSS category feed
    • Ajax RSS category feed
    • CSS RSS category feed
    • Eclipse RSS category feed
    • Events RSS category feed
    • Flash RSS category feed
    • Flash Lite RSS category feed
    • Flex RSS category feed
    • Gadgets RSS category feed
    • General RSS category feed
    • JSFL RSS category feed
    • Mac RSS category feed
    • Open Source RSS category feed
    • PHP RSS category feed
    • Podcasts RSS category feed
    • Publications RSS category feed
    • Rants RSS category feed
    • Reviews RSS category feed
    • Thought of the Day RSS category feed
    • Training RSS category feed
    • Twitter RSS category feed
    • Video RSS category feed
  • Resources

    • Lee Brimelow
    • Matthew David
    • Abdul Qabiz
    • Darron Schall
    • Sas Jacobs
    • Jon Williams
    • Stefan Richter
    • Rich Tretola
    • Edwin van Rijkom
    • Francis Bourre
    • Ted Patrick
    • LordAlex Leon
    • Brajeshwar Oinam
    • Jonathan Kaye
    • Robert M. Hall
    • Marco Casario
    • Burak Kalayci
    • Branden Hall
    • Josh Tynjala
    • Serge Jespers

     
     

    Adobe Community Expert

    See my profile on LinkedIn



    Harz Ferienwohnung Suchmaschinenoptimierung Geschenkideen Harz Ferienwohnung Pagerank Webkatalog Webhosting