![]() |
|
|||||
Topic, Help Me With ActionScript3 Topic | ||||||
| ||||||
You must register or log in to post a message.![]() BTW I like your game, it's like BB ![]() Build halted with errors (fcsh). ![]() ![]() ![]() var loader:Loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadingDone); var request:URLRequest = new URLRequest(bitmapFile); loader.load(request); } private function loadingDone(event:Event):void { *your image* = Bitmap(event.target.loader.content); } ![]() ![]() Is what I get And if I make it "embed" there is something wrong with the EmbedImageTutorial. If I make that embedImage...... it is also fault :( ![]() it's best you use flashdevelop, no plain text editors package { import flash.display.Bitmap; import flash.display.Sprite; /** * ... * @author Jp */ public class EmbedImageTutorial extends Sprite { [Embed(source = "ThunderBats.jpg")] public var myImage:Class; public function EmbedImageTutorial() { var imageCircle:Bitmap = new imageCircle(); imageCircle.x = 50; imageCircle.y = 25; addChild(imageCircle); } } } What's wrong, because it doesn't work, I have a JPG titled Thunderbats, but didn't help here :( ![]() BTW, Flex is for VERY EXPERIENCED developers and not 'newbies' like you. So get something like Flash CS5. I'm not trying to offend you, I'm trying to help you. manufan1. ![]() and one the fruit ![]() ![]() onClipEvent(enterFrame){ if(Key.isDown(Key.LEFT)){ this._x-=5; } if(Key.isDown(Key.RIGHT)){ this._x+=5; } if(Key.isDown(Key.UP)){ this._y-=5; } if(Key.isDown(Key.DOWN)){ this._y+=5; } if(character_mc hitTest(wall_mc){ gotoAndStop(2); } And On Frame Actions 1: stop(); Charcater on frame 2: Excatly same code disable the direction in which you would need to move to go through the wall. Frame Actions 1: stop(); Variable names should be character_mc for character and wall_mc for the wall. Hope this helps! Courtesy of manufan1. [edit] It's a game from above. You see the back of the bat, the top of the blocks (walls) [edit2] Could you tell me how to get that in AS? ![]() PS: walls could also be grey! | Flash game developmentFirst post of the topicHello people, I am learning AS3 these days, but I can't find any good "lessons". So I am asking you to link me some good sites or learn it me in chat or other alternatives, so I can make fun things with AS3 =). These things are what I need: All I want to make - A flying bat (wapping wings) - Fruit - Purple walls - Thunder Rules of all I want to make - The bat can't go through the walls - if bat picks fruit, it will disappear - Thunder can roast fruit, but NOT the bat |