Easier if your run.as is just a class. This is how I do that (notice the applicationComplete in the mx:Application tag - it calls the init() function): <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" applicationComplete="init()" backgroundColor="0xFFFFFF"> <mx:Script> <![CDATA[ import src.DrawCircle; //import an Actionscript class private function init():void { var circle:DrawCircle = new DrawCircle(20, 20, 50); } ]]> </mx:Script> </mx:Application>
Jason Merrill Bank of America L&LD GT&O eTools & Multimedia Research & Development ________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Enrico Hofmann Sent: Saturday, December 08, 2007 8:47 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] flex newbie hi i am new to flex, i include an "run.as" in my mx:script tag so like <mx:Script source="run.as"> how can i set the application that it runs after the application is loaded? i allready include in the Windowed Applcation part an applicationComplete(callmyFunction()) but i get for all components that this is an null object.... whats going wrong using flex3 beta and this is an air application regards enrico hofmann