Graal Forums  

Go Back   Graal Forums > Development Forums > Level Design
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


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 +2. The time now is 09:30 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.