Hey mike, 

I received your posts after I posted that. Thanks for the info though.
very helpful. It's difficult starting to understand the change from a
movieclip-based view architecture where I would create classes that
push to a view and now this architecture. 

Baby steps...

--- In [email protected], "Michael Schmalle"
<[EMAIL PROTECTED]> wrote:
>
> > danfrap767
> 
> Have you been reading my posts? From the thread it dosn't look like
you are
> seeing them or something.
> 
> You need to create a skin class from ProgrammaticSkin.
> 
> Subclass it.
> 
> Peace, Mike
> 
> 
> On 8/11/06, danfrap767 <[EMAIL PROTECTED]> wrote:
> >
> >   I thought so too, as it even says in the addChild for a Canvas
> > documentation that it takes a display object.
> >
> > but for some reason when I test and after attaching the canvas I then
> > attach the sprite I still get that same error:
> >
> >
> > "TypeError: Error #1034: Type Coercion failed: cannot convert
> > flash.display::[EMAIL PROTECTED] to mx.core.IUIComponent."
> >
> > Why would it try to convert that?
> >
> > this is the bit of code from the function , and the drawn bg and the
> > button show up totally fine.
> >
> > contentBg = new Canvas();
> > contentBg.graphics.beginFill(0xFF0000);
> > contentBg.graphics.lineStyle(2, 0xFFFFFF);
> >
> > contentBg.graphics.drawRoundRect(0, 0, 150, 400, 10, 10);
> > contentBg.graphics.endFill();
> > addChild(contentBg);
> >
> > changeButton = new Button();
> > changeButton.label = returnData.buttons.button.label;
> > changeButton.move(30, 30);
> > changeButton.addEventListener(MouseEvent.CLICK, someFunction);
> > contentBg.addChild(changeButton);
> >
> > mySprite = new Sprite();
> > mySprite.graphics.beginFill(0xFFFFFF);
> > mySprite.graphics.drawRoundRect(300, 0, 150, 400, 10, 10);
> > mySprite.graphics.endFill();
> > contentBg.addChild(mySprite);
> >
> > any ideas?
> >
> >
> > --- In [email protected] <flexcoders%40yahoogroups.com>,
> > "dadrobson" <jim.robson@> wrote:
> > >
> > > You should be able to use Canvas.addChild(Sprite), because it
takes a
> > > DisplayObject, and Sprite does exted DisplayObject.
> > >
> > > I don't have time to test it right now, but based on the inheritance
> > > outlined in the docs, it looks like it should work. I'll try to
run a
> > > test later; meanwhile, if you have a chance to test it, please
let me
> > > know what you learn.
> > >
> > > -Jim
> > >
> >
> >  
> >
> 
> 
> 
> -- 
> What goes up, does come down.
>







--
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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to