Alex, thanks, but changing to your code suggestion, I still get an
error,
Main Thread (Suspended: ReferenceError: Error #1069: Property host not
found on MyTestApplication and there is no default value.)
and I think it is because EntryClass.main() gets called on the event
applicationComplete, so the id for the UICompoenent does not exist yet,
since it is further down the MXML. Chicken and egg thing, and not sure
how to fix?
Jason Merrill
Bank of America
GT&O Learning & Leadership Development
eTools & Multimedia Team
________________________________
From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of Alex Harui
Sent: Wednesday, September 19, 2007 2:51 PM
To: [email protected]
Subject: RE: [flexcoders] Actionscript sprite within the Flex
framework
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> "
layout="absolute"
applicationComplete="EntryClass.main()">
<mx:UIComponent id="host" />
</mx:Application>
public static function main():void
> {
> var testSprite:TestSprite = new TestSprite(12,
> 100, 100);
> var host:UIComponent =
> Application.application.host;
> host.addChild(testSprite);
>
Recent Activity
*
81
New Members
<http://groups.yahoo.com/group/flexcoders/members;_ylc=X3oDMTJnOHFiam5xB
F9TAzk3MzU5NzE0BGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRzZWMDdnRsB
HNsawN2bWJycwRzdGltZQMxMTkwMjI3OTQw>
Visit Your Group
<http://groups.yahoo.com/group/flexcoders;_ylc=X3oDMTJmZzh2b2tyBF9TAzk3M
zU5NzE0BGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRzZWMDdnRsBHNsawN2Z
2hwBHN0aW1lAzExOTAyMjc5NDA->
Yahoo! Finance
It's Now Personal
<http://us.ard.yahoo.com/SIG=12j8rkb7g/M=493064.10729649.11333340.867457
8/D=groups/S=1705007207:NC/Y=YAHOO/EXP=1190235140/A=4507179/R=0/SIG=12de
4rskk/*http://us.rd.yahoo.com/evt=50284/*http://finance.yahoo.com/person
al-finance>
Guides, news,
advice & more.
Need traffic?
Drive customers
<http://us.ard.yahoo.com/SIG=12j76kc6d/M=493064.10729656.11333347.867457
8/D=groups/S=1705007207:NC/Y=YAHOO/EXP=1190235140/A=3848644/R=0/SIG=131l
83flq/*http://searchmarketing.yahoo.com/arp/srchv2.php?o=US2006&cmp=Yaho
o&ctv=Groups5&s=Y&s2=&s3=&b=50>
With search ads
on Yahoo!
Popular Y! Groups
Is your group one?
<http://us.ard.yahoo.com/SIG=12jmha3at/M=493064.11127061.11695037.867457
8/D=groups/S=1705007207:NC/Y=YAHOO/EXP=1190235140/A=4763761/R=0/SIG=11ou
7otip/*http://advision.webevents.yahoo.com/bestofyahoogroups/>
Check it out and
see.
.
<http://geo.yahoo.com/serv?s=97359714/grpId=12286167/grpspId=1705007207/
msgId=87768/stime=1190227940/nc1=4507179/nc2=3848644/nc3=4763761>