The Warring States of NPF  

Go Back   The Warring States of NPF > Social > Computers & Technology
User Name
Password
Mark Forums Read
FAQ Members List Calendar Search Today's Posts Join Chat

Reply
View First Unread View First Unread   Click to unhide all tags.Click to hide all tags.  
Thread Tools Display Modes
Unread 11-15-2010, 07:07 AM   #1
ArtisticSkytzo
Hardcore Head-Ripper
 
Join Date: Nov 2010
Posts: 8
ArtisticSkytzo will become famous soon enough. Eventually. Maybe.
Tech Support Actionscripting (2 and/or 3) a walk...

I had a huge greeting typed out, but now it's gone. In a nutshell, I'm here because I happen to think the people of this forum are quite intelligent.

I am currently programming a game, a flash game. I've managed to get the scripting right for a concept sprite to move and jump, but the walk animation doesn't... animate. I'm guessing the actionscripting inside the sprite's movieclip isn't assigned to the right frames, or the wrong actions are being commanded. What I need are the proper actions and frame assignments for the sprite's movieclip.
What I'm using:
Flash CS5
Actionscript 2 and 3 (I'll take advice for both, or either)
Mac OS

Feel free to ask for more details.

Any help would be tremendously (yes, that much) appreciated. Apologies if this or a topic like this has been posted, I made an effort to look.

Last edited by ArtisticSkytzo; 11-15-2010 at 07:09 AM.
ArtisticSkytzo is offline Add to ArtisticSkytzo's Reputation   Reply With Quote
Unread 11-15-2010, 08:13 AM   #2
Professor Smarmiarty
Sent to the cornfield
 
Professor Smarmiarty's Avatar
 
Join Date: Mar 2007
Location: K-space
Posts: 9,758
Professor Smarmiarty isn't just above the law -- they are the law. Professor Smarmiarty isn't just above the law -- they are the law. Professor Smarmiarty isn't just above the law -- they are the law. Professor Smarmiarty isn't just above the law -- they are the law. Professor Smarmiarty isn't just above the law -- they are the law. Professor Smarmiarty isn't just above the law -- they are the law. Professor Smarmiarty isn't just above the law -- they are the law. Professor Smarmiarty isn't just above the law -- they are the law. Professor Smarmiarty isn't just above the law -- they are the law. Professor Smarmiarty isn't just above the law -- they are the law. Professor Smarmiarty isn't just above the law -- they are the law.
Send a message via MSN to Professor Smarmiarty
Default

Just comment out everything then add them back in line by line till you find an error.
Alternatively turn it off and turn it back on again.
That solves 90% of my programming dilemmas.
Professor Smarmiarty is offline Add to Professor Smarmiarty's Reputation   Reply With Quote
Unread 11-15-2010, 12:10 PM   #3
bluestarultor
Blue Psychic, Programmer
 
bluestarultor's Avatar
 
Join Date: Feb 2007
Location: Home!
Posts: 8,814
bluestarultor is one of Jay-Z's 99 problems. Possibly two. bluestarultor is one of Jay-Z's 99 problems. Possibly two. bluestarultor is one of Jay-Z's 99 problems. Possibly two. bluestarultor is one of Jay-Z's 99 problems. Possibly two. bluestarultor is one of Jay-Z's 99 problems. Possibly two. bluestarultor is one of Jay-Z's 99 problems. Possibly two. bluestarultor is one of Jay-Z's 99 problems. Possibly two. bluestarultor is one of Jay-Z's 99 problems. Possibly two. bluestarultor is one of Jay-Z's 99 problems. Possibly two. bluestarultor is one of Jay-Z's 99 problems. Possibly two.
Default

Quote:
Originally Posted by ArtisticSkytzo View Post
I had a huge greeting typed out, but now it's gone. In a nutshell, I'm here because I happen to think the people of this forum are quite intelligent.

I am currently programming a game, a flash game. I've managed to get the scripting right for a concept sprite to move and jump, but the walk animation doesn't... animate. I'm guessing the actionscripting inside the sprite's movieclip isn't assigned to the right frames, or the wrong actions are being commanded. What I need are the proper actions and frame assignments for the sprite's movieclip.
What I'm using:
Flash CS5
Actionscript 2 and 3 (I'll take advice for both, or either)
Mac OS

Feel free to ask for more details.

Any help would be tremendously (yes, that much) appreciated. Apologies if this or a topic like this has been posted, I made an effort to look.
I'm actually familiar with Flash, but you're not giving us much to work with. How is it set up? Are you trying to play a small section of all the animations as stored in one line? How did you do the animation? Flash CS4's preview at least does not handle nested animations. Have you tried publishing it and testing from there?

Screenshots and some of the code might help.
__________________
Quote:
Originally Posted by Drake Clawfang
Aerith is clearly the most badass character ever. She saves the world. Twice. While dead. No one else can claim that, can they?
I'm gone from here for good. This place gave me many memories to take with me and shaped me greatly. I still care about you guys. I just can't stay.

Journal | Twitter | FF Wiki (Talk) | Projects | Site
bluestarultor is offline Add to bluestarultor's Reputation   Reply With Quote
Unread 11-15-2010, 02:16 PM   #4
ArtisticSkytzo
Hardcore Head-Ripper
 
Join Date: Nov 2010
Posts: 8
ArtisticSkytzo will become famous soon enough. Eventually. Maybe.
Default



Uploaded with ImageShack.us

The above is the inside of the movieclip. The most recent method I used was to frame by frame the walk, insert a blank keyframe on frame 1, and copy and paste frame 2 (the "stand" frame) ahead of all the other frames (which would be frame 12). The commands are as follows:
In frame 1, blank frame: gotoAndStop(2)
In frame 2, the stand frame: gotoAndStop(12)
In frame 12, the last frame: gotoAndPlay(2)

This part is where I'm having trouble making it work. I've played with the commands, and either the sprite doesn't walk but still moves, or walks continuously while moving. I'm trying to get the little guy to show walking only when the key is pressed.
Here's the coding for the key presses assigned to frame 1 of the main stage (not inside the movieclip):
if(Key.isDown(Key.RIGHT)) {
_x+=speed;
_xscale=100;
}
if(Key.isDown(Key.LEFT)) {
_x-=speed;
_xscale=-100;
}
if(Key.isDown(Key.SPACE)) {
isJumping = true;
jumpSpeed =-10

Feel free to ask for more details.
ArtisticSkytzo is offline Add to ArtisticSkytzo's Reputation   Reply With Quote
Unread 11-15-2010, 03:01 PM   #5
bluestarultor
Blue Psychic, Programmer
 
bluestarultor's Avatar
 
Join Date: Feb 2007
Location: Home!
Posts: 8,814
bluestarultor is one of Jay-Z's 99 problems. Possibly two. bluestarultor is one of Jay-Z's 99 problems. Possibly two. bluestarultor is one of Jay-Z's 99 problems. Possibly two. bluestarultor is one of Jay-Z's 99 problems. Possibly two. bluestarultor is one of Jay-Z's 99 problems. Possibly two. bluestarultor is one of Jay-Z's 99 problems. Possibly two. bluestarultor is one of Jay-Z's 99 problems. Possibly two. bluestarultor is one of Jay-Z's 99 problems. Possibly two. bluestarultor is one of Jay-Z's 99 problems. Possibly two. bluestarultor is one of Jay-Z's 99 problems. Possibly two.
Default

The issue is the gotoAndStops you're using. That function makes all playing cease and waits for additional input to make it go again.

What I'd really suggest, though, is simply making it a loop that plays through until directional input ceases if you can. Then it's just a matter of adding an event listener for a key-up (I think Flash has that one) to make it go back to the standing pose.


Edit: What I mean is you should switch the standing movie clip symbol with the walking one when the character moves and switch back when it stops.
__________________
Quote:
Originally Posted by Drake Clawfang
Aerith is clearly the most badass character ever. She saves the world. Twice. While dead. No one else can claim that, can they?
I'm gone from here for good. This place gave me many memories to take with me and shaped me greatly. I still care about you guys. I just can't stay.

Journal | Twitter | FF Wiki (Talk) | Projects | Site

Last edited by bluestarultor; 11-15-2010 at 03:06 PM.
bluestarultor is offline Add to bluestarultor's Reputation   Reply With Quote
Unread 11-15-2010, 03:35 PM   #6
ArtisticSkytzo
Hardcore Head-Ripper
 
Join Date: Nov 2010
Posts: 8
ArtisticSkytzo will become famous soon enough. Eventually. Maybe.
Default

Ok, I'll try that. Thanks yo.
ArtisticSkytzo is offline Add to ArtisticSkytzo's Reputation   Reply With Quote
Unread 11-15-2010, 04:03 PM   #7
ArtisticSkytzo
Hardcore Head-Ripper
 
Join Date: Nov 2010
Posts: 8
ArtisticSkytzo will become famous soon enough. Eventually. Maybe.
Default

One more question, would I code the key up function on the main stage frame 1, or within the movieclip?
ArtisticSkytzo is offline Add to ArtisticSkytzo's Reputation   Reply With Quote
Unread 11-15-2010, 05:05 PM   #8
bluestarultor
Blue Psychic, Programmer
 
bluestarultor's Avatar
 
Join Date: Feb 2007
Location: Home!
Posts: 8,814
bluestarultor is one of Jay-Z's 99 problems. Possibly two. bluestarultor is one of Jay-Z's 99 problems. Possibly two. bluestarultor is one of Jay-Z's 99 problems. Possibly two. bluestarultor is one of Jay-Z's 99 problems. Possibly two. bluestarultor is one of Jay-Z's 99 problems. Possibly two. bluestarultor is one of Jay-Z's 99 problems. Possibly two. bluestarultor is one of Jay-Z's 99 problems. Possibly two. bluestarultor is one of Jay-Z's 99 problems. Possibly two. bluestarultor is one of Jay-Z's 99 problems. Possibly two. bluestarultor is one of Jay-Z's 99 problems. Possibly two.
Default

Quote:
Originally Posted by ArtisticSkytzo View Post
One more question, would I code the key up function on the main stage frame 1, or within the movieclip?
I'm not sure off the top of my head. I'd assume it would be at the same level as your key down events.
__________________
Quote:
Originally Posted by Drake Clawfang
Aerith is clearly the most badass character ever. She saves the world. Twice. While dead. No one else can claim that, can they?
I'm gone from here for good. This place gave me many memories to take with me and shaped me greatly. I still care about you guys. I just can't stay.

Journal | Twitter | FF Wiki (Talk) | Projects | Site
bluestarultor is offline Add to bluestarultor's Reputation   Reply With Quote
Unread 11-15-2010, 09:17 PM   #9
ArtisticSkytzo
Hardcore Head-Ripper
 
Join Date: Nov 2010
Posts: 8
ArtisticSkytzo will become famous soon enough. Eventually. Maybe.
Default

Ok thanks again, and thank you too, Smarty.
ArtisticSkytzo is offline Add to ArtisticSkytzo's Reputation   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 05:05 PM.
The server time is now 10:05:08 PM.


Powered by: vBulletin Version 3.8.5
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.