Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Simple Timer Control?



hi all!i'm looking for a script that tells the timeline to start to play frame 25, after 5 seconds.i've found a few codes online but cos they are for different purposes, i just cant seem to custom it to work accordingly.can someone pls help? ps: i'm using Flash 8 much appreciated!



KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 04-24-2008, 06:56 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Get Timer To Control Animations
hi,

im trying to use getTimer to control a attachmovie script. but am unsure of how to do it. basically instead of all the movies being created all at once, i'd like them to appear one by one. i thought by using the getTimer function i could do this. at the moment im using this attachmovie script to position the clips accordingly..


ear = new Array (60);
time = getTimer();

for (i=0; i<ear.length; ++i) {
this.attachMovie("movie", "movie"+i, i);
this["movie"+i]._y = 110 + Math.floor(Math.random()*120)+1;
this["movie"+i]._x = 110 + Math.floor(Math.random()*300)+1;

}

any help would be great thanks

Timer To Control Alpha Help
So i am trying to make a MC that will start at the first frame of the root and then every 300 frames change the top layers alpha up 15 % until it hits 80 and then restart the (said) MC. I know i will need an event listener for this and a timer funtion but no clue how to put it all togather.

my movie clip is called br_MC

please help

Global Timer Control
hi all-

I'm writing a video game and I have used timers all over the place to make everything go. now I want to be able to pause the game, completely. meaning, I need to stop and start all timer instances at once, or globally.

so I created a Timer subclass called CustomTimer, put some statics in there, came up with the attached code. now my problem is that I'm pretty sure I've created a memory leak, in that the instances array will just grow and wont allow or gc.

so, my question is, is there an "onDestroy()" method or somesuch, that I can override, and use that moment to remove instance refs from the instances array?

or, is there a smarter way to do this? an application object w/ a pause method perhaps?

thanks















Attach Code

import flash.utils.Timer;

public class CustomTimer extends Timer {

private static var instances:Array = new Array();

public static function pause() {
for (var i:int = 0; i < instances.length; i++) {
Timer(instances[i]).stop();
}
}

public static function unPause() {
for (var i:int = 0; i < instances.length; i++) {
Timer(instances[i]).start();
}
}

public function CustomTimer(delay:int, repeatCount:int) {
super(delay, repeatCount);
instances.push(this);
}
}

VCR Control With Timer And Click To Next Screen
Hi, I'm having some dificulty compsing these few scripts to work together.
I have a "Start" button, "VCR control" with a built in timer and a button that allows you to goto the next screen in the movie.

I can't get the "Start" button to change the "Play" button from "Play" to "Pause" look on the VCR control. But if I start with clciking the Play button on the VCR control it works fine.

The other problem I have is the "Next Screen" button I need to have work dynamically depending where you are in the movie.

And finally the timer has to work with the time line and start when clicking the start button.

I would appreciate anyones help if they can.

Thanks :-)

Enclosed is the FLA file

Timer, And Volume Control Probs. Using LoadMovie
Hey all,

I am using loadMovie to load an .swf into a container. The swf contains an audio player that has pause, stop, play, and volume control. Most of it is working just fine...the audio player loads into the container and the play, pause and stop buttons work.

Whats not working is the volume controller and the timer. I believe the reason the play, pause and stop work is because the actionscript is inserted right onto those buttons. Where as the volume controller is an MC with two more MCs inside of it which contain the AS and to top that off the MC used to move the volume slider has a button inside with more AS. IS there a way to make these internal AS work or will I have to find a way to bring all those internal MCs to the main timeline?

Those internal MCs use the _root. command so I thought if I took them to the main timeline and removed the _root. it would work...but it didn't. If you need me to send the FLAs please let me know I will post a link ASAP. Any help, suggestion even thought will be well thanked .

Take care.

A Simple Timer
... any way to just start a simple timer? ...

