The McLeodGaming forums were permanently closed on April 30th, 2020. You are currently viewing a read-only archive.
View unanswered posts | View active topics It is currently Fri May 15, 2020 5:39 am

Forum rules


IMPORTANT

This Forum is for Flash related questions ONLY! Do not ask questions about spriting, Game Maker, Photoshop, or anything else not related to Flash.



 [ 18 posts ]  Go to page 1, 2  Next
[Question] Controlling Sprites 
Author Message
User avatar

Joined: Sun Mar 29, 2009 12:27 pm
Posts: 14
ok i know there's a topic on how to control sprites but what i wanna know is how to control them with their animation.

As an example im using hitsugaya i want to control that with the animation in it.


Attachments:
File comment: i would like to control this
hitsuga running.gif
hitsuga running.gif [ 2.52 KiB | Viewed 3156 times ]

_________________
Image
Sun Mar 29, 2009 4:35 pm
User avatar

Joined: Wed Apr 29, 2009 11:28 pm
Posts: 323
Location: Nowhere, Antarctica
Gender: Anime Girl
Skype: Evilagram
First make a movieclip with several frames in it. One frame per animation. Each animation should itself be contained in a movieclip. Watch out with hit detection, the size of the sprite changes as the animation progresses, so it may lead to hiccups or serious issues unless every sprite is exactly the same size down to the pixel.

Code:
if(currentAnim = "whatever"){
 _root.yourStupidRecoloredCharacter.gotoAndStop("whatever");
}

_________________
Image

Style [Stayl] (n) - One's unique and personal method of defacing a perfectly good piece of paper.

READ THIS: http://ipgd.freehostia.com/copypasta.html


Thu Apr 30, 2009 1:22 am
User avatar

Joined: Tue Oct 28, 2008 1:37 pm
Posts: 300
how do you make frames and animations contained in a movie clip (sorry im kinda a noob at flash)

_________________
Image
super smash bros blits(working title)-1% done
new flash game


Thu Apr 30, 2009 3:30 pm
User avatar

Joined: Wed Apr 29, 2009 11:28 pm
Posts: 323
Location: Nowhere, Antarctica
Gender: Anime Girl
Skype: Evilagram
In truth, every movieclip is another movie inside itself. They have "Nested" timelines. You can control a movieclip's timeline the same way as the main timeline just by pointing the code to the movieclip's "instance name". Everything in flash has an "instance name". You can set an object's instance name by clicking on it, opening properties and changing the text in the field to the left of the bar.

To edit a movieclip's timeline, you just double click it on the stage or in the library. To leave the nested timeline, double click in an empty space or click Scene 1 at the top (if you changed the name of the scene then it'll say the scene name instead).

_________________
Image

Style [Stayl] (n) - One's unique and personal method of defacing a perfectly good piece of paper.

READ THIS: http://ipgd.freehostia.com/copypasta.html


Thu Apr 30, 2009 5:10 pm
User avatar

Joined: Tue Oct 28, 2008 1:37 pm
Posts: 300
I LOVE YOU :drool: i dont know how i can repay you but THANKS for talking beginer languge
but ive just got one problem when i make it go to an animation it stays still

_________________
Image
super smash bros blits(working title)-1% done
new flash game


Fri May 01, 2009 10:17 am
User avatar

Joined: Wed Apr 29, 2009 11:28 pm
Posts: 323
Location: Nowhere, Antarctica
Gender: Anime Girl
Skype: Evilagram
I'm good at understanding the thought process of people learning things.

The trick here is to have one big movieclip to hold the character. Have each frame of the movieclip assigned to a different animation. On the frame you have another movieclip with the animation inside it.

For example, lets say you want a character to walk and stand. First you make a movieclip with two frames. In the first frame you add the walking animation inside a movieclip, in the second frame you a walking animation inside a movieclip. Just tell it to gotoAndStop on the correct frame. Don't forget to stop(); the top level movieclip, or it'll rapidly flash between your standing and walking animation.

_________________
Image

Style [Stayl] (n) - One's unique and personal method of defacing a perfectly good piece of paper.

READ THIS: http://ipgd.freehostia.com/copypasta.html


Fri May 01, 2009 10:41 am
User avatar

Joined: Tue Oct 28, 2008 1:37 pm
Posts: 300
thank you again ive got it but how do i make it go to the staying still animation when i realse the key

_________________
Image
super smash bros blits(working title)-1% done
new flash game


Sun May 03, 2009 4:41 pm
User avatar

Joined: Wed Apr 29, 2009 11:28 pm
Posts: 323
Location: Nowhere, Antarctica
Gender: Anime Girl
Skype: Evilagram
Make is so that if no keys are down, it goes to the standing position.

if(Key.isDown(Key.WHATEVER) == true){
_root.Character.gotoAndStop("walking");
}else{
_root.Character.gotoAndStop("standing");
}

_________________
Image

Style [Stayl] (n) - One's unique and personal method of defacing a perfectly good piece of paper.

READ THIS: http://ipgd.freehostia.com/copypasta.html


Sun May 03, 2009 9:53 pm
User avatar

Joined: Tue Oct 28, 2008 1:37 pm
Posts: 300
*ads to freand list*

_________________
Image
super smash bros blits(working title)-1% done
new flash game


Mon May 04, 2009 7:59 am

Joined: Fri May 08, 2009 3:16 am
Posts: 3
hank you again ive got it but how do i make it go to the staying still animation when i realse the key

_________________
campaign metrics
atm company


Fri May 08, 2009 3:31 am
User avatar

Joined: Sun Mar 29, 2009 12:27 pm
Posts: 14
im confused what do i do with the first code

_________________
Image


Sun Jun 21, 2009 1:08 pm
User avatar

Joined: Wed Apr 29, 2009 11:28 pm
Posts: 323
Location: Nowhere, Antarctica
Gender: Anime Girl
Skype: Evilagram
mix787 wrote:
im confused what do i do with the first code

Learn how to use Flash.

_________________
Image

Style [Stayl] (n) - One's unique and personal method of defacing a perfectly good piece of paper.

READ THIS: http://ipgd.freehostia.com/copypasta.html


Thu Jun 25, 2009 11:25 pm
User avatar

Joined: Sun Mar 29, 2009 12:27 pm
Posts: 14
That doesnt help at all

_________________
Image


Fri Jun 26, 2009 11:44 pm
User avatar

Joined: Wed Apr 29, 2009 11:28 pm
Posts: 323
Location: Nowhere, Antarctica
Gender: Anime Girl
Skype: Evilagram
Yes it does.

_________________
Image

Style [Stayl] (n) - One's unique and personal method of defacing a perfectly good piece of paper.

READ THIS: http://ipgd.freehostia.com/copypasta.html


Sat Jul 18, 2009 3:40 pm
User avatar

Joined: Sun Mar 29, 2009 12:27 pm
Posts: 14
Evilagram wrote:
Yes it does.


unless i can use this for help no it doesnt :-_-:

_________________
Image


Mon Jul 20, 2009 1:01 am
Display posts from previous:  Sort by  
 [ 18 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software for PTF.