I've read through that post as well, seems we're following the same steps! Hmmm, tried it with a couple different variations, still no luck. I changed import mx.controls.Button to import fl.controls.Button and that got rid of multiple null reference run-time errors, but there's absolutely nothing on the stage. At least there are no errors at this point.
On Wed, Apr 9, 2008 at 4:00 PM, Glen Pike <[EMAIL PROTECTED]> wrote: > > You should be able to import the component, create it using new and then > add it > > > http://filt3r.free.fr/index.php/2007/08/11/28-using-flex-3-component-without-mxml-only-as3 > > You may need the "intrinsic" or other classes to compile against and this > is for Flex, so for Flash you may be importing different components. > > Simple example: > > package > { > import mx.controls.Button; > > > public class Main extends Application > { > private var btn:Button; > > public function Main():void > { > > addEventListener(Event.ADDED_TO_STAGE, onAddedToStage); > } > > private function onAddedToStage(event:Event):void { > btn = new Button(); > > addChild(btn); > } > } > } > > > Schell wrote: > Thank you Glen. I have seen this post before and I've added my swc's > to the library path. I'm a little lost on the next step. How can I > take advantage of the Button class now? I've had no luck. > > On Wed, Apr 9, 2008 at 3:20 PM, Glen Pike <[EMAIL PROTECTED]> wrote: > > > > http://noahlittle.wordpress.com/2007/09/09/flex-and-actionscript-3-with-textmate-and-fcsh/ > > > > > Glen Pike > 01736 759321 > www.glenpike.co.uk > _______________________________________________ > osflash mailing list > [email protected] > http://osflash.org/mailman/listinfo/osflash_osflash.org > > > > _______________________________________________ > osflash mailing list > [email protected] > http://osflash.org/mailman/listinfo/osflash_osflash.org > > > > > > -- > > > Glen Pike > 01736 759321 > www.glenpike.co.uk > _______________________________________________ > osflash mailing list > [email protected] > http://osflash.org/mailman/listinfo/osflash_osflash.org > > -- Schell Scivally 600 Santa Rosa Ave. Santa Rosa, CA 95404 [EMAIL PROTECTED] http://blog.efnx.com _______________________________________________ osflash mailing list [email protected] http://osflash.org/mailman/listinfo/osflash_osflash.org
