Monster Racer Rush
Select between 5 monster racers, upgrade your monster skill and win the competition!
4.23 / 5.00 3,881 ViewsBuild and Base
Build most powerful forces, unleash hordes of monster and control your soldiers!
3.93 / 5.00 4,634 ViewsAt 4/16/10 05:36 AM, BaronVonBadGuy wrote: WE NEED MORE COWBELL$!
Cowbells time, everybody!
Well that was pretty neat! The audience was shit though..
At 4/11/10 06:19 AM, Roytheshort3 wrote: Firefox, Chrome, And A Peice Of Crap.
It's funny because IE is better than Chrome and Firefox combined.
Why are you bumping a 5 year old thread?
The letters on my keyboard are not responding when I hit them. All other keys do!
function downKeys2(event:KeyboardEvent){
trace("you pressed " + event.keyCode);
}
stage.addEventListener(KeyboardEvent.KEY_DOWN , downKeys2);
Why are the evil bosses smiling when the main character is sad? :(
Looks nice though, good luck!
There won't be any more posts better than the first three ones in this thread.
NG chat would be a good thing for that but it is a myth, so....
There are a few sites you can ask questions about Flash, but I've only seen ones where you have to pay in order to see the answer.
It won't even work if I simply do
var pushedButton:Number;
function keyz(event:KeyboardEvent){
if(event.keyCode==65){
pushedButton=1;
}
}
stage.addEventListener(KeyboardEvent.KEY_DOWN , keyz);
Why?
At 4/5/10 02:02 PM, milchreis wrote: typed variables
typed functions
semicolons
switch statements
use them, love them
The variable is typed, the semicolons are there, not sure what you mean by typed functions and switch statements? I tried using else by the way... But the problem is that the flash just wont even listen to my keyboard
Sorry if I'm being dumb
Some mozilla ad-dons could be slowing down the performance... Try updating your mozilla version to the newest one and also do the same with your flash player (but I doubt that is the reason of the lag)
do trace(enemyCount + ", " + maxEnemyCount + ", " +enemyInc);
instead of trace(enemyCount, maxEnemyCount, enemyInc);
trace is a command that shows something in an output window, it's a very handy dev tool for debugging, you can use it to check variables, coordinates, existence of smth, etc.
I know I know, I ask A LOT of questions. But anyway:
var pushedButton=1
function keyz(event:KeyboardEvent){
if(event.keyCode==65){
pushedButton=1}
if(event.keyCode==83){
pushedButton=2}
if(event.keyCode==68){
pushedButton=3}
if(event.keyCode==70){
pushedButton=4}
}
stage.addEventListener(KeyboardEvent.KEY_DOWN , keyz);
This doesn't work for some reason. The pushedButton var does not change. Does anyone know why?
At 4/5/10 09:33 AM, BasV wrote:At 4/5/10 09:18 AM, xKiRiLLx wrote: I have 3 objects on the stage, smil0, smil1 and smil2for (u=0; u<3; u++){
for (u=0; u<3; u++){
trace(###.x);
}
trace(this["smil" + u].x);
}
But I wouldn't recommend this method of doing it, it isn't neat. You should create these instances in your class manually and store them in an Array or Vector.
They are going to be stored in an Array, but I don't want to create them manually, so I'm going to use this. This would take much much less symbols ;) Thanks
I have 3 objects on the stage, smil0, smil1 and smil2
for (u=0; u<3; u++){
trace(###.x);
}
### should be "smil"+u, so it would be smil0, smil1 and smil2
But I don't know what to write in the ### place :|
Try compiling them in a program like Audacity and try importing then
At 4/4/10 03:02 PM, zrb wrote: You need to pass the Timeline to your class so you can access the timeline's properties and methods OR if your using a document class because your document class is your timeline.
Example, on your timeline:
var nextBubbles:Array = [];
var myClass:MyClassName = new MyClassName();
myClass.mainStage = this;
You could have a property "mainStage" in the class your writing and in the private function you could do this:
this.gotoAndStop(mainStage.nextBubbles[0 ]);
Be sure to make mainStage a public property so your timeline can access it.
It says:
1119: Access of possibly undefined property mainStage through a reference with static type Class.
What I've done is I wrote in the class:
public var mainStage
And on the timeline:
cl_ball_cursor.mainStage = this;
What did I do wrong?
P.S. The array is already set, and cl_ball_cursor is a MovieClip class, if that matters
At 4/4/10 03:03 PM, xKiRiLLx wrote: Thanks, but that doesn't work, because I forgot to say that I'm using AS3.
I addressed that to the guy who suggested _root, but didn't see the responses after that, lol.
Thanks, i'm going to try it out now.
Thanks, but that doesn't work, because I forgot to say that I'm using AS3.
Another stupid question from me. Say, I have a class and I have an array nextBubbles on the timeline.
In one of the class private functions (methods they are called, right?) I'm trying to do:
this.gotoAndStop(nextBubbles[0]);
But it won't let me because there's no such var in that class. So, how do I make it access the var from the stage?
Well, you could make it so...
var yourScore
var showScore
if(yourScore<10){
showScore="000000000"+yourScore}else
if(yourScore<100){
showScore="00000000"+yourScore}else
if(yourScore<1000){
showScore="0000000"+yourScore}
etc...?
At 4/4/10 01:48 PM, zrb wrote:
Thank you, works.
Is the sync set to Stream?
Tried using that code, you gave me, here's what it says
TypeError: Error #1006: addEventListener is not a function
at MethodInfo-221()
at flash.display::Sprite/constructChildren(
)
at flash.display::Sprite()
at flash.display::MovieClip()
at minig_fla::MainTimeline()
Thanks a lot everyone! Now this is much clearer ;)
At 4/4/10 12:27 PM, henke37 wrote: Both platform games and pacman requires physics. Sorry, but anything more advanced than pong will require some form of physics.
I assume he meant more complicated physics like the ones you see in Box2D powered games.
On topic, there are a lot of AS3 books to choose from, but if you want to focus on game development, you might want to look at this (first thing that came up when searching) Link right here
But I didn't use a book, so I can't really recommend.
Found my way around by using startDrag. But i'd like to understand what you've said about the ADDED_TO_STAGE thing... So could you please explain that to me ;)
I'm lost now. Can you explain what to do exactly please? I tried putting an ENTER_FRAME listener for the mouse to move into a function which is called by ADDED_TO_STAGE and it still gives me the error...
At 4/4/10 09:43 AM, BasV wrote:At 4/4/10 09:00 AM, xKiRiLLx wrote: I've found out that I can fix this problem by taking away the stage. in front of mouseX and mouseY in the mover function, but then the cursor behaves differently and isn't a cursor anymore!stage is only avaiable after the object has been added to the display list, before that it will be null which will result in an Error.
Any help appreciated, thanks.
Your argument 'Event' Does not make sense - in this way, you've defined an variable called 'Event' of type Object. You'll want something like : e:Event, which declares 'e' of type 'Event'.
private function mover(e:Event):void{
this.x = stage.mouseX
this.y = stage.mouseY
this.mouseEnabled = false
this.mouseChildren = false
}
It still gives me the same error...