Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > General > Gaming and Game Development

Reply
 
Thread Tools Rate Thread Display Modes
Old 11-03-2010, 11:40 PM   #1
theblues
Registered User
 
Join Date: Nov 2010
Posts: 2
Default [AS3] Error #1909 - can't run open source AS3 game

Hi everyone,

I'm trying to build and run this* open source Tetris game, I'm learning AS now and I'd like to play around with the source code. I've studied the code but it's no fun when you can't run your own changes.

I build it with "mxmlc Blox.as". It builds Blox.swf which I try to run with the Flash Debugger and get the following error message:

"TypeError: Error #1009: Não é possível acessar uma propriedade ou um método de uma referência de objeto nula.
at Blox()"

The package comes with source code files (.as), one pre-built .swf and a ".fla" file. I'm not familiar with .fla files but I'm guessing the error I'm getting is because I'm not including it when I build the program... how would I go about doing that? Or is it something else entirely?

Thanks everyone in advance!

Edit: I can't post links, but it's the tetris game found on richardlord.net and hosted on Google Code. Should be easy to find the code on google.

Last edited by theblues; 11-03-2010 at 11:43 PM.
theblues is offline   Reply With Quote
Old 11-04-2010, 01:09 AM   #2
Kritjon
Senior Member
 
Kritjon's Avatar
 
Join Date: Oct 2009
Location: Beijing, China
Posts: 244
Default

Probably when he posted all code it's a library what you're missing. Check the imports at the top of your Blox.as file. See if he's using an external library. If you're not sure, feel free to posts the imports here.
Kritjon is offline   Reply With Quote
Old 11-04-2010, 05:19 AM   #3
theblues
Registered User
 
Join Date: Nov 2010
Posts: 2
Default

Quote:
Originally Posted by Kritjon View Post
Probably when he posted all code it's a library what you're missing. Check the imports at the top of your Blox.as file. See if he's using an external library. If you're not sure, feel free to posts the imports here.
First of all, thanks for the help.

The imports are standard stuff:

Code:
    import uk.co.bigroom.tetris.Controller;
    import uk.co.bigroom.tetris.TetrisEvent;
    
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.text.TextField;
(uk.co.bigroom.tetris is included with the package).

In fact, here's how the package is structured:
Code:
Blox.swf (pre-compiled binary)
Blox.fla
docs/*
src/Blox.as (and other .as files)
src/uk/co/bigroom/tetris/*.as
src/uk/co/bigroom/input/*.as
I build it with "cd src; mxmlc Blox.as".

I noticed the Blox.fla file in the toplevel dir is completely ignored as I build or run my own Blox.swf, and I'm thinking that could be the source of my problem (the Blox.fla includes graphics and sound resources for the game). How would I go about building the project including this file?

Like I mentioned in the OP, the source code for the program I'm trying to build can be found at "code.google.com/p/bigroom/wiki/TetrisGameEngine".

Appreciate the help!
theblues is offline   Reply With Quote
Old 11-04-2010, 05:49 AM   #4
Kritjon
Senior Member
 
Kritjon's Avatar
 
Join Date: Oct 2009
Location: Beijing, China
Posts: 244
Default

Hey Theblues,

Now I downloaded the code and I suppose the problem is that you are probably using Flex. Unfortunately I am not that familiar with Flex.

I tried it in Flash (just opening the .fla file and press control+enter / control + shift + enter for debug). Works fine there.

Hope you can work your way around this problem.
Kritjon is offline   Reply With Quote
Reply


Thread Tools
Display Modes 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. The time now is 04:18 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.