Play the games, create the levels

Topic, Editor Project (AS2)

Checkout our iPhone & iPad games!

You must register or log in to post a message.

manufan 13 years ago
  Well, Birjo, you are right. But, in terms of checking whether one is wrong, would that be a "||" instead of "&&" or a whole new 'if' statement?

I think I've fixed the Add(); function, and if no-one wants it, that's fine, I'll just use it myself. :)
birjolaxew 13 years ago
  So, for now, it seems as if though you only added the blToString function, and the Delete function.

The blToString is nothing but the built-in array.toString() function... That's basically it.

The Delete function sets the passed movieclip to null, using the removeMovieClip function, and uses the built-in array.splice() function to remove it from the array... That's really great, but it's nothing more than two lines of code (without checking the variable types. When you're checking the variable types in the Delete function, you check whether they both are wrong, by the way. If one of them are wrong, but the other one is the expected type, it'll be accepted anyway.).

I know you're trying to help, but an editor is one of those few things that can't be made much easier. Not because it's easy, but because the editor has to be customized to the game, and the BonusLevel API already does a great job at making this possible.
manufan 13 years ago
  Editor Project (AS2)

I've been stumped with my Editor a long time now, and I thought I'd create a class to help me. But, I realised that this may be actually helpful, to most people, who need editors. The only function I have a problem with is the Add(); function.

Link:
Download: Editor [V.01].zip (AS2)

How does it work?
It works by extending BonusLevel's MyEditorManager.as and uses many functions to enhance the Editor.

Functions & Arguments:
There are four functions in this (one is a preloader which is optional, as many of JP's games have preloaders as well as the BonusLevel one) class which are:

blToString(ArrayName, JSON:Boolean);

ArrayName = The name of your Array, NOT in the String format.
JSON = A Boolean value, leave this, I'm still working on it.

Preload(Preloader:MovieClip, TotalWidth:Number);

Preloader = Your instance name of the MovieClip, NOT in the String format.
TotalWidth = The width of your Preloader MovieClip.

Add(ArrayName, Element:Number, ID:MovieClip, OldID:MovieClip, Type:Number);

ArrayName = See above.
Element = The Element of the Array (example: 0).
ID = The MovieClip you want to add.
OldID = The MovieClip you want to get rid of (if applicable).
Type = The type of Block, Player, Ball, in your Array (example: 1).

Delete(ArrayName, Element:Number, ID:MovieClip);

See above.

(Tip: In the Add function, implement a different type for "Element" and it will add the value at the bottom of the Array!)

I hope you find it easier to do things, and suggestions are welcome for V 0.2!

[1]

Flash game development

First post of the topic

manufan 13 years ago
  Editor Project (AS2)

I've been stumped with my Editor a long time now, and I thought I'd create a class to help me. But, I realised that this may be actually helpful, to most people, who need editors. The only function I have a problem with is the Add(); function.

Link:
Download: Editor [V.01].zip (AS2)

How does it work?
It works by extending BonusLevel's MyEditorManager.as and uses many functions to enhance the Editor.

Functions & Arguments:
There are four functions in this (one is a preloader which is optional, as many of JP's games have preloaders as well as the BonusLevel one) class which are:

blToString(ArrayName, JSON:Boolean);

ArrayName = The name of your Array, NOT in the String format.
JSON = A Boolean value, leave this, I'm still working on it.

Preload(Preloader:MovieClip, TotalWidth:Number);

Preloader = Your instance name of the MovieClip, NOT in the String format.
TotalWidth = The width of your Preloader MovieClip.

Add(ArrayName, Element:Number, ID:MovieClip, OldID:MovieClip, Type:Number);

ArrayName = See above.
Element = The Element of the Array (example: 0).
ID = The MovieClip you want to add.
OldID = The MovieClip you want to get rid of (if applicable).
Type = The type of Block, Player, Ball, in your Array (example: 1).

Delete(ArrayName, Element:Number, ID:MovieClip);

See above.

(Tip: In the Add function, implement a different type for "Element" and it will add the value at the bottom of the Array!)

I hope you find it easier to do things, and suggestions are welcome for V 0.2!
Our free flash games   Games for your site   Games for your iPhone   Contact   Twitter @jpsarda & @bonuslevelorg