A Simple Timer
K all I'm needing is a simple timer that counts hours, mins, and seconds since it was loaded... I checked the tutorials and I tried improvising with a timer_by_show off of a preloader...My desperation should intice you to help , thanks for the help in advance! The .fla file is attached.. its sloppy as of now but its my style~

Simple Timer
Why isn't this script working? I want it to run on the first frame until 30 seconds goes by and then move the head to the second frame. I'm rank and new to coding, so it's probably stupid.

var timeDemo:Number;
timeDemo = getTimer();
if(timeDemo > 30000){
gotoAndPlay(2);
} else {
gotoAndPlay(1)
}

Simple Timer
Hi.

I'm trying to devise a simple script that I can put on frame 1 that will 'gotoAndPlay(2)' after 5 seconds.


I know it has something to do with setInterval but after looking at about a dozen tutorials and all the Flash help material on the matter, I'm still completly unable to come up with a way to do this. It's irritating as well - every time I want to set up a timer like this I end up having to post on an ActionScript forum. I'll be sure to write the solution down somewhere this time around

Thanks.

Simple AS Driven Timer
hey dudes,

i just wanted to know if there is such
a thing as a "simple AS made timer"?

cause i would really like
to know how one is made


anyhoo, tnx a bunch!

Simple Countdown Timer
I just want to make a simple countdown timer, that everytime the flash movie hits the timers keyframe it counts down from 10 and then plays a sound. Is there a way to do this?

Creating A Simple Timer?
Hi,

I would like my movie to stop (this much I can do) on the first frame and then play frame 2 after 30 seconds. I basically want my movie to loop every 30 seconds. Can anyone help me with this?

Cheers,
Jen

Simple Timer Problems
Hi I'm using this simple timer function in a MC

stop();

function playAfter30(){
gotoAndPlay("b");
}

setInterval(playAfter30, 30000);

It works great,but is messing up the timeline of the main movie.Basically,if you hit a button and go to a marker in the timeline and bypass the location of the MC that has the timer,the play head will jump to another section as soon as that timer has done its thing.Confusing? Ya,I know..is there a way to use a timer in a MC that doesn't affect the main timeline?

Thanks

Simple Timer Ideas?
I'm trying to figure out how to make a simple 2 and 3-second timer using myButton and holdTimer. Here's the general idea:


===============
On myButton press:

reset holdTimer to 0
start holdTimer and let it count

On myButton release:

stop holdTimer

//Decision Time!!

if holdTimer >2 sec and <3 sec, gotoAndPlay ("Shorthold")

elseif holdtimer >3 sec, gotoAndPlay ("Longhold")

else gotoAndPlay the next frame

================

So if the user momentarily clicks myButton, flow simply goes to the next frame, but if user doesn't release myButton, flow goes to some other frame in some other timeline, depending on how long he holds the button.

This code will appear in every frame of a 100+ frame timeline ('cause I can't figger out a more efficient way to do it!)

I'm sure this can be done with only a few lines of code - nothing to display, no dates, etc.

Any suggestions are appreciated!!

Thanks in advance.

How To Create A Simple Timer?
Hi to all,

I'm a newbie, and I would like to know how is the easiest way to build a timer with hours, minutes, seconds, a start/stop button and a reset?

Thank you in advance,

Ricardo.

Simple Timer IF Statement
I'm building a continous move in flash, and i'm displaying some text and images and want to hold the timeline for about 20 seconds and then resume play again. I'm trying to write a simple timer in AS to keep from having to create 10000 frame long movie clips. Here's what I have so far:


Quote:




stop();

this.onEnterFrame {
time = getTimer();
if (time == 20) {
play();
}
}




Unfortunately, this isn't working for me, and i'm unsure why. I suspect two things, A: my "time" var takes only a snapshot value of the timer and not a continous value, so the timer never reaches the value of 20. Or, B: I have somesort of syntax wrong and the if never gets a chance to load. This seems like a relitively simple task, and i'm hoping one of you guys can shed some light.

Thanks!
--Isis.

Simple Timer Question
Hello,

I'm from Belgium (so excuse my english) and I'm a beginer in flash.

