Its close, you do need to have a UIComponent wrapper to add the Sprite
to, and then add the UIComponent to the application.

 

So what you had there (but make sure you actually do new UIComponent() )

 

And finish with addChild(uic);

 

Gk.

Gregor Kiddie
Senior Developer
INPS

Tel:       01382 564343

Registered address: The Bread Factory, 1a Broughton Street, London SW8
3QJ

Registered Number: 1788577

Registered in the UK

Visit our Internet Web site at www.inps.co.uk
<blocked::http://www.inps.co.uk/> 

The information in this internet email is confidential and is intended
solely for the addressee. Access, copying or re-use of information in it
by anyone else is not authorised. Any views or opinions presented are
solely those of the author and do not necessarily represent those of
INPS or any of its affiliates. If you are not the intended recipient
please contact is.helpd...@inps.co.uk

________________________________

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of annelie2008
Sent: 29 January 2009 14:27
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: newbie question - call to actionscript class

 

I tried addChild(notes); but that threw an error (Error #1034: Type 
Coercion failed: cannot convert test::drawno...@7218ca1 to 
mx.core.IUIComponent.). I googled a bit and it seems like you have to 
make it into a UIComponent first. I tried this:

var uic:UIComponent = new UIComponent;
uic.addChild(notes);

This doesn't do anything though, so maybe my actionscript code is 
wrong. I thought notes would be a Sprite, but maybe I need to do 
something more? Here's the actionscript class:



Reply via email to