Actionscript for Alternative endings to looping flash movies

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.



Go Back   Webforumz.com > Main Forums > Design Your Website > Flash & Multimedia Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jun 22nd, 2007, 20:10
Junior Member
Join Date: Mar 2007
Location: Dorset,England
Age: 29
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Question Actionscript for Alternative endings to looping flash movies

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.
Reply With Quote

  #2 (permalink)  
Old Jun 25th, 2007, 15:18
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Sgaspar11
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)
Reply With Quote
  #3 (permalink)  
Old Jun 30th, 2007, 16:24
Junior Member
Join Date: Mar 2007
Location: Dorset,England
Age: 29
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Talking Re: Actionscript for Alternative endings to looping flash movies

Cheers Thank you so much for replying.

Rich
Reply With Quote
Reply

Tags
actionscript, flash

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
movies in flash bagga007 Flash & Multimedia Forum 4 Jan 12th, 2008 21:48
how to stop flash Cs3 looping animation megb6806 Flash & Multimedia Forum 7 Aug 10th, 2007 02:49
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


All times are GMT. The time now is 22:36.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43