The Enchanted Cave 2
Delve into a strange cave with a seemingly endless supply of treasure, strategically choos
4.38 / 5.00 36,385 ViewsGhostbusters B.I.P.
COMPLETE edition of the interactive "choose next panel" comic
4.07 / 5.00 13,902 ViewsSadly, I have an alt account just for voting power. I like level 1 fab.
No thats changing a class from a fla. I want to change the fla from the class.
At 10/1/10 04:00 PM, zrb wrote:At 10/1/10 03:34 PM, lron wrote: I think that would be easier, and the fact that AS3 can't change variables in the fla is strangeI don't quite get what you mean, AS3 can let you change any variable you define, regardless if its in the fla or a class file, you might just be doing it wrong.
You can change a variable in the fla from the class? Thats what i'm asking. Please tell.
At 10/1/10 12:01 AM, onezerothrice wrote:At 9/30/10 10:13 PM, lron wrote:At 9/30/10 09:03 PM, onezerothrice wrote: Helpful!More writing
All your variables should be in external classes? That seems a bit inconvenient for games. My plan was making classes for velocity and slope and other such things, so I can create games from one class hub. Then I can edit the variables in the fla so they conform to my needs. For example:
Game 1: I want a slower character, so I edit the "speed" variable in the fla and the class immediately interprets it, does the math and passes the variable back out to the fla.
Game 2: I want a much faster character so I simple make a new speed variable in the fla and the class interprets it and passes the variable to the fla. This way I don't have to edit my class every time I need to change the speed of one game.
I think that would be easier, and the fact that AS3 can't change variables in the fla is strange, I thought it would have more flexibility than that.
Thanks for the help though.
At 9/30/10 10:02 PM, IncendiaryProduction wrote:At 9/30/10 09:57 PM, Metal-Loving-Medic wrote: Here I state my belief and disregard any-one elses.I attempted to be clever in imposing my beliefs onto others, while disregarding the quoter's belief
Here is an unproven statement saying it is true.
I fixed both of you.
At 9/30/10 09:03 PM, onezerothrice wrote: Helpful!
I see. Thanks for the tip, i'll definately be using this. But it still does not resolve original issue. How do I set a variable in the fla from a class, in relation to first post.
At 9/30/10 03:47 AM, Redshift wrote: For starters, why are you adding a listener to its self, ever single frame?
...
It's not like that in the real code I just threw it in there so people wouldn't scream "WHERES THE LISTENER YO!" But yeah thats a mistake. The code that I need help with is in the class.
Hey everybody, I made a topic a few days ago on the proper way to detect key input and it was solved, so I've been moving along moving my work into AS3 from AS2 and I ran into a problem. Right now I have a class that is called 'velocityFunctions' and inside that I have a function named velocityLimit. Here is the code for the function.
public function velocityLimit (velX:Number, velY:Number, velLimit:Number)
{
if(velX > velLimit && velX > 1)
{
velX = velLimit;
}
if(velX < -velLimit && velX < 1)
{
velX = -velLimit;
}
if(velY > velLimit && velY > 1)
{
velY = velLimit;
}
if(velY < -velLimit && velY < 1)
{
velY = -velLimit;
}
trace("Is running");
}
I'm guessing if you know anything about AS3 you should be able to figure out what I'm doing. Here is the code in the fla.
function frameEnter(event:Event)
{
var velocityLimit:Number = 4;
var velocityX:Number = 0;
var velocityY:Number = 0;
addEventListener(Event.ENTER_FRAME, frameEnter);
velocityFunctionsFla.velocityLimit(velocityX, velocityY, velocityLimit);
}
Then in other segments I have listeners for keys that increase the velocityX and velocityY. Anyway my point is that velocityLimit function isn't keeping the velocity at 4. I need a way to return the lines inside the if statement in the class.
velX = -velLimit;
I need to set velocityX inside the fla to the -velLimit, not velX. And no, I tried putting in
velocityX = -velLimit;
It didn't work.
Hopefully someone can help.
Asking for a programmer to make a multiplayer game with no prior examples from you. To make it worse you limit it to AS2?!
You do know to play on multiplayer games you need a server, that costs monthly money.
Good luck.
Is mayonnaise an instrument?
At 9/28/10 07:34 PM, Tateos wrote: I remember when people played this game.
Come on, lets all get on. For old times sake. Not the shitty NG server. /en, /room NGBBS.
This. I'm playing in /en /NGBBS right now.
I was in the NG server today and asked someone, "Don't you think you should take this game a bit less seriously?" And nearly the entire god damn room ignored me. :(
Fuck the NG server, i'm staying in /en /NGBBS, come on guys,
At 9/26/10 07:11 PM, dbigboy wrote: Where do i put the x+=1s codes?
Lemme try this again.
onClipEvent(enterFrame)
{
while(_root.rightWall.hitTest(_root.player._x, _root.player._y, true))
{
_root.player._x-= .1;
}
}
onClipEvent(enterFrame)
{
while(_root.leftWall.hitTest(_root.player._x, _root.player._y, true))
{
_root.player._x+= .1;
}
}
Copy each of those onto the frame, and repace the player and rightWall and leftWall.
Cheers.
At 9/25/10 05:55 PM, MrStaticGamer wrote: Put this code in your wall and replace "player" with your character instance name:
onClipEvent(enterFrame){
if(this.hitTest(_root.player)){
_root.player._y-=9;
}
}
No, don't use that. If your in AS2 (Which I do not promote) You have to use a while statement. Use this for the right wall.
onClipEvent(enterFrame)
{
while(_root.rightWall.hitTest(_root.player._x, _root.player._y, true))
{
_root.player._x-= .1;
}
}
Put this code on the frame and replace rightWall with your rightwall name, and copy + paste it with the same things but rightWall as your leftWall instance name. And for your leftWall code replace...
_root.player._x-=.1;
With...
_root.player._x+=.1;
Solved! Also to Callum, I know it had to be "==" I just was writing down my ideas real fast. The problem was, I was putting the if statement in the wrong place, I had to put the if statement inside the checkKeysDown function. Heres the code that worked.
import flash.events.KeyboardEvent;
import flash.ui.Keyboard;
stage.addEventListener ( KeyboardEvent.KEY_DOWN, checkKeysDown);
function checkKeysDown(event:KeyboardEvent):void
{
trace("You pressed key: "+event.keyCode);
if(event.keyCode == 87)
{
trace("W Key");
}
}
At 9/26/10 03:48 PM, milchreis wrote: check for equality with one of these constants http://www.adobe.com/livedocs/flash/9.0/
ActionScriptLangRefV3/flash/ui/Keyboard.
html
I know all the KeyCode numbers, I have a checker for that.
trace("You pressed key: "+event.keyCode);
Bu how would I check for equality?
if(event.keyCode = 23)
{
//bla
}
That doesn't work.
Recently I've been using AS3 more and more, and I wanted to get the most efficient way to use Key Events in AS3. I am aware of AS3: Main, and the tutorials it has, such as...
http://www.newgrounds.com/bbs/topic/7738 68
But, that is basically making a long way of reverting back to AS2 ways. Does anyone know the "proper" way of using Key Events in AS3? So far I have this...
import flash.events.KeyboardEvent;
import flash.ui.Keyboard;
stage.addEventListener ( KeyboardEvent.KEY_DOWN, checkKeysDown);
function checkKeysDown(event:KeyboardEvent):void
{
trace(event.keyCode);
if(event.keyCode)
{
trace("Keyispressed");
}
}
What I want to do is just to somehow put () right after this part of the code to tell it what key I want it to look for, but it gives me errors...
if(event.keyCode)
Can anyone shed some light on this?
I'm reading the reviews... This one is "verified buyer"
"I sold my house to buy this hot air balloon and it is the greatest thing in the history of forever. I live out of this thing and its the best decision I ever made! Sure my wife left me and took the kids ruling me an unfit father because, "Children shouldn't live in a hot air balloon," but who cares? This thing will make all your dreams come true!"
Wat?
Well I'm in the NGBBS room in the NG game. I got a few others with me. Join us!
At 9/21/10 04:37 PM, NoxDexus wrote:At 9/21/10 04:30 PM, blazeyy wrote: ayy guys.i agree
Why aren't we playing in the NG one? And no we don't share a server with kong. They are all coming to NG because we don't have custom maps. If you want to stay away from them just go to /room NGBBS in the NG one.
At 9/20/10 01:38 AM, Neoncouch wrote:At 9/20/10 01:33 AM, lron wrote: No. It doesn't. Everyone on Newgrounds knows what /b/ is. Stop pretending like your in a secret fight club or something and deal with it.First off, Everyone? I doubt it. Secondly, U mad?
Trololololol
Not really.
At 9/20/10 01:31 AM, Neoncouch wrote:At 9/20/10 01:22 AM, lron wrote:It applies to anything /b/ related.At 9/20/10 01:21 AM, Neoncouch wrote: First rule: NEVER talk about /b/Only applies to raids.
Idiot
Idiot
Idiot
No. It doesn't. Everyone on Newgrounds knows what /b/ is. Stop pretending like your in a secret fight club or something and deal with it.
At 9/20/10 01:21 AM, Neoncouch wrote: First rule: NEVER talk about /b/
Idiot
Only applies to raids.
Idiot
*Shows penis*
At 9/19/10 01:04 AM, copteroftehrofls wrote: Just found this one, the games are actually pretty fun though haha
So... Many... Wasted... Hours...
I played winterbells too much.
At 9/14/10 11:54 PM, RageVI wrote: We already hit 1,000,000 threads a little while ago because of the mod forums
You and your secret clubs!
I'm in. We need more people.
Fixed, sorry cache problem. Someone can lock this if you want.
Is it just me that the flash portal and main page are down? On Chrome, Firefox beta, and Firefox 3.0, for me.
Tigrounette is in here! (Game Creator)
./room 1
At 9/9/10 12:15 AM, GreyW0Lf wrote:At 9/8/10 10:49 PM, ChopstickClock wrote:You need 40 more to get to Level 14. The next Grounds Gold day begins in 23 hours, 47 minutes, and 47 seconds., just wait and it will be HAMMER TIME!
A razorblade? I'll just hit you with the opposite side of my stick.