I've got a simple question for you :

I'd like to create a little script that goes to the next frame when 10 seconds have passed and I don't know how to do.

Please help me

xxx

Simple Timer Modification
I came across this timer from http://www.triquitips.com/flash_simple_timer.html and was wondering if anyone can assist in a little modification? I've emailed the publisher, but yet to receive a response yet.

Rather than the timer start from 00:00, I need it to start from 45:00 (45 being minutes).

Code:
startTime = getTimer();

onEnterFrame = function () {
elapsedTime = getTimer() - startTime;
elapsedHours = Math.floor(elapsedTime / 3600000);
remaining = elapsedTime - elapsedHours * 3600000;
elapsedM = Math.floor(remaining / 60000);
remaining = remaining - elapsedM * 60000;
elapsedS = Math.floor(remaining / 1000);
remaining = remaining - elapsedS * 1000;
elapsedH = Math.floor(remaining / 10);
if (elapsedHours < 10) {
hours = "0" + elapsedHours.toString();
}
else {
hours = elapsedHours.toString();
} // end if
if (elapsedM < 10) {
minutes = "0" + elapsedM.toString();
}
else {
minutes = elapsedM.toString();
} // end if
if (elapsedS < 10) {
seconds = "0" + elapsedS.toString();
}
else {
seconds = elapsedS.toString();
} // end if
if (elapsedH < 10) {
hundredths = "0" + elapsedH.toString();
}
else {
hundredths = elapsedH.toString();
} // end if
_root.timer_txt = hours + ":" + minutes + ":" + seconds + ":" + hundredths;

};Any help would be much appreciated.

Simple General Timer?
Hi, having spent many hours, with books and the web I'd like to ask for your help with a bit of code that wont run as I want it to.

The code is a simple Timer function, that works when I use it directly on the main timeline, but for the life of me I cannot get it to work as a class. I wish to have it as a standalone Timer class that I call when ever I want to have a delay (and ideally send it the delay). At the moment it wont even run with trace statements in the functions. The following is the code that works when on the main time line.

//start of Timer script

var delay:Number = 87;
var timer:Timer; // sets up a new Timer variable.

function myTimer()
{
timer = new Timer(delay, 10); // sets up a new Timer instance with a delay of 87 ms and how many repetitions (0 = continuous loop)

timer.addEventListener(TimerEvent.TIMER, onTimer); // adds a listener to the Timer and runs the function when the Timer starts

timer.addEventListener(TimerEvent.TIMER_COMPLETE, onTimerComplete); // this listens for when the Timer is complete (i.e. when the second number has been reached)

timer.start(); // this starts the timer running.

trace("inside timer");
}

function onTimer(event:TimerEvent):void
{
trace("tick");
}

function onTimerComplete(event:TimerEvent):void
{
trace("Finished!");
}

myTimer(); // runs the myTimer function'

// end of script

the above all works fine.

But when trying to use as a class it gives the following error.....

"TypeError: Error #1034: Type Coercion failed: cannot convert 87 to generalTimer. "

I have tried various types (Number, int, String) and it still says the samething.

Here's my class file....

// class file

package
{
//trace("called as file");
import flash.display.Sprite;
import flash.utils.*;
import flash.events.*;
public class generalTimer extends Sprite
{
//public static const w:Number = 10 * 1000;
public var timer:Timer;
trace("inside timer class");

public function generalTimer(w:Number)
{
timer = new Timer(w, 10);
timer.addEventListener(TimerEvent.TIMER, onTimer);
timer.addEventListener(TimerEvent.TIMER_COMPLETE, onTimerComplete);
timer.start();
trace("inside timer");
}

private function onTimer(event:TimerEvent):void
{
trace("tick");
}

private function onTimerComplete(event:TimerEvent):void
{
trace("Finished!");
}
}
}

// end of class file

In the .fla file i have the following....

// start of .fla file
var w:Number = 87;
generalTimer(w);
// end of .fla file

