An Animating Question

Post and discuss creative ideas

An Animating Question

Postby PurplePanda » Sat Jan 07, 2012 8:39 am

I've been a long time lurker on these forums and this is my first post. I've been loving all the amazing work thats been done by people like Geopet and thought it was about time I tried my hand at Flash. I've never worked in flash before but I managed to figure a lot out. I've been working on a scene and was wondering how to add an animation that I have created to Krystal. I understand that if I double click the krystal sprite it shows the four frames that are the basic walk and idle animations. I have in my library a jump animation but am not sure how to add it. I tried adding two more animation frames where the walk and idle animations are and added some code. This is the code I have on my Krystal:
Code: Select All Code
onClipEvent(enterFrame) {
   if(_root.movement or _root.movementright) {
      if(Key.isDown(Key.RIGHT)) {
         _x += _root.movespeed;
         right = true;
         gotoAndStop(2);
      } else if(right)
         gotoAndStop(1);
   }

   if (_root.movement or _root.movementleft) {
      if(Key.isDown(Key.LEFT)) {
         _x -= _root.movespeed;
         right = false;
         gotoAndStop(4);   
      } else if(!right)
         gotoAndStop(3);
   }
   
   if (_root.movement or _root.movementleft) {
      if(Key.isDown(Key.SPACE)) {
         _x -= _root.movespeed;
         right = false;
         gotoAndStop(6);   
      } else if(!right)
         gotoAndStop(5);
   }
}

I have little programming experience and have never worked with actionscript before, but I assummed that the gotoAndStop(6); and gotoAndStop(5); would access the two frames I added to krystals animation slots. But for some reason instead when you press space she just glides backwards. Anyways thanks for the help and here is the crappy little scene I've built, not much but I tried to make it windy :shock:. My idea is to create a minigame where crystal has to jump over stuff that the wind is blowing towards her.
Attachments
Click to Play
(Javascript Required)

kris1.swf [ 220.22 KiB | Viewed 1283 times ]

PurplePanda
Newly Registered
 
Joined: Sat Jan 07, 2012 6:32 am

Re: An Animating Question

Postby BlueLight » Sun Jan 08, 2012 2:17 am

Didn't you already show this?
User avatar
BlueLight
Gangs n' Whores Developer
 
Joined: Sat Jun 04, 2011 8:23 am

Re: An Animating Question

Postby suki888 » Mon Jan 09, 2012 4:28 am

Nice, keep it up dude ;)
User avatar
suki888
 
Joined: Thu Sep 08, 2011 7:16 am

Re: An Animating Question

Postby Mr D » Mon Jan 09, 2012 4:35 am

you already have the same thread in creatice corner -_- ( viewtopic.php?f=7&t=1925 ). Why post it a second time?
1 game (oh I mean story slideshow -_-) and 5 flash loop FINISHED...fuck yea
My mini flashes link : http://legendofkrystal.com/forum/viewto ... f=7&t=1972
Also I am working on a project right now.But remember, it's a secret to everybody >:D
User avatar
Mr D
 
Joined: Tue Jun 01, 2010 12:44 am
Location: Alphabet

Re: An Animating Question

Postby Lucky777 » Mon Jan 09, 2012 1:28 pm

Pretty sure the "posts awaiting approval" system got him.
User avatar
Lucky777
 
Joined: Sat Dec 18, 2010 12:44 am
Location: Chambers: Bandit Division

Re: An Animating Question

Postby Renara » Mon Jan 09, 2012 2:33 pm

Gonna lock this since the other thread here (Thanks Mr D) has some great replies already.
Renara (team twitter | newgrounds)
Team Lead Programmer
Lok Team Member
Site Administrator
User avatar
Renara
Foxy Admin
 
Joined: Fri Jan 08, 2010 4:16 pm


Return to Discussion



Who is online

Users browsing this forum: No registered users