Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)

Reply
 
Thread Tools Rate Thread Display Modes
Old 12-04-2000, 04:01 PM   #1
leo99
Registered User
 
Join Date: Dec 2000
Location: Scotland (UK)
Posts: 5
Question

Hi, can anyone help please, This is probably a dumb question to regular flash users. I want to be able to load a movie, wait till it finishes, unload that movie and then load a new movie. Kinda like a slideshow using external movies. My problem is understanding how to determine when a loaded movie has reached its last frame. Please, please help.

leo99
leo99 is offline   Reply With Quote
Old 12-05-2000, 12:41 AM   #2
Jesse
Administrator
 
Jesse's Avatar
 
Join Date: Nov 2000
Location: Australia
Posts: 8,625
Default

In Flash 5 you can dot his in more ways than one, but still by far the easiest way is to simply include the action in the last frame of your loaded movie.
So that last frame of your first loaded movie will have:
[bunloadMovieNum (1);
loadMovieNum("movie.swf", 1);[/b]

(PS - If this doesn't work, replace the load movie with: _root.loadMovieNum )

That will unload your current movie and go on to the next one and it saves you the hassle of using the _currentframe and _totalframes parameters (even though you could).

Cheers


Jesse
Jesse is offline   Reply With Quote
Old 12-16-2000, 12:32 AM   #3
leo99
Registered User
 
Join Date: Dec 2000
Location: Scotland (UK)
Posts: 5
Default Determining last frame

Thanks Jesse, but I'm still having trouble. I'm using Wildform SWFX to create text animations output as swf files. I'm loading these into a main movie in Flash and I can't edit the last frame of the external text animations to add the script that you suggested. What I would really like to know is if there is a way to determine when a loaded movie has played once only without personally knowing how many frames are in the external movie - I've noticed other people mentioning that it is not a good idea to leave x amount of blank frames in the timeline to cover the play length of a external movie. Any ideas??

Leo99
leo99 is offline   Reply With Quote
Old 12-16-2000, 02:57 AM   #4
Jesse
Administrator
 
Jesse's Avatar
 
Join Date: Nov 2000
Location: Australia
Posts: 8,625
Talking

OK then you have to do it the hard way
It's not that hard really.
I assume you load your clip up onto another level (or within another clip, it makes no difference really). I think the best way to do it would be to load your clip onto another level. Then you use get properties (see the tutorial ) to check the length of the loaded clip and loop until the current frame is greater than or equal to the total length...

Come to think of it you might have to load it into a target clip ... but either way you code would be something like this:

Once movie is loaded:
total = getProperty ( "/target", _totalframes );

This sets the variable 'total' to the total number of frames in your loaded clip.

Then have a 2 frame looping MC with:

Frame 1:
if (_level0.target._currentframe = _level0:total) {
// we're at the last frame, do whatever
} else {
gotoAndPlay (2);
}


Frame 2:
if (_level0.target._currentframe = _level0:total) {
// we're at the last frame, do whatever
} else {
gotoAndPlay (1);
}


So this will loop until you reach the last frame of the loaded clip, then do whatever you put where the comment is....


Cheers

Jesse
__________________
Cheers

Jesse Stratford
ActionScript.org Cofounder
Email: presented in this way to stop spam-bots: My email is composed of my first name (jesse) followed by my last name (stratford) followed by @ followed by actionscript.org

Please don't email or PM me Flash questions, that's what the Forums are for!

Please don't rely on me reading my PMs either. Email me about important stuff.
Jesse is offline   Reply With Quote
Old 12-22-2000, 07:55 AM   #5
Jesse
Administrator
 
Jesse's Avatar
 
Join Date: Nov 2000
Location: Australia
Posts: 8,625
Default

Posted example, see:
http://www.actionscripts.org/forums/...id=212#post212

Cheers

Jesse
__________________
Cheers

Jesse Stratford
ActionScript.org Cofounder
Email: presented in this way to stop spam-bots: My email is composed of my first name (jesse) followed by my last name (stratford) followed by @ followed by actionscript.org

Please don't email or PM me Flash questions, that's what the Forums are for!

Please don't rely on me reading my PMs either. Email me about important stuff.
Jesse is offline   Reply With Quote
Old 04-30-2001, 08:17 PM   #6
leo99
Registered User
 
Join Date: Dec 2000
Location: Scotland (UK)
Posts: 5
Unhappy

Strok, could you elaborate please...

Leo.
leo99 is offline   Reply With Quote
Old 05-01-2001, 05:00 AM   #7
Jesse
Administrator
 
Jesse's Avatar
 
Join Date: Nov 2000
Location: Australia
Posts: 8,625
Default

Strok? Right thread?

Cheers

Jesse
__________________
Cheers

Jesse Stratford
ActionScript.org Cofounder
Email: presented in this way to stop spam-bots: My email is composed of my first name (jesse) followed by my last name (stratford) followed by @ followed by actionscript.org

Please don't email or PM me Flash questions, that's what the Forums are for!

Please don't rely on me reading my PMs either. Email me about important stuff.
Jesse is offline   Reply With Quote
Old 05-01-2001, 09:14 AM   #8
leo99
Registered User
 
Join Date: Dec 2000
Location: Scotland (UK)
Posts: 5
Default Phantom moderators... wooooooo

Ooooh.. spooky, I could have sworn there was a comment from Strok on this thread when I read it yesterday. I even checked the similar thread from crzyhorse and it's not there, think I need to lie down. What's my name again?...

thanks Jesse,

Leo
leo99 is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can unload the external .swf but not the streaming .flv inside it starboard ActionScript 2.0 1 08-28-2007 01:25 AM
external movie, text, css problem openeyes ActionScript 2.0 3 01-21-2006 08:07 AM
Loading images in different frames.. nchagial ActionScript 2.0 22 12-21-2005 09:06 AM
Unloading External SWF txusm ActionScript 1.0 (and below) 3 12-14-2004 09:50 AM
unloading prob wil Other Flash General Questions 2 12-08-2001 06:13 PM


All times are GMT. The time now is 01:04 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.