why cant I send it a number to act on as it does inside my .fla file or like arguments sent to a function?


Also even when testing it with the code as a standalone class as follows, it doesn't do anything?

//
public class generalTimer extends Sprite
{
public static const w:Number = 10 * 1000;
public var timer:Timer;
trace("inside timer class");

public function generalTimer()
{
timer = new Timer(w, 10);
//


I've tried 'generalTimer;' which doesn't do anything. I've tried 'generalTimer();' which gives me 'too many arguments' error.

Im eventually looking to have it return something(not sure yet) when the 'onTimerComplete' event happens too, but that'll be my next problem.

Please help as all logic has gone out the window it seems.

Thanks in advance.

Trev.

Simple Timer IF Statement
I'm building a continous move in flash, and i'm displaying some text and images and want to hold the timeline for about 20 seconds and then resume play again. I'm trying to write a simple timer in AS to keep from having to create 10000 frame long movie clips. Here's what I have so far:


Quote:




stop();

this.onEnterFrame {
time = getTimer();
if (time == 20) {
play();
}
}




Unfortunately, this isn't working for me, and i'm unsure why. I suspect two things, A: my "time" var takes only a snapshot value of the timer and not a continous value, so the timer never reaches the value of 20. Or, B: I have somesort of syntax wrong and the if never gets a chance to load. This seems like a relitively simple task, and i'm hoping one of you guys can shed some light.

Thanks!
--Isis.

Building A Simple Timer
I'm learning Actionscript
what I'm doing is building a simple timer.
I just want flash to display the current time in a textbox
just a an exercise. can anyone give me some hints?, suggestions? heres my code:

var hrs="hours"
var mins="mins"
this.createTextField("textbox",200,25,100,20,0)
function showTime(){
textbox.getHours
textbox.getMinutes
return showTime
}

Could you also suggest any small projects I
can do to practice loops and functions?

_Mag

Simple Timer Countdown Script Help
In my car game, I want a timer to count down from 8 seconds, but I want it to have Milliseconds in it also.

So I have a seperate variable for the seconds, and one for the Milliseconds in the MC "Timer"

On the keyframe of the timer i have this code:


Code:
stop ();
go = 1;
_root.timer.seconds = 8;
_root.timer.milliseconds = 60;


I have these actions on the MC "Timer"


Code:
onClipEvent (enterFrame) {
millidisplay == milliseconds;
if (_root.go == 1) {
milliseconds -= 1;
}
if (milliseconds == 60) {
millidisplay == 0;
}
if (milliseconds == 59) {
millidisplay == 59;
}
if (milliseconds == 0) {
milliseconds == 60;
seconds-1;
}
if (String(seconds).length == 1) {
seconds = "0"+seconds;
}
if (String(milliseconds).length == 1) {
millidisplay = "0"+millidisplay;
}
////This is irrelevant to the timer script
if (seconds == 0 && milliseconds == 0) {
stopAllSounds ();
gotoAndStop ("training");
tellTarget ("_root.cursor") {
gotoAndStop (1);
}
tellTarget ("_root.trainingcaption") {
gotoAndStop (2);
}
tellTarget ("_root.trainingpicture") {
gotoAndStop (2);
}
}
}
(Millidisplay is the actual what the player will see for the milliseconds part of the timer. It was my attempt to get the script to work, but you can just use milliseconds if you have modifications to the script.)

Thanks a million!

How To Make A Simple Countdown Timer
i need help with a game i am making. I want it so that when the scene starts (in this case scene 2 contains the game) and it starts counting down from 59 - 0 in seconds (1 min) and when the countdown has finished, i want the movie to proceed onto the next frame.

thank or the help

How To Make A Simple Countdown Timer
i need help with a game i am making. I want it so that when the scene starts (in this case scene 2 contains the game) and it starts counting down from 59 - 0 in seconds (1 min) and when the countdown has finished, i want the movie to proceed onto the next frame.

Simple Preloader Timer I Can't Get To Work
Hello, i'm just working on a simple preloader and i can't get my timer or my load bar to work properly. There's a bug or two in the script somewhere. I've gotten all the other elements in it to work except those two. I'll list the code here but i'll also include the file because thats probably the best way to see what i'm talking about. Thankyou very much to anyone who can help.

Here's the code:

Frame 1 -

this.onLoad = function() {
//StartTime = getTimer();
StartTime = getTimer();
};//starts a timer that gets how long the movie has currently been playing in milliseconds.
total_kb = int (_root.getBytesTotal()/1024);//calculates movie's total size in kb using built in function.
loaded_kb = int (_root.getBytesLoaded()/1024);//calculates movie's loaded amount in kb using built in function.
//next line checks to see if loaded kb is smaller than total kb, i.e. still loading.
this.onEnterFrame = function() {
if (loaded_kb < total_kb)
{
remaining_kb = total_kb - loaded_kb;//subtracts loaded kb's from total kb giving remaining kb.
percent_loaded = (loaded_kb/total_kb)*100;//finds out percent loaded by extracting information from loaded kb and total kb.
percent_loaded_text = Math.floor(percent_loaded) + "%";//rounds down number to nearest integer.


dl_speed = loaded_kb / ((getTimer() - StartTime) / 1000);//converts time between starting and this point to seconds and finds an average download speed.
remaining_time = Math.floor(remaining_kb/dl_speed); //calculates an exact remaining time judging by average download speed.
loadBar._xscale = percent_loaded;//scales the load bar to a percent value equal to the percent loaded.
trace (StartTime);
}
else
{
_root.play();
this.onEnterFrame = null;
}
};

Frame 2 -

gotoAndPlay(1);

Help With Simple Timer Controlled Function
Hey there,

I'm trying to detect if the user has not moved the mouse in my flash menu for 5 seconds, and if so, reset the menu. I stumbled upon the following:
http://livedocs.macromedia.com/labs/...=00000075.html

(note the corrected code in the comments...)

... and this is as far as I've gotten. Any help would be greatly appreciated!


Code:
navReset = function () { /* I'm ok with this part - just need to write it */ }

var minuteTimer:Timer = new Timer(1000, 5);
minuteTimer.addEventListener(TimerEvent.TIMER_COMPLETE, navReset());
minuteTimer.start();

onMouseMove = function() { minuteTimer.start();} // will this even restart the timer ?

Newbie Needs Help With A Simple Timer Script
Please help this newbie out.

I am trying to script a simple 3 second timer. Everything works fine except the jump. Can someone please check my code and tell me why it fails to jump to "new".

frame 86 label "wait"
frame 100 label "new"

script on frame 85:
starttime = getTimer();

script on frame 89:
g = getTimer();
timepassed = g - starttime;
if (timepassed >= 3003) {
gotoAndPlay("new");
};
gotoAndPlay("wait");

TIA

How To Create A Simple Preloader Timer Script?
onClipEvent (load) {
tkb = Math.round(_root.getBytesTotal()/1000);
_root.totalkb = ("kb of " add tkb add "kb loaded");
}
onClipEvent (enterFrame) {
kb = Math.round(_root.getBytesLoaded()/1000);
kbleft = tkb-kb;
_root.kbloaded = kbleft;
if (kb == tkb) {
_root.nextFrame();
}
}


I want to add a simple timer that countdowns the amount of time left for the file to load.

like this:

LOADING
398 of 3000 kb loaded
0:00:18 <--------------- hmm?

Simple Timer, After 15 Secs, Gotoandplay Next Frame
I thought I was getting ok with flash but cannot solve this one.

Im trying to make a timer (none visual).

So after being on a key frame for 15 seconds it goes and plays the next keyframe.

I know the script is really simple but I gave up at 3am

any code or links would be kind, thank you.

Timer Events - Simple Way To Pause Action?
I'm working with a couple of simple transition effects in a banner. I want it to do nothing for 10 seconds and then start my TransitionManager.

Do I need a timer event? Or there's a more simple way to pause/stop all operations at the beginning of my code?

Simple Timeline Control Q
Hi people,
I know this is a stupid question, but I can't seem to find a working solution anywhere !?

I have a navigation MC that loads at the beginning of the main movie.
I would like the buttons in the Nav MC to affect the timeline of the main movie (move it forward etc).
I can't seem to work this out.

The references to Relative and Absolute paths I found in the Flash Help files are to do with controlling other MCs.

Cheers in advance.
Ope

Simple Movie Control
i need to go to a specific frame in a clip,
which is located in side a parent clip.

what would the code look like for going
to a specific frame in the embeded clip
from the parent clip?

thanks

Movie Control (simple I Know)
Hi there.
I've just started using flashMX and I can't get my movie control working for the life of me. I'm **** at action script. I just need some simple code to make my movie work.

When the movie loads, the movie stops and a 'play movie?' button comes up. So I need a 'play' button, a 'stop' button (for users to stop the movie) and when the movie comes to the end a replay' 'button appears.

Does anyone have any code that can make this happen???

Thanks to anyone that can help.

Simple Sound Control
I need help on a simple request. What I'm trying to do is play an mp3 file (it's duration is about a minute long) when a user clicks on a button, and when the user clicks on the button again, the mp3 would stop playing. Everytime I try to import the mp3, create a button, I can get the song to play, but I can't stop it (and it's worse if I hit the button a second time). I heard this can be done via action script, but I'm not too familiar with it. I'd appreciate any help. Thanks.

