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








Timeline-like Control With ActionScript


I have modified some of Steven Grosvenor's code in 'text effects' to include multiple lines of 'messages' to form a kind of advertisement. While it is not a finished product by any means, I have hit a snag...how to go on to the 'next thing' that I would like the movie to do once all of my text messages have played?

I'm new to the only-code side, but in timeline-speak I would just tell it to load/go to a particular movieclip/frame and play...how can I control playback in a linear sense when I am only in one frame? Do I add code to the 2nd frame in the actions layer (that did not seem to work), or do I call another function from a case within the first and just keep stringing things along?

It is rough as I am still experimenting, but I have included the code for reference. All of it is in the Actions layer in frame 1 in my movie. FLA is attached also.

Any other comments on my 1st code attempts are welcome as well.

TIA!

-Hank


Code:

var messagestep = 0;
var elapsed = 0;
MovieClip.prototype.OpacityTransition = function(pausevalue, max, min, step, messages) {
delay = pausevalue;
messagemarker = messagestep;
this.elapsed = elapsed;
this.messages = messages;
this.max = max;
this.min = min;
this.step = step;
this.counter = 1;
this.fadeIn = true;
this._alpha = min;
this.message = this.messages[0];
this.onEnterFrame = function() {
if (this.fadeIn) {
this._alpha += this.step;
} else {
this._alpha -= this.step;
}
//Play "pausevalue" (argument) delay loop
if (this._alpha>=this.max) {
startTime = getTimer();
while (this.elapsed<delay) {
//open WHILE LOOP
currentTime = getTimer();
this.elapsed = (currentTime-startTime)/1000;
//calculates elapsed time in seconds
}
//close WHILE LOOP
//this.nextFrame();
//End "pausevalue" (argument) delay loop
}
if (this._alpha<=this.min || this._alpha>=this.max) {
this.fadeIn = !this.fadeIn;
if (this.fadeIn) {
this.message = this.messages[this.counter++];
if (this.counter>this.messages.length) {
this.counter = 0;
messageincrement = messagestep;
messagechange(messageincrement);
}
}
}
};
};
messagechange = function (messageincrement) {
switch (messagestep) {
case 0 :
message.OpacityTransition(3, 100, 0, 3, new Array("Healthcare costs JUMP every year..."));
messagestep = 1;
break;
case 1 :
message.OpacityTransition(0.5, 75, 0, 5, new Array("Bleeding", "Your", "Budget"));
messagestep = 2;
break;
case 2 :
message.OpacityTransition(2, 100, 0, 5, new Array("Eroding the Benefits You Can Provide"));
messagestep = 3;
break;
case 3 :
message.OpacityTransition(3, 100, 0, 5, new Array("Another single unit message"));
messagestep = 4;
break;
default :
message.OpacityTransition(0, 100, 0, 5, new Array("No", "Data", "here"));
messagestep = 4;
}
};
messagechange(0);




SitePoint > Design Your Site > Flash and Actionscript
Posted on: Sep 30, 2004, 15:14


View Complete Forum Thread with Replies

Sponsored Links:

Help With Menubar Timeline Control Using Actionscript
Hi, I'm creating a website for my company, and everything is working great except for one problem. I cant get the menubar menus to navigate throughout the timeline. I've attached the code. I've got instances to all of the sections i want each menu item to go to. But I cant get them to work, i dont get any errors so that doesnt help me either.

