This is a discussion on "Actionscript for Alternative endings to looping flash movies" within the Flash & Multimedia Forum section. This forum, and the thread "Actionscript for Alternative endings to looping flash movies are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Actionscript for Alternative endings to looping flash movies
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Hello can any body help.
I’m learning action script at the mo. But not getting very far. I need some basic script I’ve made a continuing looping movie that needs 4 different endings. Effectively playing the first part over and over but each time it has a slightly different ending each time. This is what is happening: At the moment I have a series of photos that fade in and out with basic tweens using alpha channels. At the end of the movie it turns to a bouncing ball. (This is where I need help.) At the end of the fading photos I need a simple bit of script. So on the first Loop the ball explodes Loop 2 it deflates Loop 3 it shrinks and vanishes Loop 4 it cracks open like and egg. I have the ball doing this action I just need the script so it goes to the right frame at the end of the appropriate loop. I then want it to go back to the first loop and play the whole thing continuously. Its not very exciting but it’s a project I’m doing and I’m stuck I’m trying to keep the file size down so that’s why I have not just cloned the first part of the movie 4 times and jammed the different endings on each time so making one large movie. Hope that made some Kind of sense Can any one help Rich – a.k.a Funkydreadman. |
|
|
|
#2
|
|||
|
|||
|
Re: Actionscript for Alternative endings to looping flash movies
Hmm, ok lets see if I can get you in the right direction. You'll want it to do something like the following.
Set a Global Variable at the beginning of your movie, something like: Var Ending(); At the start of all of your endings label them on a new layer called Actions. (i.e. Ending 1, Ending 2, etc) RIGHT before the 1st ending starts. At the end of this create a script that does the following. 1. Checks the variable Ending, if Ending = ""(blank) then goto "Ending 1" If Ending = Ending 1 Goto "Ending 2" And so on... 2. Then at the end of EACH alternate ending you'll need to set the variable to the following on each respective ending... Ending = "Ending 1" on ending 1 Goto (frame 1) Ending = "Ending 2" on ending 2 Goto (frame 1) Ending = "Ending 3" on ending 3 Goto (frame 1) Ending = "Ending 4" on ending 4 Goto (frame 1) I hope this gets you started in the right direction this is by no means the exact code - but more of an idea of how to get started. Afterall, figuring it out on your own is a lot more gratifying that getting all the answers and copy and pasting. Cheers, Scott
Last Blog Entry: Yay!? (Oct 8th, 2007)
|
|
#3
|
|||
|
|||
|
Cheers Thank you so much for replying.
Rich |
![]() |
| Tags |
| actionscript, flash |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to stop flash Cs3 looping animation | megb6806 | Flash & Multimedia Forum | 8 | Aug 3rd, 2008 21:55 |
| movies in flash | bagga007 | Flash & Multimedia Forum | 4 | Jan 12th, 2008 21:48 |
| Making Flash Movies | magnetica | Flash & Multimedia Forum | 5 | May 3rd, 2007 03:18 |
| looping issue with flash file | snooper | Flash & Multimedia Forum | 9 | Nov 20th, 2006 13:34 |
| HELP! Clicking flash movies or using spacebar! | dbarrie | Flash & Multimedia Forum | 4 | Aug 31st, 2006 10:28 |