HaXe/Flash - Multiple animations in a MovieClip with SWFMILL

EROBAKA December 9, 2010, 11:18 pm
Well it's not really what i want, i'll wait for the next part of this tutorial :p
Thanks !
THEJCDC December 8, 2010, 6:31 pm
Hey,
If I understand what you want to do, you just have to replace the function goToTheNextFrame by :

private function goToTheNextFrame(event : MouseEvent)
{
if (_arrow2.currentLabel == "left3")
{
_arrow2.gotoAndStop("left1");
}
else
{
_arrow2.nextFrame();
}
}


Good Luck,
Jcdc.
EROBAKA December 8, 2010, 5:22 pm
Thanks ! Nice tutorial :)
Could you add a case which does this ? :
When you click on the arrow, it displays the 3 colors for one arrow direction ( with only 1 click ) but it doesn't displays the colors for the other direction.

I hope you understand what i mean ^^

Thanks for the good work :)
RAZAINA December 8, 2010, 1:37 am
First part of a tutorial about haXe/swfmill written by jcdc in french. The next part is a game which introduces the same points.

I'll quickly translate it in english, as soon as possible.
RAZAINA December 6, 2010, 11:59 am
Hi,
ok try to give different depths :)
then you can use this.gotoAndStop(frame_num) and this.gotoAndPlay(frame_num) in your class



<clip id="Human">
<frame name="walk_east_1">
<place id="walking_east_1" depth="1"/>
</frame>
<frame name="walk_east_2">
<place id="walking_east_2" depth="2"/>
</frame>
<frame name="walk_east_3">
<place id="walking_east_3" depth="3"/>
<stop/>
</frame>
<frame name="walk_west_1">
<place id="walking_west_1" depth="4"/>
</frame>
<frame name="walk_west_2">
<place id="walking_west_2" depth="5"/>
</frame>
<frame name="walk_west_3">
<place id="walking_west_3" depth="6"/>
<stop/>
</frame>
</clip>




class Human extends MovieClip
{
public function new()
{
super();
this.gotoAndStop(3);
//...
}
}

I will make a tutorial today about keyboard detection with associated animation ;) .
EROBAKA December 6, 2010, 10:23 am
Hi, i'm trying to create a basic character animation ( with multiple animations ) in HaXe/Flash with SWFMILL
Here is my SWFMILL file :

<?xml version="1.0" encoding="iso-8859-1" ?>
<movie version="9">
<clip id="walking_east_1" import="walking_east_1.png"/>
<clip id="walking_east_2" import="walking_east_2.png"/>
<clip id="walking_east_3" import="walking_east_3.png"/>

<clip id="walking_west_1" import="walking_west_1.png"/>
<clip id="walking_west_2" import="walking_west_2.png"/>
<clip id="walking_west_3" import="walking_west_3.png"/>

<library>
<clip id="Human">
<frame name="walk_east_1">
<place id="walking_east_1" depth="1"/>
</frame>
<frame name="walk_east_2">
<place id="walking_east_2" depth="1"/>
</frame>
<frame name="walk_east_3">
<place id="walking_east_3" depth="1"/>
<stop/>
</frame>

<frame name="walk_west_1">
<place id="walking_west_1" depth="1"/>
</frame>
<frame name="walk_west_2">
<place id="walking_west_2" depth="1"/>
</frame>
<frame name="walk_west_3">
<place id="walking_west_3" depth="1"/>
<stop/>
</frame>
</clip>
</library>
</movie>


When i use it in my haxe code, it displays the "Human" but it plays all the animations. So how to say "Display only frame 1 to 3" ? I tried "gotoAndPlay" but ot also plays all the animations.

Thanks :)

( It can be a good "start" game tutorial, implementing keyboard detection and display associated animations ^^)