?
Solved

Flash 5: Run tweened animation in preloader, please help

Posted on 2004-10-21
3
Medium Priority
?
250 Views
Last Modified: 2010-04-03
Hi,

I've asked this before, but received fairly unclear, non-functioning answers.  Here's what I'm trying to do:

In Flash 5, rather than running a progress bar for a preloader (which I do understand and know how to do), I would like the preloader to play an MC -- of a tweened animation -- in proportion to the loading process.  Imagine a watering can tipping over and, when it's fully tipped, that's when the preloader is done and the movie begins.

So, I create an MC, create the tween effect in the MC, drag it onto the stage at Frame 1, and then what?

Again, kindly remember that this is for Flash 5.

Thanks!
0
Comment
Question by:geod100
  • 2
3 Comments
 
LVL 23

Accepted Solution

by:
Zeffer earned 2000 total points
ID: 12377689
you could do it like this..
say the movie you are loading has 10 frames
and the watering can clip has 5 frames and has the instance name of canClip

put a stop on each frame of canClip

on frame 1 of the main timeline put the code..

onClipEvent(enterFrame){
if(_framesloaded==2){
      _root.canClip.nextFrame();
     }
if(_framesloaded==4){
      _root.canClip.nextFrame();
     }
if(_framesloaded==6){
      _root.canClip.nextFrame();
      }
if(_framesloaded==8){
      _root.canClip.nextFrame();
      }
if(_framesloaded==9){
      _root.canClip.nextFrame();
      }
if(_framesloaded==10){
      _root.gotoAndPlay(2);
      }
}

Z
0
 

Author Comment

by:geod100
ID: 12382670
I thought of something like that...the but movie actually has quite a few frames.  I'll try it, though.
0
 
LVL 23

Expert Comment

by:Zeffer
ID: 12383719
the number of frames doesn't matter as long as you do the calculation to break the loading into segments..
if you have 100 frames with a 5 frame watercan movie ..then it would be 10,20,40 etc ..
also it ocurred to me that if you attach the code to the watercan movie..you don't need the instance name and the code is a little more elegant ..

if(_framesloaded==10){
      this.nextFrame();
}
etc

Z
0

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

594 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question