|
|
|||||
Topic, Sharing AS3 Classes | ||||||
| ||||||
You must register or log in to post a message.Since Hexicube was allowed to put up an AS2 class I should be able to shouldn't I? Anyway it is a class that will make Colouring in Flash Easier. i.e. the beginFill and other methods that use Colour ID's. I don't know whether it works tho. :P EasyColour.as This is Version 0.5 and 0.75 Coming Out Soon! I also have some levels on P4M I need you to evaluate(I dont like evaluating my own levels) [edit] my expander shows everything, if you create a multi-depth object for example it will show every single value try it out [re-edit] I did comment out 2 lines inside analyze(obj,depth,name) and forgot to uncomment, they show the value Anyways, what can possibly go wrong in the start function? The only mistake would be if you didn't give it a working reference to the stage object, and Flash would give you a runtime error involving the stage anyway if that happened, making it pretty clear what the problem was. [edit] Your expander class is very nice. It seems like a better, more descriptive version of the object toString method. void just doesnt make sense there is already undefined and null, also void causes problems in AS2(yes this is AS3 but JP used void in his AS2 BLLevels.as file and it annoyed me) also feedback on expander.as it basically returns a formatted list of every variable inside the object you put into beginAnalysis(obj,name) obj being the object(array,MC,or object) name being whatever you want, its not used for much also start should return a Boolean showing if it initialized properly com.geckojsc.Keys Usage: Keys.start(s:Stage):void must be called for the class to work. 's' must be a reference to the Flash stage object. Keys.pressed(keyCode:uint):Boolean returns true if the key has just been pressed. Keys.held(keyCode:uint):Boolean returns true if the key is held down. Keys.released(keyCode:uint):Boolean returns true if the key has just been released. The class is intended to be used in conjunction with ENTER_FRAME events - if you call it at the end of a frame, the 'pressed' and 'released' methods will not work. You can use the flash.ui.Keyboard class for a few keyCode constants, and for the rest you can use this keyCode reference/tool. Any suggestions for how I could improve the class? One tip I learned from watching John Resig is that you should always try to avoid adding unnecessary functions (especially public ones) to your libraries, because it means there is more for you to maintain and more for the users to learn. just create a function that returns the 'award' array, and another to store one...easy enough, right? cunitescore you checked my award manager? [edit] if you have I would like feedback plz :D I just found TweenLite, a faster alternative to Tweener. fully documented award manager system, not very advanced but cuts out some work if you plan on using it in multiple games... [edit] also has a feature to make awards 'hidden' when creating them hidden awards will return "Hidden Award" for the title, "?" for the worth, not be counted towards total award points, and show a 'hidden award' string for description...however once completed it acts like a normal award [re-edit] 2 errors I made: I said 'all 18 functions...' when there are 17 I said '(bad worth input in function 2)' when it should be function 1 A cryptography class is, um, a class that encrypts and decrypts strings. The collection has LZW, Base64, and many others. also what is a cryptography class? If you are still using AS2, I highly recommend downloading the free Flex SDK and FlashDevelop tools. There's a great tutorial on the FlashPunk site. AS3 SFXR is great tool for making video game sound effects. Use the interface to perfect your noise, then use the free SfxrSynth class to generate and play your sounds on the fly without importing any .wav files! Magic. Flixel and FlashPunk (thanks to JP for pointing them out) are both libraries which allow you to make sprite-based games easily by extending the base classes. Calista is a collection of cryptography classes. You will need a SVN client to download it though, or you could use the source browser to copy the files individually. Tweener will help you to move things around the stage smoothly using only code. Great when you're using Flex. | Flash game developmentFirst post of the topicIf you are still using AS2, I highly recommend downloading the free Flex SDK and FlashDevelop tools. There's a great tutorial on the FlashPunk site. AS3 SFXR is great tool for making video game sound effects. Use the interface to perfect your noise, then use the free SfxrSynth class to generate and play your sounds on the fly without importing any .wav files! Magic. Flixel and FlashPunk (thanks to JP for pointing them out) are both libraries which allow you to make sprite-based games easily by extending the base classes. Calista is a collection of cryptography classes. You will need a SVN client to download it though, or you could use the source browser to copy the files individually. Tweener will help you to move things around the stage smoothly using only code. Great when you're using Flex. |