The Enchanted Cave 2
Delve into a strange cave with a seemingly endless supply of treasure, strategically choos
4.39 / 5.00 38,635 ViewsGhostbusters B.I.P.
COMPLETE edition of the interactive "choose next panel" comic
4.09 / 5.00 15,161 ViewsYou don't need multiple event listeners. Just check for each key within the same listener, but on different lines.
okay well i tried this
var shift:Boolean = false;
var up:Boolean = false;
stage.addEventListener(KeyboardEvent.KEY_DOWN, sdown);
function down(event:KeyboardEvent)
{
if (event.keyCode == 16)
{
shift == true;
}
else
{
shift == false;
}
if (event.keyCode == 38)
{
up == true;
}
else
{
shift == false;
}
if (shift == true && up == true)
{
trace("it works");
}
}
and still no trace...
There is no possible way that if-statement can ever be evaluated to true.
So I don't have the time to actually write out to code and make sure it works or not, but i'm thinking i could do something along these lines..
var shift: Boolean = false;
var up: Boolean = false;
var frameNumber: Number = 1;
stage.addEventListener(KeyboardEvent.KEY_DOWN, shiftdown);
function shiftdown (event:KeyboardEvent)
{
if(event.keyCode == Keyboard.SHIFT)
{
shift == true;
updown();
}
else
{
shift == false;
}
}
stage.addEventListiner(KeyboardEvent.KEY_DOWN, updown);
function updown(event:KeyBoardEvent)
{
if(event.keyCode == Keyboard.UP)
{
up == true;
}
else
{
up == false;
}
if(shift == true; && up == true;)
{
framenumber ++;
}
}
i just wrote this on the fly and haven't had a chance to really look at it and check it, and i'm not really in front of a computer so that i can do so. but would something more along those lines work?
That's impossible. I have a key manager class that you can use, otherwise you have to store that one key has been pressed and check later.
I don't really understand what classes are and i also don't fully understand the class you linked.
i'm extremely mediocre and really just trying to get used to things.
if you could explain to me in a little more detail why this is impossible, and what to do with the one you link, I'd appreciate it.
stage.addEventListener(KeyboardEvent.KEY_UP, changeframe);
function changeframe(ev:KeyboardEvent)
{
if (ev.keyCode == Keyboard.SHIFT && ev.keyCode == Keyboard.UP)
{
if (framenumber >= 10 )
{
framenumber = 0;
}
framenumber += 1;
actionFrame.gotoAndStop(framenumber);
trace(framenumber);
FrameNumber.text = String(framenumber);
}
so.. absolutely nothing happens what so ever.
the trace doesn't return anything, so i'm not sure what the issue is.
sorry for blowing up flash forum, but i'm just trying to learn.
What you need to be doing is assigning FrameNumber.text last; after any possibility of framenumber changing.
This is what I now have, which works perfectly:
{
if (framenumber >= 10 )
{
framenumber = 0;
}
framenumber += 1;
actionFrame.gotoAndStop(framenumber);
trace(framenumber);
FrameNumber.text = String(framenumber);
}
and
{
if (framenumber <= 1 )
{
framenumber = 11;
}
framenumber -= 1;
actionFrame.gotoAndStop(framenumber);
trace(framenumber);
FrameNumber.text = String(framenumber);
}
But, just so i understand what you're saying and don't make the same mistake again, is that the order of statements were wrong because the program is read from the top down.
so by having the text updated in the middle of the function, it was updating at the wrong time. Right?
It is being set as 10, and then you're subtracting it by 1, giving you 9:
I changed it to:
if (framenumber <= 1 )
{
framenumber = 11;
}
You're getting 2 because you're setting the variable to 1, and then adding 1.
and:
if (framenumber >= 10 )
{
framenumber = 0;
}
trace(framenumber);
Which works better, but you'll notice that if you start at 1 and try to go down one, it will set to 0.
and if you down one more from 0 it will then set to 10, but after trying to go up one (which should set back to 1) sets to 11.
.SWF:
http://www.newgrounds.com/dump/item/4473119edcaa687d6030ecadd7ac05eb
shit, i meant: http://www.newgrounds.com/dump/item/6bb870792f81dc3460cd7bff19ba7e8e
Sorry, here's the link to the .swf.
http://www.newgrounds.com/dump/item/6bb870792f81dc3460cd7bff19ba7e8e">http://www.newgrounds.com/dump/item/6bb870792f81dc3460cd7bff19ba7e8e
It goes to 9 because 0 is a number.
but 0 is < 1, so shouldn't it go to 10?
When you click it goes to zero first and changes frame number to 10. Then when you click again. frame number goes down to 9 then you display the text. Change framenumber = 10 to framenumber = 11 to fix your issue.
This is what i have now:
import flash.events.MouseEvent;
var framenumber:Number = 1;
FrameNumber.text = String(framenumber);
up.addEventListener(MouseEvent.CLICK, upaction);
function upaction(ev:MouseEvent)
{
framenumber += 1;
FrameNumber.text = String(framenumber);
actionFrame.gotoAndStop(framenumber);
if (framenumber > 10 )
{
framenumber = 1 ;
}
trace(framenumber);
}
up2.addEventListener(MouseEvent.CLICK, upaction);
down.addEventListener(MouseEvent.CLICK, downaction);
function downaction(ev:MouseEvent)
{
framenumber -= 1;
FrameNumber.text = String(framenumber);
actionFrame.gotoAndStop(framenumber);
if (framenumber < 1 )
{
framenumber = 11 ;
}
trace(framenumber);
}
down2.addEventListener(MouseEvent.CLICK, downaction);
Here's a link to the .swf
for some reason now, it starts at 1, but when it passes 11 it'll go back to 2, I don't know what i did wrong.. haha
so, I'm not entirely sure math is the issue, but i have this very simple function that isn't executing properly.
var framenumber:Number = 1;
down.addEventListener(MouseEvent.CLICK, downaction);
function downaction(ev:MouseEvent)
{
framenumber -= 1;
trace(framenumber);
FrameNumber.text = String(framenumber);
actionFrame.gotoAndStop(framenumber);
if (framenumber < 1)
{
framenumber = 10;
}
}
So, with this code the text starts at 1, when you click down it goes to 0 and then 9 when it should just go to 10.
i'm not sure what the problem, i'm pretty sure it isn't my math but, i can't figure it out. any help appreciated!
This is the first frame:
stop();
import flash.events.MouseEvent;
import flash.net.SharedObject;
var enemyHealth:Number = 1000;
var damage:Number = 1;
var damageDealt:Number = 0;
var points:Number = 0 ;
var level:Number = 1;
enemy.addEventListener(MouseEvent.CLICK, dealDamage);
function dealDamage(ev:MouseEvent)
{
enemyHealth -= damage;
damageDealt += damage;
EnemyHealth.gotoAndStop(damageDealt);
trace(enemyHealth);
}
enemy.addEventListener(MouseEvent.CLICK, addPoint);
function addPoint(ev:MouseEvent)
{
points += damage;
trace(points);
Points.text = String(points);
and then the second is:
import flash.events.MouseEvent;
import flash.net.SharedObject;
UpDam.addEventListener(MouseEvent.CLICK, Upgrade);
function Upgrade(ev:MouseEvent)
{
if (points >= 10)
{
damagetext.text = String(level);
damage += 1;
points -= 10;
Points.text = String(points);
level++;
}
}
back.addEventListener(MouseEvent.CLICK, goBack);
function goBack(ev:MouseEvent)
{
gotoAndStop(1);
}
Points.text = String(points);
So, here's my situation.
I'm working on a little test game just to get used to AS3, so far what i have is: You click an enemy, and when you do so it deals 1 damage, and gives you points equal to the damage dealt.
I added to point system for a currency to use in an upgrade shop on a separate frame (frame 2), when you go to the shop on the separate frame, the points remain are shown, but when you back to the battle, the points reset.
I was wondering how i would go about making it so that the points don't reset. I thought i need some sort of saving method but i'm not sure how to do that. Any help would be appreciated.
i have a graphic with animations in it on my timeline. Under the properties of the graphic i set it to play once instead of loop or single frame. yet, it still loops. Anyone have any idea why? it happens for several of my graphics.
Thank you everyone who replied! i'll work on something tomorrow based on what you guys posted and get some advice maybe. Thank you :)
Okay, here's a little background on me. First off all, my name is Jonathan and I've been drawing since a young age. Granted i'm only eight-teen but still, ten or so years of drawing as a hobby has always made me the "artsy" kid in school. I've always rejected the idea of drawing from observation for the reason that observational drawing only allows you to draw what you're observing (Who would have thought?) so there's almost no creativity behind it; or so i thought. So since I've been drawing I've always drawn from my imagination and when i came across something i didn't understand how to draw i would observe real life examples of that and attempt to recreate for the purpose of my work. I simply used observation to understand the logic behind why things are the way they are. Still today i hardly work on anything observational though, recently I've read books written by Scott McCloud in order to further my comic artwork. I've attempted to use his idea's and lessons to create my own stories and strips but, i feel as though since i lack the understanding of observational drawing I can't execute the poses and scenes I want to. Basically what i'm asking from you guys is to help me break out of my comfort zone as a cartoonist style of drawing, and into a more realistic one that i can then include into my current style.
Don't get me wrong, I've tried this many of times, but because this is somewhat new to me and outside of my comfort zone, i reject my work since i can only see it's flaws and thus never work to improve it. I just completely deny it.
When it comes down to it, what i'm asking is that you guys could show me some helpful tutorials on anatomy and drawing for observation. I could work on maybe a couple observational drawings a week and post them to this thread to receive your (helpful) criticism. I would really appreciate it if anyone had any good books, or web tutorials they could tell me about.
What i'm willing to do here is post my work per week regardless of my satisfaction and maybe accomplish my goal. I would really appreciate any help anyone can would give me. I've been struggling with this issues for years now and have never had the proper encouragement or support to overcome it.
Once again, anyone who helps or even tries to help I will thank you sincerely.
At 10/18/13 01:37 AM, yurgenburgen wrote: what did you think of cup rescue sim?
it was fantastic, a brilliant work of art if you ask me.
Any chance it was this?
http://www.newgrounds.com/portal/view/587346
Thanks for the help guys! I while none of the games you poster were the right one, some of these were very interesting. Though i did manage to find it, it's actually Bit Dungeon. :P
When I first joined newgrounds i found this game, it was a pixel dungeon game where you would go through a dungeon and eventually stumble upon a boss, you could unlock elemental powers and acquire new armor to make you're hero stronger.
I haven't been able to find the game since i've played it! D:
if anyone knows what it's called please please pleeeeease tell me!
At 10/15/13 10:47 AM, Escapement wrote:At 10/10/13 11:28 PM, Jawnduss wrote: For my 12th grade English class we're asked to creatively illustrate an independent novel.wtf kind of books are you reading that had people committing genocide over a talking window?
The Fifth Mountain by Paulo Coelho, it's actually not that bad of a book. lol
Just now realizing how difficult this to read, so here's a link: http://www.newgrounds.com/dump/item/6125d5eb321dc20243621af19a92830c
Here's the final product if anyone's interested.
At 10/11/13 08:16 AM, kkots wrote: The faces look like in Hellbenders.
Oney is by far one of my favorite toonists. I will with put a doubt admit he's had a huge impact on my art.
For my 12th grade English class we're asked to creatively illustrate an independent novel. I personally, chose to do three panel comic strips on the book The Fifth Mountain by Paulo Coelho (one of my favorites.) I'll be uploading some of them here to get input, but i also want to see what you guys can come up with!
Given, if you haven't read this book the dialog may not make sense to you, but i'm still interested in your opinions. :P
so, i'm attempting to make a simple platform game to enhance my AS3 capabilities. One problem i've come across is making the character play the running animation, and jumping play the jumping animation when the appropriate key is pressed. so, i have my character set up with a running right movieclip on frame one of the character movieclip, (a movieclip inside a movieclip) then frame two has running left, and frame three with jumping. each frame has the stop function on it. i'm not sure how to set it up, but i thought it was the:
gotoAndPlay(1:mcMain)
function, but this didn't work. i'm still really new to this so really i would just appreciate help. if so, thank you.
so, i'm attempting to make a simple platform game to enhance my AS3 capabilities. One problem i've come across is making the character play the running animation, and jumping play the jumping animation when the appropriate key is pressed. so, i have my character set up with a running right movieclip on frame one of the character movieclip, (a movieclip inside a movieclip) then frame two has running left, and frame three with jumping. each frame has the stop function on it. i'm not sure how to set it up, but i thought it was the:
gotoAndPlay(1:mcMain)
function, but this didn't work. i'm still really new to this so really i would just appreciate help. if so, thank you.
At 3/21/13 09:18 PM, SafePlagiarism wrote: Pick up any book about film (the actual process of filming, not just films in general).
Do you have any recommendations?
i made this character for a short series i had in mind. unfortunately this is my first character dev using symbols and tweens between body parts for movement.. i've been extremely discouraged from actually animating him since making this layout because i feel so blind, and ignorant to what actually goes into this. anyone with advice, i would appreciate it.
so, I've recently read "The Animator Survival Kit" and it's helped my animations as a whole, it's taught me a lot about perspective, size and proportion, walk cycles, timing etc. i was wondering if any animators out there had any other books to recommend that were worth reading? i'd like to find something that focus' on the aspect of Adobe Flash and all the different "hidden" features it has and how to use them properly, but i will accept anyone with any recommendations. :)
if anyone's seen any, or made any lately share? :P
here's one i made the other night. you can see it on my page also.