Simple Sound Control
I've scanned the forums for a while and have been unable to find a simple and concise awnser to createing a simple sound control panel.
All I need is the action to Stop the sounds, (...stopAllSounds?) and how to start them again after the user has stopped them. Volume controls would also be apprecieated.

Simple MC Control With A Button
Can someone direct me to an example of a button that controls a MC or an object? I am trying to make buttons that will move a MC across X and Y positions without using the timeline to specify exact locations...just actionscript. I cannot find a good example anywhere online, and I know it's relatively easy..

Simple Movie Control
I'm utterly new to ActionScript and Flash, and I'm trying to make a button with a fade effect. Mouseover it and it fades in, mouseoff and it fades out. I assumed that, to do this, I would us on(rollOver) and have it play the movie clip. And in the movie clip, have it pause at a specified frame. Then on(rollOut) have it goto the frame after that frame and play it, but this doesn't work. Anyone care to give me a little help?

Simple Volume Control
Hello.

Im having a bit of a struggle understanding volume control in AS3. I have never needed to do this but now I do....So if anyone can post me some ideas on how to start off my code I would very much appreciate it.

I just want the user to click a button and the volume (in my embedded flv) to turn off and on likewise when they click it again. I have a little piece of dynamic text that also I want to say "OFF" or "ON" depending on if the volume is on or off.