Heres an example:
}else if (item == menu.JobsInstance){
gotoAndStop("jobs");

From what I know about actionscript, the gotoAndStop("jobs") should take it to the frame with the instance name jobs. I've also tried using the frame number, but that doesnt work either. Im really confused, any help is greatly appreciated.

Here's the code for the whole menubar:

Code:
var menu = MainMenuBar.addMenu("Home");
var menu = MainMenuBar.addMenu("Company");
menu.addMenuItem({label:"About Us", instanceName:"AboutUsInstance"});
menu.addMenuItem({label:"What We Do", instanceName:"WhatWeDoInstance"});
menu.addMenuItem({label:"Contact Us", instanceName:"ContactUsInstance"});
menu.addMenuItem({label:"Privacy Policy", instanceName:"PrivacyPolicyInstance"});
menu.addMenuItem({label:"Jobs At STNC", instanceName:"JobsInstance"});
var menu = MainMenuBar.addMenu("Products");
menu.addMenuItem({label:"Hardware", instanceName:"HardwareInstance"});
menu.addMenuItem({label:"Software", instanceName:"SoftwareInstance"});
menu.addMenuItem({label:"Web Design", instanceName:"WebDesignInstance"});
var menu = MainMenuBar.addMenu("Partners");
menu.addMenuItem({label:"Style Electronics", instanceName:"SEInstance"});

var listen = new Object();
listen.change = function(evt){
var menu = evt.menu;
var item = evt.menuItem
if (item == menu.newInstance){
myNew();
trace(item);
}else if (item == menu.openInstance){
myOpen()
trace(item);
}else if (item == menu.SEInstance){
getURL("http://www.styleelectronics.com");
}else if (item == menu.HomeInstance){
gotoAndStop("home");
}else if (item == menu.AboutUsInstance){
MainMenuBar.gotoAndStop(23);
}else if (item == menu.WhatWeDoInstance){
gotoAndStop("whatwedo");
}else if (item == menu.ContactUsInstance){
gotoAndStop("contactus");
}else if (item == menu.PrivacyPolicyInstance){
gotoAndStop("privacypolicy");
}else if (item == menu.JobsInstance){
gotoAndStop("jobs");
}else if (item == menu.HardwareInstance){
gotoAndPlay("hardware");
}else if (item == menu.SoftwareInstance){
gotoAndStop("software");
}else if (item == menu.WebDesignInstance){
gotoAndStop("webdesign");





}
}
menu.addEventListener("change",listen);

View Replies !    View Related
[f8] Actionscript Timeline Control Issue
I have a turtle strolling across the stage. (http://heckhouse.com/turtle.htm) The first time you mouse over him, he does exactly what I want. He stops moving and goes to the hiding position. But if you try to roll over him again, he'll hide, but he keeps sliding across the stage. Here is the code on the moveclip:

on (rollOver) {
this.turtle.gotoAndPlay(1); <-- This is the hiding animation
}
on (rollOver) {
this.stop();
}

And here is the code on the last frame of the hiding moveclip:

this.gotoAndPlay(1)
onEnterFrame = function() {
this._parent.play();
}

I'm assuming the problem is that it's wanting to finish out the motion tween before it stops again... Is there any way to fix this?

View Replies !    View Related
Sound Control With Pause Button As Well As Timeline Control
Hi there

I have a flash page, with a ambient track playing. I added a pause and play button. So you press the button then it stops, then you press it again then it plays...

So now i want to make it so that if you go to the 'WORK' page on the site, wich is on its own frame, and wich has different buttons linking to it, then i want the sound to switch off when i am on the work page as well.
So if the background ambient music plays, and you go to work then the sound switches off. Untill you switch it back on again
How is the best way for me to do that?

View Replies !    View Related
How To Control The Main Timeline From An MC Timeline?
May an action in a movie clip's timeline or within an OnClipEvent target the scene's main timeline, say, forcing the swf to go to its third frame, for example? Thanks for any idea.
P.S. Actionscript 1.0

View Replies !    View Related
Control Of Main Timeline From Another Timeline
Working in Flash Pro 8 (on a Mac), I've got a movie clip on the main timeline. Within the movie clip is a button which, upon pressing, reveals a series of three more buttons.

My objective here is that when you press any one of those given buttons that are within the single button that is within the movie clip an instance of which is on the main timeline that it will take you back to a specific frame on the main timeline.

I am having a devil of an unsuccessful time with the concept of connecting back to the main parent timeline from a child timeline.

Any words of direction on how this is accomplished would be, as usual, appreciated.

Christian Seaborn
seaborn.christian@gmail.com

View Replies !    View Related
ActionScript Differences Between Main Timeline And Movie Timeline?
Hello,

Could someone explain the difference if Action Script is on the main timeline or in a movie clips time line which is on the main timeline?

I guess I mean is with regards to referring to other items or movie clips or external scripts etc.

To try and clarify what i'm going on about....

I have a form that uses a php script. The form.swf is brought into my main movie with 'loadmovie' action script.

When the form.swf is run on its own it works. When someone enters the info and hits 'send' the form gets what it needs from the php script and then goes to a 'sucsess' frame. Great.

But..

When the form.swf is run from within my main movie and someone hits 'send' the form goes to my 'fail' frame (even though it is sending the email), the php script is returning a 'fail - invalid email entered' message to the flash form (the email was valid though!!).

Because the form.swf works on its own I'm guessing that, when loaded into the main movie, i need to add something to make it talk to the php properly.

The odd thing is that it must be talking to the php as it is sending the email!!! So why is the php sending back a 'fail' and not a 'success'.

It could be that the form.swf is just not getting a response from the php and so it going to the fail frame. In which case, if my form movie is within my main movie what do i add to the php (or action script) to receive the info to the nested movie.

I cant work it out.

Thanks soooo much for your help.

Julian

View Replies !    View Related
How To Control Timeline Of The 2.swf..
how to control timeline of the 2.swf file loaded to the 2.html
from 1.swf. file in the 1.html?
i want to go from 1.html (src = 1.swf)
to the 2.html (src = 2.swf) ...easy
but i want to choice 1st or 2nd frame from the 2.src
i used for the button in 1.src this code:
A HREF=javascript:MM_controlShockwave(','2.html','Go toFrame','2')
but it doesn´t work
t.f.y.h.

View Replies !    View Related
Control Timeline From Mc Within Mc?
I am having a bit of a nightmare with this:

I have a button placed on the last frame of a movie clip contained within another movie clip placed in frame 2 of my main timeline.

How can I make the main timeline play when the button is pressed/released???

Here is the current code on the button:

code: on (press, release) {
_root.gotoAndPlay("3");
}


I know there is something missing... but what is it!!!

any help much appreciated!
Diggz

View Replies !    View Related
Mc's Timeline Control
How do i control a mc's timeline from the main timeline.
Love to know how it's done...

View Replies !    View Related
Timeline Control
Here is one for you,

i can control from sence to scene, that nice and easy as we all probably know.......

the problem is when i go inside a movie clip, then inside another how do i (with the aid of a button) get back to the main time line?

have done it before and thought it was something along the line of back a dir in normal html format: ../

but having no luck.........


thanks

View Replies !    View Related
Can't Control Timeline
Hi,

I'm using the following script on a button that takes the user from the end of my scene's timeline to the beginning - kinda like a refresh button. (the name of the scene is "main").

on (release) {
unloadMovieNum(1);
unloadMovieNum(2);
gotoAndPlay("main", 1);
}

The code works fine except that once it starts playing on frame 1, it doesn't stop. It just keeps playing my movie, ignoring every stop along the way while playing every other action it comes across.

Anyone know why this is happening?

cheers, jen

View Replies !    View Related
Timeline Control
I was wondering if it's possible to play different segment of the timeline?

For example, when i click on a button, i want it to go to
frame 30-40, and then 50-60.

Is it possible to do that using only one button(without any actions on the timeline)?

View Replies !    View Related
Timeline Control?
I was wondering if it's possible to play different segment of the timeline?

For example, when i click on a button, i want it to go to
frame 30-40, and then 50-60.

Is it possible to do that using only one button(without any actions on the timeline)?

View Replies !    View Related
Timeline Control
I am working onn quite a simple website that requires buttons to nvaigate to different frames within a nested movie clip. The problem is that when clicking on the logo (top left) the movie jumps alternately between the correct frame and the next frame(section) along the timeline.

The other buttons go to the correct frame and stay there, it is just this logo button that won't consistently go to the correct frame.

Any help would be appreciated.

Cheers,
Jamie

View Replies !    View Related
Timeline Control
Hi All,

I was wondering if there is a way to control the timeline in a movie to move forward and backward until a certain labeled frame but without skipping the middle part until it reaches there.

For example I have a movie with the numbers from 1 to 7 tweening and each shape tween starts with the corresponding frame label.

(Ie: Label Frame 1 starts the morph of 1 to 2 and so on)

And what I want to do is when I am in the begiining of my movie I see the number "1" and the navgation menu buttons for each number.

If I click on "2" on the navigation, the animation should simply will happen and stop at Label Frame 2. Ok this is easy and I know how I can do it. But what I really want is to be able to click any number and still see the tweeining of the rest of the numbers until I get there.

For example I am in the beginning of the animation.

I see "1" and the menu and then I click on the number "7" on the menu,
The animation should be 1 morphing to 2 , 2 morphing to 3, 3 morphing to 4 .................. and finally 6 morphing to 7 and STOP.

And I want to be able to go BACKWARDS too , the same way. And also I want to be able to go from any NUMBER to any other number.

Sorry for this long message. I hope you understand what I am talking about and I hope you can help me..

Any help is appreciated. Thanks

View Replies !    View Related
Timeline Control Help
im kinda stuck with this thing i wanna do, to explain ill use an example.

say i have a book of 12 pages, and i got an animation sequence from page 1 to 12 on a timeline , animating each turn of the page, now i have an index (12 buttons) where i pick what page i wanna look at. if im viewing page 3 and i click on page 10, it will play the animation from page 3 to page 10 and stop at page 10.

i guess what i wanna know is how can i make a timeline play by clicking a button and depending on the button that was clicked it will stop on a specifc frame

the way i was tring to do it was each page ( a specific frame) on the animated timeline has a name, and i added to the index buttons a independant var name and a condition where when the button is pressed it will play the timeline and stop if frame == var name. but im kinda unexperienced in this and it didnt work. i think it has to be something like a global condition or something? because the condition i used will probably chk for the name when the button is released, but will not seek that condition while playing the timeline?

any help would be greatly appreciated

View Replies !    View Related
Control Timeline
Whats up all,

is there a way in flash to set timing in the time line to go to another frame lets say after 15 seconds go to and play frame 22.

View Replies !    View Related
Timeline Control Bar
Hey all.

I've had a long look through the tutorials but I can't find what I'm after.

Basically I want a bar at the bottom of my movie that the viewer can use to move to any point in the movie, like you would have on any movie viewer for video files.

My actionscript is virtually non-existent but I'm thinking some kind of mouse position detector that corresponds to particular frames.

Anyone know where I could find the code for this?

Thanks in advance

View Replies !    View Related
Timeline Control
Can I control the timeline of a movie in level 0,
with actionscript from a movie in another level?

Also is there an action script for a delay in the timeline?

example " on release, delay 10 frames, then goto same scene, frame 265"

View Replies !    View Related
More Timeline Control Please
ok, im trying to design a flash site in flash Mx.
im having trouble doing something i thought would be quite simple but i obviously lack some basic knowledge in actionscripting. ive not tried designing much in flash for quite some time so im having to re-learn most do's and dont's in flash.
ive had a look on the forums for anything that i could think to search for that relates to my problem, but im not entirely sure what i should be searching for.

so, im going to try and explain this in detail so as not to leave too many questions about what im trying to do. i can e-mail a basis fla layout to anyone that feels confident they can help but not till tomorrow (pushed for time before work and wont get the chance today)

the idea is i have a home page and a title bar scrolls out sideways at the top of the page saying "home" (suprise suprise). this tween stops after 120 frames.
what i want to happen is when you click a button for another scene i.e. "about" or "news" for the animation to go 1 frame forward from the
stop();
script in frame 120 and play to the last frame in the current scene (running the rest of the tween of the title bar scrolling back in...) before initialising the action scripting for the specific button scene change.
most of the attempts i have had havent been successful. the closest to working, visually, has been this:
on (release) {
gotoAndPlay(121);
if (_currentframe == "240")
gotoAndPlay("about", "1");
}
with each buttons gotoAndPlay("blah", "1") named appropriately
however what i get is the tween going out and then in properly, but always just playing through into the next scene instead of the one i thought i had specified. so in effect all my buttons were working perfectly as "next scene" buttons :P
my guess was that the "if" statement was never being detected as true, even thought my tweens last frame was most definately frame 240.

after that i tried using a global variable. in the first frame of the scene i set...

_global.endscene = ("endscene");
endscene = "false";

...and putting...

endscene = "true";

...in the last frame
then changing the button code to:

on (press) {
if (endscene == true) {
gotoAndPlay("news", 1);
}
else {
gotoAndPlay(121);
}
}

(this gave me another "next scene" button but with working tween)
and

on (release) {
gotoAndPlay(121);
if (endscene == "true")
gotoAndPlay("about", "1");
}

which gave the same result.
so then i tried talking to my friend who knows some c++ but not much action scripting and after some messing around we tried using some code like the following:
first frame:

_global.meep;

if(meep == 0)
{
_global.meeg = 0
meep++;
}

on the button:

on (release) {
meeg = 1;
gotoAndPlay("title wheel 1", 121);
}

then in the last frame of the title wheel i got

switch(meeg)
{
case 1: gotoAndPlay("home", 1);
break;
case 2: gotoAndPlay("about", 1);
break;
case 3: gotoAndPlay("news", 1);
break;
case 4: gotoAndPlay("art", 1);
break;
case 5: gotoAndPlay("forum", 1);
break;
case 6: gotoAndPlay("Other Shizzle", 1);
break;
case 7: gotoAndPlay("Other Shizzle", 1);
break;
}

(this final method was done in flash mx 2004 - if that makes a diffrence?)
this worked for 1 click and the scenechange. but wouldnt reset properly? at a guess. so after trying myself and getting a headache trying to understand his method ive decided if someone out there can help.
if anyone can help point out flaws in the methods i used so i can understand and/or better still offer a working design to me i would be very thankful. if not any links to related tutorials would also be nice if you know the terminology for what im trying to do.

sorry for being a nub guys...

sol

View Replies !    View Related
Timeline Control
I have a movie that I want to loop once and then stop on frame 25 can anyone please help me?

View Replies !    View Related
Timeline Control
I have an movie clip that plays one long animation but is split in 4 distinct sections. I want to be able to control the foward and reverse playing and stop point of the clip depending on 1 of 4 buttons the user rolls over.

ie. if user passes over button 3 the playhead moves from where ever it is foward to frame 30, if the user moves the pointer over button 1 while the playhead is still moving to frame 30, it will stop and start playing in reverse until it gets to frame 1.

is this a case of prevFrame nextFrame.... Until loop?

I have no idea how to do this.

View Replies !    View Related
TimeLine Control
I am trying to get my button to go and play a certain frame and once it has finished playing that frame, jump to and play another frame. So I have only been able to get that first action to work?

Here is the actionscript I have been using:
portfolioBtn.onRelease=function(){
_root.gotoAndPlay(24);
_root.nextFrameToPlay = "btnTwoIntro";
}

I also included an image for visual reference.

View Replies !    View Related
Need Timeline Control Help
I need an action script 2 code for flash 8 that will loop a specific group of frames in the beginning of the
timeline until a button is clicked that will go to and play play a different part of the time line once
and then return to looping the first part of the time line again. Thanks Xeno.

View Replies !    View Related
Need Timeline Control Help
I need an action script 2 code for flash 8 that will loop a specific group of frames in the beginning of the
timeline until a button is clicked that will go to and play play a different part of the time line once
and then return to looping the first part of the time line again. Thanks Xeno.

View Replies !    View Related
Timeline Control
Hi,

I'm just starting out in actionscripting (using 3.0). I'm trying to work out how to add script to a button that will tell it to go to one frame, play until told to stop, then go to another frame and play until told to stop.

So for example:

Button is clicked (on frame 10) and movie goes to frame 20, plays until frame 47 and then goes to frame 167, plays until frame 209 and stops.

Is this possible?

Any help greatly appreciated!

Thanks!

View Replies !    View Related
Timeline Control Within Swf
hi guys - in a previous thread I wanted to know how to make a zig zagged line in a movie into a timeline. So when you scrolled a button along it it would calculate the corresponding time in the movie against how far you've dragged it. I never got it to work but now I can't even get a simple timeline control to work on a straight horizontal line.

Here's what I've got so far:

the button within the movie clip has this code:

on (press) {
startDrag(this, false, left, top, right, bottom);
}
on (release) {
stopDrag();
}

the movie clip itself, which the button exists in has his code:

onClipEvent (load) {
top = _y;
bottom = _y;
left = _x;
right = _x+300;
_x += 300;
}
onClipEvent (enterFrame) {
var framescale = 300/6774;//300 is the length of the timeline and 6774 is number of frames in movie
var frame = Math.round(timeSlider._xmouse * framescale);//timeslider is the name of the movie clip
gotoAndPlay(frame);

}

I've tried all different ways of doing it - nothing works - the button slides along the route it's meant to but nothing else works.

View Replies !    View Related
Timeline Control
what would be the actionscript to make the timeline go back 20 frames each time a button is clicked? Currentframe minus 20?


PHP Code:



mc_prevButton.onRelease =function:Void() {

//Help!!!



View Replies !    View Related
Timeline Control
Hi - Anyone know a good way to code this: I want a movie clip button to play a certain frame label, but what frame label it needs to play is dependent on what frame it is currently on. Any help is most appreciated. Thanks!

View Replies !    View Related
Timeline Control Using AS3
Guys,

First off - i'd just like to say hello and express my utter contempt for Adobe/Macromedia for ActionScript 3.0. It really is the most illogical thing to get your head around and so far for me has just been a big pain in the back side.

That aside, i have a problem - which i cannot fathom nor fix.

In short, i have a movie clip, embedded in a movie clip, embedded in a FLA file.

What i'm trying to acheive is as follows:

Start at frame 1. Mouseover a button element, play movie. If you mouseout before frame 15 - go back to frame 1 and stop. If you mouseout after frame 15, play to frame 30, then return to frame 1. (the purpose is a fade in/fade out. I don't want the fade out to happen before the fade in is completed however)

What ive done:

Keyframe at frame 1 with following actionscript:


Code:
stop();
import flash.events.MouseEvent;

AboutGD.addEventListener(MouseEvent.MOUSE_OVER, aboutgo);
AboutGD.addEventListener(MouseEvent.CLICK, aboutclick);


function aboutgo(event:MouseEvent):void{
gotoAndPlay(2);

}

function aboutclick(event:MouseEvent):void{
trace('Buttonclicked');
}
Keyframe at frame 2:


Code:
import flash.events.MouseEvent;

AboutGD.addEventListener(MouseEvent.MOUSE_OUT, aboutout_unfinished);
AboutGD.addEventListener(MouseEvent.CLICK, aboutclick);

function aboutout_unfinished(event:MouseEvent):void{
gotoAndStop(1);
}
Keyframe at frame 15:

Code:
stop();
import flash.events.MouseEvent;

AboutGD.addEventListener(MouseEvent.MOUSE_OUT, aboutout);
AboutGD.addEventListener(MouseEvent.CLICK, aboutclick);

function aboutout(event:MouseEvent):void{
play();
}
Keyframe at frame 30:

Code:
gotoAndStop(1);
Now, I really am not sure if functions are global, symbol specific, or keyframe specific (i.e can i use my "aboutout_unfinished" function in frame 1 despite it being defined in frame 2? And if so, is this because functions are global? Or is it just a case that the function has to be defined on the timeline before it is called in the timeline, regardless of whether the function definition is present in the keyframe your in?)

The reason i ask, is something undesirable is happening. It seems that when you mouseover, it plays to frame 15 and stops. Fine. Now when you mouseout, it seems to go to frame 1 and stop. Like the "aboutout_unfinished" function is being called, despite the fact that the aforementioned function should not exist and is not being called by the actionscript in frame 15...

Am i understanding this wrong? I'm really struggling to see how i can acheive the result I want above. Its like flash is only accepting one eventlistener for the "mouseout" action, where as i would like it to activate different listeners depending on where you are in the timeline...

is this possible? Hopefully i've been clear and havent over explained anything!

Thanks in advance for all your help to this AS3 noob on what is undoubtedly a noob question!

View Replies !    View Related
Timeline Control Help
Hi,

I'm a beginner to actionscript... Although I understand how to use buttons to control the timeline, using eventhandlers, I have a situation that my current knowledge can't solve! Here it is:

1. User clicks button for page called "biography" which then animates itself.

2. User then decides that they want to go to new page called "audio" and so they press relevant button for page, "audio".

3. However, before the animation for page "audio" can animate, the animation for "biography" must first be 'cleared'(in other words, another set of frames has first to be loaded). Only then can the animation for the new page, "audio" be started.

Basically, how do you get the script to tell any button (on the stage) to load one set of frames (to clear the first page) and then load a new specific set of frames (to load the new page).

Hope that makes sense! I'm guessing its got something to do with functions and conditional statements but I'm only guessing!

If anyone can help I'd be VERY grateful!

Thanks, T

View Replies !    View Related
Timeline Control Help
Hi. So I have a huge flash animation where I'm controlling the timeline with, of course, a play button and a stop button. I also have a "gotoAndPlay" button and a "gotoAndStop" button where you have the option of going to the next frame title and either stopping or playing from that point. Now I need to add a button that will play from one point to another point on the timeline (say point A to point B), stopping on point B. And then so on and so forth during the whole timeline. However, if you were to hit the play button, the whole thing will go without being stopped. So my question is "how do you create a button with Action Script 2.0 that will play from point A to point B on the timeline without having to put a stop action at point B which would affect the play button that is meant to continuously play without interruptions if wanted?" Hope that wasn't too confusing. Here's what I tried to give you an idea and it obviously didn't work... On the button, I typed in

on (release) {
PlaytoFrame("PointB");

}

And then once on Point B, you can either hit the button again and

on (release) {
PlaytoFrame("PointC");

}

or just hit the play button and continue with the whole movie. I know that "PlaytoFrame" isn't an action but I thought I'd try. Is there something I can do that will do what I want?

Thanks for the help :)

Scott

View Replies !    View Related
Timeline Control
So out of shear brilliance (so i thought ) and belief that I'm structuring my flash movie correctly i've managed to get myself into a bit of a bind... I have a main movie clip that calls in seperate movies to make the whole. How would I create the right path to control the timeline of a seperate movie:

Main.swf, content.swf, navigation.swf are the name of the three movies I'm using. inside main movie I have two clips, one MC is called content the other is called navigation. How would I I tell the navigation.swf loaded inside navigation MC to change the playhead of ContentMC. Below is the script that I'm trying:


on (release) {
_root.content.gotoAndPlay("section three");
}



is the script that I've used but it doesn't seem to be picking the right label, it seems to always go to the first frame. Any help from you gurus would be great. Thanks in advance.

Cheers

GXL

View Replies !    View Related
SWF Timeline Control
Hello,
I am trying to put a timeline on my SWF that allows the user to move to different points of the swf. I want them to be able to move a slider to get to different frames forward and back. Any suggestions?

View Replies !    View Related
Please Help With Timeline Control
I cant figure this out to save me
i made a flash movie with a bunch of photos, made a stop command at the end of the movie. I have a text button that moves in during the end of the flash, now im trying to get the button to play the move again when clicked, how do i do this?
http://i46.photobucket.com/albums/f138/drel83/flashhelp.jpg





























Edited: 12/02/2006 at 11:44:57 AM by DscottM83

View Replies !    View Related
SWF Timeline Control
Hello,
I am trying to put a timeline on my SWF that allows the user to move to different points of the swf. I want them to be able to move a slider to get to different frames forward and back. Any suggestions?

View Replies !    View Related
Timeline Control Help
I need help getting a rollover mc/btn to control the main timeline of scene 1. I created a movie clip that would show a drop down menu of buttons when you rollover it. I need those buttons to control the main timeline for scene1. I'm not very great with actionscript and can only do simple things with it. I tried using Script Assist in setting up the script for the buttons, but I can only control the timeline of the rollover mc itself, and not the main timeline of scene 1. I would appreciate any help with this. I've been putting off my project for months because I keep getting stumped everytime I come back to work on the rollover. Thanx

View Replies !    View Related
TimeLine Control
I am trying to get my button to go and play a certain frame and once it has finished playing that frame, jump to and play another frame. So far I have only been able to get that first action to work?

Here is the actionscript I have been using:
portfolioBtn.onRelease=function(){
_root.gotoAndPlay(24);
_root.nextFrameToPlay = "btnTwoIntro";
}

any suggestion?

Feel free to take a look at the file:
newnie.com/lapdcards.fla.

View Replies !    View Related
HELP: Control MCs With AS Placed On The Timeline
Hello,

I have a question on how to control an MC using AS which is placed in the timeline.

Here is the scenario:
I have an MC named "backMC" placed on the main stage. My other MC named "showcase" is also placed in the main stage on a different layer. On "showcase" last frame, I wanted to add an AS that would make my "backMC" play.

I tried to add this AS on the last frame of "showcase" but didn't get any result.

_parent.backMC.gotoAndPlay("up");


Question:
Am I doing things right? Or is it not possible to control it my way?


Thank You

View Replies !    View Related
Timeline Control
Hi,

I'm just starting out in actionscripting (using 3.0). I'm trying to work out how to add script to a button that will tell it to go to one frame, play until told to stop, then go to another frame and play until told to stop.

So for example:

Button is clicked and movie goes to frame 20, plays until frame 47 and then goes to frame 167, plays until frame 209 and stops.

Is this possible?

Any help greatly appreciated!

Thanks!

View Replies !    View Related
HELP: Control MCs With AS Placed On The Timeline
Hello,

I have a question on how to control an MC using AS which is placed in the timeline.

Here is the scenario:
I have an MC named "backMC" placed on the main stage. My other MC named "showcase" is also placed in the main stage on a different layer. On "showcase" last frame, I wanted to add an AS that would make my "backMC" play.

I tried to add this AS on the last frame of "showcase" but didn't get any result.

_parent.backMC.gotoAndPlay("up");


Question:
Am I doing things right? Or is it not possible to control it my way?


Thank You

View Replies !    View Related
Timeline Control?
I was wondering if it's possible to play different segment of the timeline?

For example, when i click on a button, i want it to go to
frame 30-40, and then 50-60.

Is it possible to do that using only one button(without any actions on the timeline)?

View Replies !    View Related
Can't Control Mc From Main Timeline
I am having a huge problem getting a button on the main timeline to control a mc I have placed along side it.
I think it has something to do with sytanx:

on (release) {
tellTarget (targetName) {
_root.lib-folder.symbol.gotoAndPlay("mc-label");
}
play ();
}

Is this wrong? I've tried several different variations, all with no results.
Please help!

View Replies !    View Related
How Can I Control The Timeline Speed
hello everybody,

i have a flash movie going at 50 fps. i want to make 1 MC go 20 fps i the same flash movie how can i do that. is it possible.
thanx

grafx

View Replies !    View Related
Sound Control With Timeline
Hi all. Can anyone give me a pointer on how to control the volume of a soundtrack with the timeline.

This will allow me to fade out a soundtrack at the end of a linear animation regardless of playback spped.

If there are a couple of scripts at the end of the timeline that would decrease the volume of the track 70%...50...$25%...0

Does such a control exist?

jh

View Replies !    View Related
Control Main Timeline With MC?
Can I place a MC on my main scene and control the scene frame with some action script in that MC? Can someone please post a little sample code. I am having issues getting this to work.

View Replies !    View Related
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

View Replies !    View Related
Slider Bar To Control Timeline?
can anyone tell me (or tell me where to find a tutorial) telling me how to make a slider bar control my main timeline?

i have 12 images of 12 sides of a product and i want to be able to use a slider to create a 3d effect. pretty much liek this:

Samsung A500

thanks!

View Replies !    View Related
How To Control Timeline Of Several Subobjects?
I have an object: man
This object has several subobjects: hair, body, shoes, etc

Each subobject has a timeline of 40 frames, individually animated, but the main object only is one frame.

How can I control ALL of these subobjects at the same time?

I could do this:

man.body.gotoAndPlay(20);
man.hair.gotoAndPlay(20);
man.shoes.gotoAndPlay(20);
....


But how can I do it easier? I want them to be as separate objects, cause I change colors to each part with setRGB..

I hope someone can help!

View Replies !    View Related
Control Main Timeline
i've got to be losing it. i have a navigation mc on the main timeline. also on the main timeline, i have 4 frames that each have an mc of content. in the nav, i have a next button and a previous button. when i use:

on (release) {
_root.gotoAndStop(nextFrame);
}

it doesn't do anything. when i try:

on (release) {
_root.gotoAndStop(_currentframe+1);
}

it goes to the last frame on the main timeline, even though i have stops in every frame. what am i missing?!?!

View Replies !    View Related
Control Timeline From Another Level
Hi Flashers!

I thought I understand Flash ... Huh.

I have a mainmovie, which should play 5 .swf files and is divided into 5 labeled sections.

The mainmovie should stop at each label and load a movie via loadmovieNum("c1.swf",10) and play it ...

The loaded movie should tell my mainmovie when it has finished, so that the mainmovie can jum further to the next label and load the next .swf.

In the last frame of a loaded movie is the short script:

_root.gotoAndPlay(10);
stop();

But Flash is jumping to frame 10 of the loaded movie in level 10.

Can anyone tell me, how I have to adress the maintimeline of my movie where the labels are?

Thank you very much!

Mikalux

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved