Go Back   CodingForums.com > :: Client side development > Flash & ActionScript

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-13-2012, 03:55 PM   PM User | #1
Sylvain_
New Coder

 
Join Date: Apr 2012
Posts: 14
Thanks: 2
Thanked 0 Times in 0 Posts
Sylvain_ is an unknown quantity at this point
AS 3: Error 1009

In a little game I have to make for college I render a menu at runtime, using movieclips i made of buttons i drawed in illustrator. I imported the illustrator file in flash professional like I always do, and made a AS linkage like I do with my other movieclips that run fine. But when I try to render these buttons I get a error 1009, a null reference. I use AS3 by the way.

Code:
private function initMenuComponents():void{
        var btnPlay:MovieClip = new Play();
        var btnOptions:MovieClip = new Options();
        var btnLikeOnFacebook:MovieClip = new LikeOnFacebook();
        var btnShareOnFacebook:MovieClip = new ShareOnFacebook();

        btnPlay.x = (stage.stageWidth / 2) - (btnPlay.width / 2);
        btnOptions.x = (stage.stageWidth / 2) - (btnOptions.width / 2);
        btnLikeOnFacebook.x = (stage.stageWidth / 2) - (btnLikeOnFacebook.width / 2);
        btnShareOnFacebook.x = (stage.stageWidth / 2) - (btnShareOnFacebook.width / 2);

        btnPlay.y = 100;
        btnOptions.y = 150;
        btnLikeOnFacebook.y = 200;
        btnShareOnFacebook.y = 250;

        stage.addChild(btnPlay);
        stage.addChild(btnOptions);
        stage.addChild(btnLikeOnFacebook);
        stage.addChild(btnShareOnFacebook);
Sylvain_ is offline   Reply With Quote
Reply

Bookmarks

Tags
as3, error 1009, null reference

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:41 PM.


Advertisement
Log in to turn off these ads.