Thank you very much for any insight.

V.simple Movie Control...
Could some kind person please tell me how i can control movie clips to play in sequnce.

I have several movie clips, which are all contained in the main scene, basically i just want them to play in order. ie. 'clip2' starts playing immediately after 'clip1'.

Is there some script i can put in the last frame of say 'clip1', that will go to and play frame 2 in the main time line. Then I could just put 'clip2' in the 2nd frame of the main time line, and they will play in sequence. Is this the right way to go about it?

I have tried using various bits of script to get this to work, but im a bit new to the actionscript side of flash.

Thanks...

Movieclip1 To Control MovieClip2 Simple?
Hi
I have read the posts but have failed to see something that will answer my problem

I have:
Movieclip1:
a) movieclip1 spans from frame 1 to frame 10 on the main timeline.
b)movieclip1 itself is 20 frames long.
c) I have a button in this movieclip that spans the movieclip for the full 20 frames.


Movieclip2
a) Movieclip2 is a named movieclip called Mete.
b) Movieclip2 is only 1 frame (it is actually a graphic I put into a movie clip so I could control it)
c) Movieclip2 is sitting in frame 10 on the main timeline. So it is is "sharing" a frame with movieclip1

Question: Apart from "What am I doing wrong? Grrrrrrr.

What is the proper command to tell the button in Movieclip1 to play Movieclip2 (Mete) in the main timeline?.

