Controllin MC From The Main Timeline
is it possible to control a movie clip to make it stop on a frame without puting the code (stop() in that frame in the movieClip?
exapmle: i have an a movieclip and many buttons and i named the movieclip MC and the buttons b1,b2 and b3..
and i want when i click on b1, it tells the MC to play and when current frame is 11 then stop, and on b3 it makes the MC play untill frame30 and then stop without putting stop(); on the frame 11 and 30, because when i put stop(); on frame11 and i click on b3 it plays untill frame11 and then stop..
is there a solution for this problem?
FlashKit > Flash Help > Flash Newbies
Posted on: 01-03-2004, 10:42 AM
View Complete Forum Thread with Replies
Sponsored Links:
Referencing Clips On Main Timeline From My Main Document Class
Hi All,
I'm trying to reference clips on the main timeline either in or via my main Document class, but if I declare any clips as public in the class body as I would have done is AS when linking an external class, I get:
Code:
1151: A conflict exists with definition tfLength in namespace internal.
If I don't declare the clip, then I can reference it from within the same class with this.tfLength, but other classes complain it the Document classes tfLength variable doesn't exist!
So how do I reference a clip on the timeline in my class?
Thanks,
Dave
View Replies !
View Related
Controlling A Movie Clip's Timeline Separately From Main Timeline
I've got a problem here that I've been trying to figure out for a while now, and it seems like it should be way easier than this. Here's what I've got:
I'm trying to make a neato little flash swf with lots of buttons that you can push and another little movie clip will show some little animation.
I thought I could get this done pretty simply by making a bunch of buttons, giving them an over, down, hit, sound, etc. and then having one single movie clip do all of the animations, but cleverly use stop(); and gotoandplay();
I have tried a few different ways, searched through the help & tutorials, looked all over forums on the internets, and I still can't get this to work. The main timeline is really just 1 frame, and its only purpose is to just hold all of the buttons. I have given all of the buttons instance names (ending with _btn). There is a separate layer in the main timeline for the actionscript alone, and was hoping to put all of the gotoandplay commands there. The code that I am trying to use in that frame is:
Code:
this.WV_btn.onRelease = function(){this.productzmovie_mc.gotoAndPlay(2);
};
The productzmovie_mc has a command to stop(); in the first frame, and I am trying to get a button to skip to the next frame to get it going. I put a stop(); on the last frame of that animation so that it won't run through the whole thing on the first button press. If I remove that stop(); on the first frame, the whole animation just runs whenever I test it and the button has no effect.
I thought this would be way simpler than making 25 separate movie clips and hiding them or spawning them. Does anyone know what I could be doing wrong here? This seems like a pretty simple operation, and I am probably screwing up some mundane detail (I always do that). Be gentle, I am trying to learn Flash and I am a bigtime n00b. I can post the .fla if you need to see it, but it's pretty simple so far, just lots of buttons.
Thanks!
View Replies !
View Related
Controllin MC Properties On Load.
Hi!
I have a MC on the timeline called mc3, Its empty and i give this code to make it load a move:
Code:
this.mc3.loadMovie("swf/mc3.swf");
All is good. But the movie loadd in is wider then the stage. Can i manipulate the size of the MC containing MC3? I cant rezise with a tool cause untill i play the movie, the mc is empty. So how do i do it with AS?
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
Play Movie In Timeline But Keep Main Timeline In Place
Hello,
Scenerio: You are at frame 1 of the timeline and it's stopped, you hit a button and it jumps you to frame 20 and then at frame 20 a movie clip plays.
Question. Can I have that movie play for however long I want (let's say it's a 100 frame movie) BUT have my main timeline still sit on frame 20? And then when the movie is done playing it goes to frame 21 of the main time line? Currently I have to make my main timeline be the same length as any movie I have in it, and so my main timeline ends up being an absurdly long.
Just a general answer will help - which action scripts would I be looking to use (I'm using Flash 8 Pro)?
Thanks
View Replies !
View Related
Movie Clip Timeline Vs. Main Timeline
Ok, i have made a movie clip in Swift 3d and have imported it into Flash MX. Now it is in the first frame as flash will place it there and what i would like to have happen is to tell frame 1 that when the movie clip's timeline ends and stops(frame 90) to then move the parent timeline to continue with stuff
If any one reads this please help or refer me to a MX book that is worth the valuble time we think we have!
Mike
View Replies !
View Related
Movie Symbol Timeline & The Main Timeline
Hi guys,
There is the frame in my main timeline which has a movie symbol and when the timeline heads reaches & stops at this frame & start playing the movie symbol timeline, i want that when the timeline head reaches at the end frame of the movie symbol timeline, it should take me to the any frame number/label of the main timeline i want.
I tried adding the action to the end frame of the movie symbol to take me to a different frame of the main timeline but it doesn't do anything. It remains at the same frame of the main timeline.
Is there any way out?
Regards, Rohit
View Replies !
View Related
Main Timeline Vs Mc Timeline Smackdown
I've made a little animation in a mc several instances of which sit looping on the main timeline.
I want these mcs to load at intervals on the main timeline, frame 1, 5, 10 etc. (a kind of twinkling stars thing if you must know.)
The problem is the main timeline overrides the mc's timeline.
I was able to sort of fix this by shortening the main timeline, but I can see this solution is not satisfactory for any number of reasons, and even at the most basic level it seems erratic.
Obviously my understanding of this issue is too theoretical and not practical enough, or the other way around.
How can I force the main timeline to really accept the mc timeline instead of just pretending to?
View Replies !
View Related
A Value From The Main-timeline To A Moviclips Timeline
Hi!
I have a movieclip on the scene. I also have a button on the scene and when I press the button I want to send a variable-value to the movieclip. I have a variable set in the actual frame on the main-timeline but the movieclip doesn´t catch that, when traced I get undefined. Can I send a value from the main-timeline to a moviclips timeline?
View Replies !
View Related
A Value From The Main-timeline To A Moviclips Timeline
Hi!
I have a movieclip on the scene. I also have a button on the scene and when I press the button I want to send a variable-value to the movieclip. I have a variable set in the actual frame on the main-timeline but the movieclip doesn´t catch that, when traced I get undefined. Can I send a value from the main-timeline to a moviclips timeline?
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
Main Timeline From MC
Hello,
From now on I think I may avoid using scenes...
__________________________
When my bad guy dies,(_root.energy2.bbar._width<10)
I want my movie to goto the Scene named "level2_intro" and play.
The following script continues to bring me back to the start of the whole movie 2 scenes back.
Actions on the MC:
Code:
onClipEvent (enterFrame) {
if (_root.energy2.bbar._width<10) {
this.gotoAndPlay(9);
_root.gotoAndPlay(4);
}
Actions on Main Timeline (3rd scene) Frame 4
Code:
gotoAndPlay ("level2_intro", 1);
View Replies !
View Related
Mc's In Main Timeline
Sometimes when i put a movie clip in my main timeline i can see the movie clip play. But sometimes i can't and it stays on the 1st frame of the mc.
does anyone know why i can sometimes and not other time?
THANX
View Replies !
View Related
Main Timeline Or MC?
Hi,
thank you for reading this.
Would you use the main timeline or Movieclips for creating a simple slideshow in Flash MX? What would be the advantages and/or drawbacks to not use the main timeline? Notice that I am choosing not to use the template.
Thanx!
regards
ik.
View Replies !
View Related
MC And Main Timeline
I usually prefer to have only one frame on the main timeline or at least just a few.
what is the best way to have movieclips load on the main timeline one after the other so it is like a presentation without using a next button?
View Replies !
View Related
Main Timeline
Hi guys,
how do you call the main time line in AS3,
I have an animaition on the main time line that i want to stop from within an event listener function.
I was expecting it to be like:
Code:
function stopAni(e.Event):void {
if (true) {
_root.animation.stop();
}
}
AS3 doesnt seem to like _root though, :S
Cheers
Chris
View Replies !
View Related
Main Timeline Var In A Mc?
What was once an easy project has turned upside down.
I need to refer to a variable on the main timeline from within a movieclip.
I'm just defining a variable outside a class on a single frame like this:
Code:
var vid:String = new String;
Later on, I'm assigning a value that needs to be read inside a movieclip:
Code:
var videoPath = this.parent.vid;
It's been a long week and brain hurts. What am I doing wrong?
Thanks!
:grimey
View Replies !
View Related
MC Timeline & Main Timeline
Hi all,
This is going to sound very simple, but I'm having some trouble understanding exactly how the timelines work. I've tried searching online but I haven't found what I'm looking for.
I have two animated movieclips. The first one is 50 frames long and the second one is 200 frames long.
On the main timeline, I want to the first clip to play and when that has finished I want the second clip to play. But I put them onto the main timeline, each on a different layer, they play at the same time.
I understand MC's play independently of the main timeline, but I've tried placing the second MC on the 50th frame of the main time line so it will play after the first MS has finished but it doesn't work.
Placing them both on the first frame of the main timeline obviously makes them both play at the same time...
How/where would I position the animated movie clips on the timeline so one plays first then the second one plays?
Can anyone please explain this or maybe point me towards a tutorial?
Many thanks.
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
MC Talks To The Main Timeline.
I am using a tutorial .FLA file. It's got a horizontal motion menu. Anyway, the MC's that hold the buttons are so deep in MCs that i can't talk to the main timeline. I can't even move frame to frame from the buttons that are moving. I've tried the thing that people say to go from the MCs to Scenes. but i just want the main timeline. thanks.
Superhue.
View Replies !
View Related
Target The Main Timeline
Hey Guys & Gals,
Need a little advice, I have an MC on the main timeline that allows the user to reset a game once complete. How do I target the first frame of the main timeline/scene from within the MC? Ive tried using _root but that always returns me to the first frame of the MC and not the Main Timeline/Scene.
Thanks in advance!
LEE
View Replies !
View Related
Telltarget And Main Timeline
Ok... i have a preloader which sets the variable loaded = "false" in the first frame... at the last frame it sets it to true...now i have a MC which has the following script.
if (loaded == true) {
tellTarget ("/") {
nextScene ();
}
} else {
gotoAndPlay (1);
}
which is supposed to let the MC continue to do it's fade so it doesn't just jump into the rest of the movie... but the logo repeats indefinately and never advances.... HELP PLEASE!
View Replies !
View Related
Copying From Main Timeline To MC
I really need some help here, i hope this is possible. I have made an animation that is 90 frames long in my main timeline. I have realised that i may be using this animation many time throughout my movie and i was wondering if there was any to convert/copy those 90 frames to a movie clip. If it's possible could you please let me know, and if it's not possible could you please let me know as well. Thank you very much for your replies.
Jason
View Replies !
View Related
Controlling Main Timeline ?
Hi,
I'm having serious problems in trying to control the main timeline (as in scene 1, where you start from) from within a movie clip. The scenario at the moment is that I've got a list of buttons in a movie clip, that clip is within another movie clip which is placed on the main time line. So basically what I'm trying to do is that when any of those buttons are clicked it should play that movie clip and at the end of it should jump to a corresponding scene depending on which button was pressed. I tried using variables but couldn't get it working.
Does anyone here have any ideas how I can make it work?? By the way this happens to be an urgent problem so any quick responses would be majorly appreciates !
Thanks,
Usman.
View Replies !
View Related
Stoping An MC From The Main Timeline Without Stoping The Main Timeline
My problem is i have a MC that i need stoped or better yet paused when the user puts the cursor over it, and then started again when the cursor leaves the clip. What i have done so far is this: Put a button within a movie clip, then put the movie clip on the main timeline.
The only thing i could think of to get it to stop would be something like:
on (rollOver) {
movieClip.stop();
}
It doesnt work so any help on this is appreciated..
View Replies !
View Related
Movieclips And The Main Timeline
Have a preloader in a movieclip placed on the timeline.
Now it calculates the percentage which is fine and works.
Now when the movie loads and percentage gets to 100 there
is a button placed within the movieclip to continue to a label named MUSIC on the main timeline.
the button is not working. What is the correct code
to be used for this script to get the moviclip to recognize the label "MUSIC" on the main timeline.
sorry not at home unable to give the code......
View Replies !
View Related
Swf Talking To Main Timeline
on the second frame of my main timeline i have a loadMove command.
loadMovieNum ("MyMovie_intro.swf, 1)
this loads my intro.swf. however, once my intro swf is playing it continues to loop my intro mc, which is on the second frame of my intro.swf. at the end of this movie i have tried
_root.gotoAndPlay(3);
which i thought would tell my main timeline to play the third frame (another swf by the name of MyMovie_loadbg.swf)
any suggestions?
C-
View Replies !
View Related
Playing MC's In Main Timeline
This is a really basic question:
If I have an MC that has a timeline of 50 frames and I place it in frame one of the main timeline - is there a simple way of having the MC play to the end before it goes on to the next frame in the main timeline or do I have to assign it 50 frames and then place my next MC after that?
Thanks for your help
View Replies !
View Related
MC Reference To Main Timeline
Hi, hope someone knows how to solve this...
I need a script located at the last frame of a MC to tell the main timeline to go to frame 119.
_root.gotoAndPlay (119);
On that frame lies another script that goes to the next scene.
But instead of doing so, I goes back to the first scene, I don't understand why...
Thanks for your help, Simon.
[Edited by Vazio on 06-05-2002 at 05:27 PM]
View Replies !
View Related
Targeting The Main Timeline.....
Im having trouble altering which frame the main timeline is on via a button thats within and mc on the main timeline.
So yeah, ive tried having a telltarget that points simply to "_root." and then says gotoAndPlay (260)
I also tried something like
On release
_root.gotoAndPlay (260)
and still it doesnt work.
So how, from a button inside an mc on the main timeline, do i change the frame that the main timeline is on?
Grexen
View Replies !
View Related
Main Timeline Problem
Hey,
How does one prevent a preloader in scene 1 being played when targeting the main timeline from scene 2?
(i.e. tellTarget ("_level0") or tellTarget ("_root") gotoAndPlay (10)) etc.
Help!
Cool.
D.
View Replies !
View Related
Targetting The Main Timeline
OK, I have a movie on the main timeline that contains an invisible button (this is to create an animted rollover/rollout button), however i cannot get the main timeline to jump to a scene in the movie from the button within the MC. i have used the _root/_parent but it just plays the next scene in the movie, which is not the correct one! this means when i have several buttons it plays the same bit! I need to be able to tell the main timeline to go to a scene and play frame 1. PLEASE HELP ITS DRIVING ME UP THE WALL!!!!!
Thanks
View Replies !
View Related
Button In MC To Main Timeline
Hey,
OK... I have a movie with an image scroller that contains buttons which when clicked should load an external .swf file into a target. Everything works fine when the buttons are on the main movie timeline but when I put them into the image scroller MC they don't work. I suspect that I have to somehow tell the button to load the movie into the target on the main timeline...but I don't possess the wetware to achieve this...please help!
Many thanks in advance!
View Replies !
View Related
Working Out Of Main Timeline And In MC's
Hello,
I've been reading a lot about working in MC's and out of the main line.
I'm starting a new project that will contain several sections (separate .swf files) loaded into MC container/s on the stage.
Right now I'm thinking of staying on one level cause I'm not sure how why I'd need other levels.
Anyway, I'm interested in more information about getting stuff off my maintime and into MCs within MCs.
The sections are easy to conceptualize as .swfs within MCs, but I have a top level nav which is an MC on the maintime and a graphic backgound.
Please guide me to anything discussion I can read about this issue.
Peace,
View Replies !
View Related
Videocontroller On Main Timeline
I have the video in the main timeline in one layer and the controller in another layer. the video and the controller start at frame 60 and goes to frame 200, I have a text that says "buffering video please wait..." between fram 1 and 59. So you see that some of the buttons in the controller is not right .
The stepback button goes behind frame 60, and the loop button goes back to frame 1. Rewind i could fix, ii´s was simple,.
the code you see below is for the videocontroller.
// playback controls
loop.onRelease = function() {
loophilite._alpha = 100;
};
loop.onPress = function() {
looping = !looping;
loophilite._alpha = 0;
};
playButton.onPress = function() {
playhilite._alpha = 0;
};
playButton.onRelease = function() {
playhilite._alpha = 100;
playing = true;
_parent.play();
};
playButton.onDragOut = function() {
playhilite._alpha = 100;
};
playButton.onDragOver = function() {
playhilite._alpha = 0;
};
stopButton.onRelease = function() {
playing = false;
_parent.stop();
};
rewind.onRelease = function() {
playing = false;
_parent.gotoAndStop(60);
};
stepBack.onRelease = function() {
playing = false;
_parent.prevFrame();
};
stepForward.onRelease = function() {
playing = false;
_parent.nextFrame();
};
goToEnd.onRelease = function() {
playing = false;
_parent.gotoAndStop(_parent._totalframes);
};
knob.onPress = function() {
_parent.stop();
startDrag(knob, false, left, top, right, bottom);
dragging = true;
};
knob.onRelease = function() {
stopDrag();
dragging = false;
};
View Replies !
View Related
Accessing The Main Timeline From A MC?
the navigation of my site is in a movie clip, from which I would like to access frame 4 on the main timeline of my movie. The code is gotoandplay(4), which write now jumps to the frame 4 of the movie clib instead of frame 4 of the swf.
Could you tell me how to access the main timline from a mc?
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
Main Timeline Progress Bar
Hello-
I've got a long movie (4935 frames) and I'd like to have a progress bar that tracks the position of the main timeline so the user has some idea of when it's going to end. The bar would be 200 pixels wide total at frame 4935. Does anyone have a good piece of code that applies _currentframe to a bar in this way. Flash 5 code preferred.(A 4900 frame shape tween is out of the question) Thanks!
View Replies !
View Related
|