View Single Post
  #1  
Old 05-16-2008, 07:47 PM
Robin Robin is offline
The secret of NIMH
Robin's Avatar
Join Date: Apr 2005
Location: Wales, UK
Posts: 515
Robin will become famous soon enough
Send a message via AIM to Robin
AS3 Graal NW Level Loader

So I was messing around in flash the other day, and decided it'd be fun to make a class that would load a NW file and display it by drawing it to a BitmapData object.

Here's an example of use:

PHP Code:
import Level;

// the new Tileset(0,0) bit below, is pics1.png in the Library, with Linkages set up to allow script access.
var glevel = new Level(new Tileset(0,0));
glevel.addEventListener(Event.COMPLETEgot_level);

// can also be a relative url
glevel.load("http://gscriptdef.graalstudios.com/mylevel.nw");

function 
got_level(event) {
    
addChild(new Bitmap(glevel.render()));

And attatched is the Class, and screenies
Attached Thumbnails
Click image for larger version

Name:	Picture 24.png
Views:	313
Size:	251.3 KB
ID:	44636  
Attached Files
File Type: zip Level.as.zip (1.4 KB, 200 views)
__________________

Reply With Quote