I have tried every combination of Tell target and I just cannot make it work. What am I missing?

Many thanks

Help With A Simple Actionscript Regarding Movie Control
Hey all,

Being a Flash newbie, I am having trouble getting my movie clips under control. Everything I have read on the forums regarding my situation has not worked, so I want to post what I need in detail.

I have a simple one timeline movie with multiple stops. At one stop, I want a button to play another movie clip just in that frame. The movie is an avi I imported and I created a movie clip with the avi in it. The movie avi is called indiamovie and the movie clip symbol is called indiamovie2.

The movie clip with the movie is set up like so. The movie starts on frame 2, and I have stop commands on the first and last frames so the movie plays once and does not play by default.

On the main timeline, I have the movie clip and a button on the frame where I want to play the movie. The problem is that no matter what code I try, the button will not make the movie play! Here is what I have now:

on (release) {
tellTarget ("_indiamovie") {
play();
}
}

I have tried many different commands and code (_root.indiamovie2, etc...), this is just the latest. When I play the movie, I get the following error:

Target not found: Target="_parent.indiamovie" Base="_level0"

All I need is the right code to start the movie clip playing on the frame - can anyone help me out?

Simple Sound Effects On/off Control
I seem to be having a memory failure. I have done the 'Bouncing Ball' and in the middle frame I have put a 'Boing'. How do I use a Button to control whether someone hears the sound or not?

