I want to make a faked physics engine in As2 like Sonic or Fancy Pants. So far all I got is gravity, when you hit the floor you stop going down, move left and right, and when you hit a steep enough slope you can't go up it.
But what I am currently trying to do is make it so the player can go through loops, or go up upside-down ramps, like this: [url=http://i39.tinypic.com/2uti2d4.jpg]
it kind of looks like your "while" statement is going into an infinite loop and freezing up, unlike the "if" statement which runs every "frame", the "while" statement runs independently
trace it
onEnterFrame = function()
{ //initially true every frame... var whileBool:Boolean = true;
if(whileBool) { trace("If Active!" //make it false, and it still traces whileBool=false; } while(whileBool) { trace("While Active!" //make it false now, so it won't repeat whileBool=false; } }
giving up doesn't lead to success. Also you are working on a platform game which has it's own set of difficulties and are shooting for FPA which uses impressive coding in itself
I'd be happy to use flade if you could show me a way to make new objects in it without setting X Y coordinates, size, shape, color, all in the code.
I'd like to be able to make objects on the stage and have flade use those, but if that's not possible then flade / ape won't work fir me... also, does Box2d let you use curved terrain, or only boxes?
I don't normally code with as2 so I am unfamiliar with how flade and PPCD work
mightybob I'd like to be able to make objects on the stage and have flade use those, but if that's not possible then flade / ape won't work fir me... also, does Box2d let you use curved terrain, or only boxes?
as for as3 I would recommend using CDK, it fits the bill of exactly what you are saying, when you add the MovieClips to CDK it returns the angle of approach then you can make the appropriate calculations. =98247">HERE is Oneil's post as an example of how to use CDK. On top of the examples from code.google
joeybetz I code in AS3 as part of my career, but I've dabbled in few other languages over the years. I use FlashDevelop as my go to programming IDE for AS3. It's free (but you should totally donate) and it's awesome.
But that just loads my swf over-top of my current one, but I need it to stop the current swf, and replace it with the newly loaded one. Kinda like loadMovie in As2.
//CREATE MOVIE CLIP var clip:MovieClip=new MovieClip();
//CENTER IT TO STAGE clip.x=stage.stageWidth/2; clip.y = stage.stageHeight/2;
//LOAD THE SWF var loader:Loader=new Loader(); //ADD LOADER TO MOVIECLIP clip.addChild(loader); //THIS TOO... loader.load(new URLRequest("myfile.swf");
I guess i'm just not explaining it right, but I searched google for hours and came up with nothing I am looking for, I guess i'll give multiple scenes a shot.