View Full Version : I'm looking for some help
Kirstii
05-09-2007, 01:35 PM
I'm in third year of my degree and i'm having big problems. I've created a jigsaw in flashMX and everything works, but when the last piece is placed I want it to jump to a finished animation. I have no idea what the code is to do this. Can someone please help me as it is due in the next to days and is driving me mad!!!!!!
Thank you :D
atomic
05-09-2007, 02:22 PM
Can you attach your .fla?
Kirstii
05-09-2007, 02:30 PM
Urm I'm trying to do i need to zip it before i attach it??
atomic
05-09-2007, 02:31 PM
Yep.
Kirstii
05-09-2007, 02:44 PM
ok I hope that worked, its just basic and I havnt included the final animation yet. Thank you loads for you help
atomic
05-09-2007, 03:25 PM
Seems to me the easiest, since success is based on all pieces being at alpha = 100, to simply increase a variable (like blue_pieces), each time a piece's alpha is set at 100%. When that variable holds the value of 24 (total number of pieces), it then means success, thus play (or jump to...) your final animation.
You can increase the value of the variable within your drag & drop function (when you set the piece's alpha to 100%), and simply keep checking the number against the total number of pieces, with an onEnterFrame...
this.onEnterFrame = function(){
if(blue_pieces == 24){
// Add code here to jump to or play your final animation...
delete this.onEnterFrame;
}
};
Kirstii
05-09-2007, 03:41 PM
thank you so much!! I'm gonna go try that, you may have just saved my life (or at least my degree) thank you again
atomic
05-09-2007, 06:26 PM
;)
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.