Simple Navigation/Control Question
I've got a 20 frame movie I'd like to allow a user to play forward and backward one frame at a time(it's a tutorial). I've laoded this movie clip in the first frame of my main move. I've got forward and back buttons in another layer of my main movie. I've already dowanloaded/tried andrew_s's play anything backwards -this works fine if I want continuous play, but I want the user to be able to go frame by frame. The only other way I can think of doing this is by putting the buttons on every frame of the movie and using frame labels -but i was hoping to do something more efficient.

Thanks,

G

Simple Timeline Control Problems
I do not know what I am doing wrong. I have a movie with 3 scenes. The first scene is a preloader that sends you to the second scene. The second scene has an animation that plays and when it is finished it is suppose to send you to the final scene. The first frame of the second scene has a stop(); action so that the playhead will not keep going. On the stage of Scene 2 there is mc_animation movie clip. Within this clip there is an action layer with a keyframe on frame 70 which is suppose to direct the timeline to goto the next scene.
PHP Code:



this._parent.nextScene(); 




It does not work.I have also tried
PHP Code:



nextScene(); 




,
PHP Code:



_parent.nextScene(); 




and
PHP Code:



gotoAndPlay("Scene 3", 1); 




and none of them do anything. Can anyone offer me some advice. This should be easy but I am stumped. Thanks!

Simple Array And MC Control Problem
Hi

I need to throw together a quick and simple Flashcard like application in flash, to test myself and my sister and aid in study. Problem is I'm not sure how to go about coding it.

Basically the app should work like this.
1 movie clip dominates the screen. It displays frame 1 which allows you to enter your name, and click start.
An array containing numbers 2 through 50+ (depending how many questions I need to make up) is randomized so that you can go through the tests questions, without getting the same order twice. I'd have coded it using a simple randomize function, but I only want the questions to show up once.

Once the array is randomized you are taken to the frame of the MC that lies at the top of the array. You answer the question, click a button and are taken to the next frame in the list, and so on until all the questions have been answered.

Final frame of the MC. Answers are checked, score is given.I haven't really worked with arrays yet, just never really came up before, and now I'm regretting it. I would have gone straight to the tutorials instead of bothering you here, if this problem wasn't outside any tutorials sphere enough to require not just knowing the basics, but how to use them creatively. Meaning more time learning on my part, and time is precious right now. My other test is approaching :/

At any rate, I was hoping you might give me a boost with this app.
All I need is help creating an array that holds information relating to the frame numbers in the MC (numbers which i have no problem entering manually) and can be randomized at the right time, and will allow you to go through the questions (aka MC frames) randomly and once, as you click on next buttons (a previous button is not needed). (Note: Frames 1 to 2 and total_frames - '1 to 2' shouldn't be randomized with the rest. They'll hold the enter and exit screens)

Thanks for at least reading this.
I'd appreciate any and all help, code and tips you might provide.

-Lem

Simple Control Panel For Ffw/play/pause/rw
Does anybody have a basic *.fla file or swf that contains a simple user-control panel?

I need to have the user able to play, pause, fast-forward and rewind. I need this control panel to apply to all scenes of the flash movie and also to be stored in a library for future use across a range of movies. Because of this I don't want the buttons in the control panel to have to include any script that references specific frames/scenes, just general commands that will always work.

It should look something like this:

Rewind (<<) | play (>) | Pause (||) | Fast-forward (>>)

Any ideas? suggestions? Are there any tutorials on this?
Any help would be greatly appreciated, thanks...

Simple Form Movie Control Problem
Ok. Here is the deal. I have created a simple form with one input. It prompts the user to enter a user name. The data they enter is then checked to see if they need to enter a password. If they do not need to enter a password, they can proceed in whatever I want them to do. If they need to enter a password, they are promted to enter one. The data they enter is then checked to verify the password. If it is wrong, they must enter it again to proceed.

If the user presses the login button, the form works just fine. Here is the problem. The second the user presses the "enter" key, the form just goes crazy.

If the user presses the "enter" key before entering a user name, they are automatically prompted for a password. Furthermore, if the user enters a user name and then presses "enter" and does not click on the submit button, they are promted for a password even if they do not need to enter one.

How can I take away the "enter" key functionality so that it does not proceed to keep going in the movie? I have used the stop() function where needed. It still disregards that though. Any ideas or suggestion would really help.

I have stripped down the program and it can be viewed here (www.ptpnewmedia.com/login_test.html).

User Name (This is case sensitive): Test
Password: 1234

Thanks

Simple Movie Control Question - I Suck
Hi All - I'll try to explain this but I appreciate anyones help very much - this question will show my lack of experience with Flash but I gotta learn someday!

So here's the deal...

I got 4 'movie' symbols each 135 frames
I got some background and border stuff on my main stage.

All I want to do is have in my main scene (Scene 1) have 4 frames (any 4 but I got 'em labeled and set about 10 frames apart for easy viewing) each with a movie symbol, so when one is done it nicely moves to the next without having to spread all 135 frmaes for each clip. I may want to overlap them so as one fades out the other fades in so they need to be independent and lastly I may need to massage each ones frame count so here's what I tried...

So, I got an action on Frame 1 to 'stop();' so that I can play my first movie symbol (movie_01) - this works fine.

BUT I want an action IN my movie symbol to tell the main stage to move on to movie 2 after its played my movie 1. So I thought - OK I'll just add an action on the last frame of movie_01 to goToAndPlay ("Scene 1", 10); thinking it will just go to frame 10 of the main stage where my second movie symbol sits.

Somehow not the case - I must be trying this the wrong way but it seems like such a simple thing.

Flash help says that I can't use gotoandplay from within a movie clip to control the root timeline... so how do I do this? Do I have to make separate scenes for each clip? seems clunky but I could...

I'm sure there is something better I just have almost NO knowledge of the program - just enough to do very linear animation/slideshows but I'm hoping one of y'alls gurus out there can lend a hend.
Thanks very much for any help!!! --bp

Help Simple Control Parent Movie Clip
I have got a movie clip called "index.swf" which has "home.swf" loaded into it.

I am trying to create a script for a button in "home.swf" that tells the parent "index.swf" to goto and stop on 1.

Can anybody help?

Copyright © 2005-08 www.BigResource.com, All rights reserved