Thnx for all these codes guys! They are rly helping me! but what the code for stop and starting music? this (i think) is the code to stop it. now how do you start it?
on (release) {
stopAllSounds();
}
Thnx for all these codes guys! They are rly helping me! but what the code for stop and starting music? this (i think) is the code to stop it. now how do you start it?
on (release) {
stopAllSounds();
}
i still have a problem. it still doesn't show the level. here's the code:
_root.lvl_warp_2._visible = false;
if (_root.warp_back_1.hitTest(_root._xmouse , _root._ymouse, true)) {
_root.lvl_warp_2._visible = true;
}
_root.lvl_warp_3._visible = false;
if (_root.warp_back_2.hitTest(_root._xmouse , _root._ymouse, true)) {
_root.lvl_warp_3._visible = true;
}
_root.lvl_warp_4._visible = false;
if (_root.warp_back_3.hitTest(_root._xmouse , _root._ymouse, true)) {
_root.lvl_warp_4._visible = true;
}
_root.lvl_warp_5._visible = false;
if (_root.warp_back_4.hitTest(_root._xmouse , _root._ymouse, true)) {
_root.lvl_warp_5._visible = true;
}
and here's the new code i put for the button that takes you back so you see the level.
on (rollOver) {
gotoAndPlay(6)
}
what's wrong?
still waiting on a reply here! i need help!
_root.lvl_warp_2._visible = false;
if (_root.warp_back_1.hitTest(_root._xmouse , _root._ymouse, true)) {
_root.lvl_warp_2._visible = true;
}
_root.lvl_warp_3._visible = false;
if (_root.warp_back_2.hitTest(_root._xmouse , _root._ymouse, true)) {
_root.lvl_warp_3._visible = true;
}
_root.lvl_warp_4._visible = false;
if (_root.warp_back_3.hitTest(_root._xmouse , _root._ymouse, true)) {
_root.lvl_warp_4._visible = true;
}
_root.lvl_warp_5._visible = false;
if (_root.warp_back_4.hitTest(_root._xmouse , _root._ymouse, true)) {
_root.lvl_warp_5._visible = true;
}
and here's the new code i put for the button that takes you back so you see the level.
on (rollOver) {
gotoAndPlay(6)
}
what's wrong?
Here's a pretty simple one I believe:
Switch way the character's facing by putting your mouse on the other side that they are currently facing,
like in Portal: The Flash Version
hey guys all of the hittests i use don't work. I use the ones that you see in all the tutorials and in the forums but they don't work. I have flash eaight, AS2. Flash 8 PROOO!!!
for the last frickin time, I NEED HELP! I want it so when you roll over another warp in another level, a level unlocks in the level select menu. here is the code i put down but is not working!!!
stop();
_root.lvl_warp_2._visible = false;
if (_root.warp_back_1.hitTest(_root._xmouse , _root._ymouse, true)) {
_root.lvl_warp_2._visible = true;
}
_root.lvl_warp_3._visible = false;
if (_root.warp_back_2.hitTest(_root._xmouse , _root._ymouse, true)) {
_root.lvl_warp_3._visible = true;
}
_root.lvl_warp_4._visible = false;
if (_root.warp_back_3.hitTest(_root._xmouse , _root._ymouse, true)) {
_root.lvl_warp_4._visible = true;
}
_root.lvl_warp_5._visible = false;
if (_root.warp_back_4.hitTest(_root._xmouse , _root._ymouse, true)) {
_root.lvl_warp_5._visible = true;
}
_root.lvl_warp_6._visible = false;
if (_root.warp_back_5.hitTest(_root._xmouse , _root._ymouse, true)) {
_root.lvl_warp_6._visible = true;
}
Mouse.show();
How Do You Make A Backround Move Infinitely like in Super mario broz Z ep. 6?
omg guyz I need helpz makin a mmorpg but Im a noob, can someone give me the code for making elfes and orcs attack eac oithur?
At 11/10/08 10:34 PM, Glaiel-Gamer wrote: omg guyz I need helpz makin a mmorpg but Im a noob, can someone give me the code for making elfes and orcs attack eac oithur?
I think i peed myself a little from laughing. :]
what
At 11/10/08 10:48 PM, K-Guare wrote:At 11/10/08 10:34 PM, Glaiel-Gamer wrote: omg guyz I need helpz makin a mmorpg but Im a noob, can someone give me the code for making elfes and orcs attack eac oithur?I think i peed myself a little from laughing. :]
oke i trieds that but my mmo isnt workng and now my pannts r wet
At 11/10/08 10:50 PM, Glaiel-Gamer wrote: oke i trieds that but my mmo isnt workng and now my pannts r wet
i know, u put de stop() at the beginning an now da rest of the code wont go till u put a play() scriptn00bzorz lulz i kno i rock :O
what
I'm trying to look for a code that when a movie clip touches another movie clip, the variable called "life" goes down. Can someone help me?
I am making a point and click game and i am new to flash..i have figured out all the codes for everything but inventory..i take that back..i have figured out the codes for finding hidden objects and having them appear in the inventory but that was just one room...Now i have created four rooms and some navigation buttons so the player can switch from room to room and find different objects in different rooms..problem is that i CANNOT figure out the code for the user to be able to find an object in one room, have it show up in the inventory and then switch rooms via the nav button and still have the piece of inventory that they found in the previous room still be in their inventory...also i want to make everything coincide with each other with the inventory so that when all five objects are found (in different rooms) that my code for the locked door will work....that is, that the door will be unlocked and take the player to final scene when all items are found..Please help....also if anyone knows any good sites for tutorials or templates for point and click games that would be appreciated...and also if anyone know some basic code for point and click games that require the player to combined inventory items and/ or be able to drag items to the screen from inventory(ie key to a door)...thanks a bunch
Can you please tell me what am I doing wrong?
onClipEvent (enterFrame) {
if (mouseDown) {
this.gun.gotoAndPlay(2);
}
if (mouseUp) {
this.gun.gotoAndPlay(1);
}
}
can u help me?:
How do u create a character and then make flash cut it out and post it somewhere else Example:
I make a dress up game. Then, you press a button and it will appear on a blank frame/
Anyone here know how to remove the Play/Zoom/Stop buttons when you right-click? And quality buttons.
root_cm = new ContextMenu();
root_cm.hideBuiltInItems();
_root.menu = root_cm;
root_cm.customItems.push(new ContextMenuItem("My Site", itemHandler));
function itemHandler(obj:Object, item:ContextMenuItem) {
getURL("WWW.SITEHERE.COM/", "_blank");
}
makes it so that you make your own right click menu where it says SITEHERE thats where you put a link so you dont have a blank right click menu
How do I make something go to a certain frame or prev/next frame by hitting a button?
hey i need help making a tower defence game
I'm sure this has been asked already but I'm not going to look through al the 285 pages so... how do I get a saving function for levels?
SoundCloud || YouTube || Facebook
PM me for constructive reviews, collaborations or commissions!
how would you make it so when your character runs over an object it disapeers and text box puts adds one number starting at zero too your money count also how would you make the text box displaying howmuch money yuo have stay at top left of the screen no matter where you goor what you do
At 12/19/06 09:44 PM, Axlenz-FlashElite wrote: Aww doenst work for some reason...
At 12/19/06 03:04 AM, West-End-Pro wrote: use the V-CAM and put:
onClipEvent(enterFrame){
this._x = player._x;
this._y = player._y;
}
an easier substitute for a v-can would be an api look in the first few pages of this topic for the code
sorry for triple post but hears some code and all i need is them too fix the ground hittesting cause it doesent work very well dont do anything else too it
ive got everything set up right but the ground hittest wont work help heer it is send it back when you can thanks onClipEvent(load){ _root.grav=0; _root.xmove=0; _root.attack=false; _root.airatk=false; } onClipEvent(enterFrame){ //CEILING SCRIPT while(_root.ceiling.hitTest(_x,_y-25,tru e)&&_root.grav<0){ _root.grav++; } //WALL SCRIPT while(_root.wall.hitTest(_x+117,_y,true)
&&_root.xmove>0){ _root.xmove--; } while(_root.wall.hitTest(_x-17,_y,true)&
&_root.xmove<0){ _root.xmove++; } //GRAVITY SCRIPT _root.grav+=1; this._y+=_root.grav; while(_root.ground.hitTest(_x,_y,true)){ _y--; _root.grav=0; } if(Key.isDown(Key.UP)&&_root.ground.hitT est(_x,_y+3,true)&&_root.attack==false){ _root.grav=-15; } if(_root.grav>15){ _root.grav=15; } //MOVEMENT SCRIPT this._x+=_root.xmove; if(Key.isDown(Key.LEFT)){ _root.xmove-=1.1; _xscale=-100; } if(Key.isDown(Key.RIGHT)){ _root.xmove+=1.1; _xscale=100; } if(!Key.isDown(Key.RIGHT)&&!Key.isDown(K ey.LEFT)&&_root.xmove>0){ _root.xmove-=2; } if(!Key.isDown(Key.RIGHT)&&!Key.isDown(K ey.LEFT)&&_root.xmove<0){ _root.xmove+=2; } if(_root.xmove>0&&_root.xmove<1.1||_root .xmove<0&&_root.xmove>-1.1){ _root.xmove=0; } if(_root.xmove>1&&_root.xmove<2&&!Key.is Down(Key.RIGHT)){ _root.xmove=0; } if(_root.xmove>10){ _root.xmove=10; } if(_root.xmove<-10){ _root.xmove=-10; } //DISPLAY SCRIPT if(!_root.xmove==0){ _root.attack=false; } if(_root.airatk==false&&!_root.ground.hi tTest(_x,_y+3,true)){ this.gotoAndStop(5); } if(!Key.isDown(Key.RIGHT)&&!Key.isDown(K ey.LEFT)&&!_root.xmove==0&&_root.ground.
hitTest(_x,_y+3,true)){ this.gotoAndStop(3); } if(!Key.isDown(Key.RIGHT)&&!Key.isDown(K ey.LEFT)&&_root.xmove==0&&!Key.isDown(65 )&&_root.attack==false&&_root.ground.hit Test(_x,_y+3,true)){ this.gotoAndStop(1); } if(_root.ground.hitTest(_x,_y+3,true)&&_
root.attack==false&&Key.isDown(Key.LEFT)
){ this.gotoAndStop(2); } if(_root.ground.hitTest(_x,_y+3,true)&&_
root.attack==false&&Key.isDown(Key.RIGHT )){ this.gotoAndStop(2); } //ATTACK SCRIPT if(Key.isDown(65)&&_root.xmove==0&&_root .ground.hitTest(_x,_y+3,true)){ this.gotoAndStop(4); _root.attack=true; } if(Key.isDown(65)&&!_root.ground.hitTest (_x,_y+3,true)){ this.gotoAndStop(6); _root.airatk=true; } if(!Key.isDown(65)){ _root.airatk=false; } } onClipEvent(enterFrame) { if(_root.player.hitTest(_root.portal)) { nextFrame() } } onClipEvent(enterFrame){ if (_root.this.hitTest(_root.ground){ (_x,_y,true)){ this.gotoAndStop(1); } }
errors fix please
Syntax error.hitTest(_x,_y+3,true)){ this.gotoAndStop(3); } if(!Key.isDown(Key.RIGHT)&&!Key.isDown(K ey.LEFT)&&_root.xmove==0&&!Key.isDown(65 )&&_root.attack==false&&_root.ground.hit Test(_x,_y+3,true)){ this.gotoAndStop(1); } if(_root.ground.hitTest(_x,_y+3,true)&&_
Statement must appear within on/onClipEvent handler&&_root.xmove>0){ _root.xmove--; } while(_root.wall.hitTest(_x-17,_y,true)&
Unexpected '&' encountered&_root.xmove<0){ _root.xmove++; } //GRAVITY SCRIPT _root.grav+=1; this._y+=_root.grav; while(_root.ground.hitTest(_x,_y,true)){ _y--; _root.grav=0; } if(Key.isDown(Key.UP)&&_root.ground.hitT est(_x,_y+3,true)&&_root.attack==false){ _root.grav=-15; } if(_root.grav>15){ _root.grav=15; } //MOVEMENT SCRIPT this._x+=_root.xmove; if(Key.isDown(Key.LEFT)){ _root.xmove-=1.1; _xscale=-100; } if(Key.isDown(Key.RIGHT)){ _root.xmove+=1.1; _xscale=100; } if(!Key.isDown(Key.RIGHT)&&!Key.isDown(K ey.LEFT)&&_root.xmove>0){ _root.xmove-=2; } if(!Key.isDown(Key.RIGHT)&&!Key.isDown(K ey.LEFT)&&_root.xmove<0){ _root.xmove+=2; } if(_root.xmove>0&&_root.xmove<1.1||_root .xmove<0&&_root.xmove>-1.1){ _root.xmove=0; } if(_root.xmove>1&&_root.xmove<2&&!Key.is Down(Key.RIGHT)){ _root.xmove=0; } if(_root.xmove>10){ _root.xmove=10; } if(_root.xmove<-10){ _root.xmove=-10; } //DISPLAY SCRIPT if(!_root.xmove==0){ _root.attack=false; } if(_root.airatk==false&&!_root.ground.hi tTest(_x,_y+3,true)){ this.gotoAndStop(5); } if(!Key.isDown(Key.RIGHT)&&!Key.isDown(K ey.LEFT)&&!_root.xmove==0&&_root.ground.
Unexpected '&&' encountered&&_root.xmove>0){ _root.xmove--; } while(_root.wall.hitTest(_x-17,_y,true)&
new to actionscript but i got some it down..i cant figure out how to make the guys stick to the ground though and when they jump to fall back down
hey guys, im trying to figure this out but ive hit a wall...im makeing a mario game to see how much i know of flash, my problem is that when mario jumps he lands on the floor without problems, but when he jumps he jumps through the pipes. here is the code i used:
onClipEvent (load) {
grav_y = 0;
jumping = false;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.UP) && !jumping) {
grav_y = 40;
jumping = true;
}
if (jumping == true) {
grav_y -= 5;
if (grav_y<=-10) {
grav_y = -15;
}
this._y -= grav_y;
}
if (_root.ground.hitTest(this._x, this._y+45, true)){
grav_y = 0;
jumping = false;
}
}
is there something i can add to the code to make mario land on top of the pipes as well? and if so, how? (i made the movie clip of the pipe and named it as pipe)
....I even made my own thread about this, but maybe one of you can help me here.
Here's the code:
man_walk();
}
function man_walk (Key): void {
switch (Key) {
case "LEFT" :
man._rotation = 270;
man._x -= 4;
man.gotoAndStop(2);
break;
case "RIGHT" :
man._rotation = 90;
man._x += 4;
man.gotoAndStop(2);
break;
case "UP" :
man._y -= 4;
man._rotation = 0;
man.gotoAndStop(2);
break;
case "DOWN" :
man._y += 4;
man._rotation = 180;
man.gotoAndStop(2);
break;
default:
break;
}
}
Im trying to make the code for movement of a character for an rpg game much easier to read by putting it into a switch method, only problem is that I need a keylistener, but I dont know how to put one in my code, and connect it back to the program for this code to work.
Again, all I'm doing is trying to make the code that makes a character move using WASD keys more simpler, but I dont know the Full Code or the exact way how. So, all I need is just some help....
And for God's sake, someone help me, lol! I've been on like 10 different forums, with almost no luck xD....thanks in advance. ~Devicer4321