Controlling Nested MCs In Main Timeline
I'm not sure what the best way tio animate this is...
I am trying to write my actionscript more efficiently (externally rather than inside the movie clip symbols), but seem to keep running into problems.
I have clips of crab characters throwing and catching a disc. the throw, the catch, and the disc are all seperate movie clips with tweening. I have frame labels in the different keyframes and a Stop action at the end of each clip. The disc actually has two stops, one for the path out and one for the return path.
The parent timeline holds these clips in a frame with a Stop action on it. I would like to be able to write the AS in the parent AS layer. So far though, I cannot get the frame events to trigger. An example of what I have tried is:
if(this.CrabPinch1._currentframe=="P1") { this.discClip.play(): }
if (this.discClip._currentframe=="midpoint"){ this.CrabSnatch.play(); }
All of the clips have instance names
Ideally, I would like to write this as a function to apply to the clip to make it loop until the user selects something else. I may wish to use this to create clips with 3 or 4 crabs tossing this disc. However, I am simply struggling to get tese clips just to talk to each other. In the past I would write on the clip itself. However, i would like to use more efficient and dicernable methods in my new projects.
If there is already something posted, please let me know but I could not locate something this specific.
Thanks in advance
FlashKit > Flash Help > Flash ActionScript
Posted on: 06-24-2006, 05:21 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Controlling The Main Timeline From Nested MC's
Here's the problem. I have a MC (MC1) on the main stage. Inside the MC (MC1) there are actions and another MC (MC2) that is controlled by the actions. Inside of MC2 there are buttons for the navigation of the site. My question is how do I make these buttons contol the main timeline and goto a different scene. Please help.
Controlling Main Timeline From A Nested Button
dont know if i phrased that right or not but heres what i have a nested movie clip that has this actionscript:
on (rollOver, dragOver)
{
gotoAndPlay(16);
}
on (rollOut, dragOut)
{
gotoAndPlay(23);
}
on (release)
{
_root.link = 2;
_root.play();
}
Now everything works but i am having problems on the main timeline. i need it to gotoAndPlay frame 84 on the main timeline. This is the actionscript that came with the thing im learnign from. and to me it makes no sense. So what woudl i change to make this a little more sensible all i need is help with the on (release) portion.
what exactly is the root.link = 2 supposed to achieve is this a better method of doing something i am not familliar with? all i can think of is that is saying go to the second frame label. but i dont know thanks for the input.
Boom
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!
Nested Mov Clips And Main Timeline
Hi all,
I have 3 nested movie clips within the maintimeline. I am wondering what the code is that i use to return from one of the movie clips ti the maintimeline? I''ve tried at the end of my nested movieclip:
gotoandplay(_root.nameofframe);
but it doesn't work.
Thanx
How To Trigger Return To Main Timeline After End Of Nested MC
I'm developing a Flash presentation and need assistance.
In my main movie, I have two scenes: preloader and Scene1. In Scene1, I have a nested MC called Transition on a stop frame.
On the stop frame, the Transition MC plays. On the last frame of the Transition MC, I want actionscript to return to Scene 1, and to a frame label called "space".
Right now, I have the following code on the last frame of the Transition MC:
gotoAndPlay("Scene1", "space");
This is not working. The head goes to the preloader scene, and not the "space" frame label.
What am I missing? Any coding hints would be greatly appreciated.
Thanks in advance,
Help How To Control Main Timeline From Nested Clips
I KNOW i'm just getting some punctuation mark wrong, right?
I have a dozen sub-movie clips nested in my main movie clip (Scene 1) and I would like to set up action frames in these sub-movies that tell the playhead in the main movie to gotoframe, etc... can someone send me the simple gotoframe script?
when i use gotoframe("Scene 1", 5) or gotoframe(_root.5) ... 5 being the frame i want to jump to... Flash tells me it contains no errors, but it just wont work!
thanks!!!!
jason
Trying To Link Nested Button To Main Timeline
I've got a button nested inside a movie clip and I'm trying to have it point to the main timeline, using frame labels on the main timeline.
I've tried using this code directly on the button instance:
code: on(release) {
gotoAndPlay("open");
};
I've also tried using this code on the main timeline action script layer:
code: back_btn.onRelease = function() {
gotoAndPlay("open");
};
I've also started stabbing into the dark, using this script to attempt to more closely target the button:
code: title_mc.back_btn.onRelease = function() {
gotoAndPlay("open");
};
At this point, I'm figuring I've got some trouble targeting the right _btn on the right _mc to go to the right time line (the main TL).
Ideas?
cheers-
yellowness
Main Timeline Control From Nested Movies?
Hello,
I would really appreciate help with the following problem. Flash MX
Multi-scene movie. I want to control the main time line from a nested movie and it does not seem to work!
Example. Movie nested in second scene, frame '10'. Main time line plays to frame 10 and stop(); Nested movie begings playing, on the last frame of that nested movie I want to move the main timeline play head, so I try:
_root.gotoAndPlay("scene_3", 1);
does not work.
What am I missing here, or is this even possible. To control the main time-line from within another movie?
Thanks in advance!
Peter
Playing A Nested Movieclip From Main Timeline
I'm creating a website and my knowledge of actionscript is pretty limited so I am asking for help on what is pretty basic stuff.
I have a movieclip called mc_manikin which contains another movieclip called manikin_arm. On Rollover of mc_manikin I want the movielip manikin_arm to play frame 2.
So far I have this:
function wave (e:Event){
manikin_arm.gotoAndPlay(2)
}
mc_manikin.addEventListner(MouseEvent.ROLL_OVER,wa ve);
My function is called wave I'm not sure how to pick out the movieclip inside mc_manikin (something to do with parent and child?)
Help!
Nested MovieClip Conflicting With Main Timeline
Well, I have a fla that's broken into 2 frames on the main timeline, the preloader(frame 1) and the content(frame 2).
Code:
stop();
onEnterFrame = function(){
var total:Number = _root.getBytesTotal();
var loaded:Number = _root.getBytesLoaded();
if (loaded >= total && loaded > 0){
//trace("loaded");
delete onEnterFrame;
play();
}
}
This code works correctly and once the entire swf has loaded it plays to frame 2 where I have a stop(); which also works.
Where I run into trouble is when my content comes up. I have 4 different 'destinations', each runs while setting declarations and comes to a stop(); frame with the following code:
Code:
stop();
var nInterval = setInterval(Play, 7000);
function Play() {
if (!_root.paused) {
clearInterval(nInterval);
gotoAndPlay("2nd");
}
}
The gotoAndPlay changes based on where you happen to be in the content, but the identical setInterval code is used, including var/function names.
Running on autopilot like this shows zero problems. The trouble comes from the buttons I have assigned to navigate these 4 frameLabels. On the same frame the buttons navigate to I have a clearInterval set, so regardless where you click to or from the interval is cleared.
The symptoms I see is that, when I am on the first of the four sections of content and I navigate to the fourth, my declarations are set, I can trace and prove that it is reading every bit of code, yet it goes and completely ignores my stop(); command in the nested clip and the MAIN timeline suddenly starts looping and so ignores the stop(); command on the second frame of the main timeline.
The code it sees upon navigating there is no different than on the first/second/third.
This is the frame it sees immediately on release of the button:
Code:
modIterator = 4;
_root.firstLoad = false;
clearInterval(nInterval);
btn1.gotoAndPlay("off");
btn2.gotoAndPlay("off");
btn3.gotoAndPlay("off");
btn4.gotoAndPlay("on");
And then 9 frames later it sees:
Code:
stop();
var nInterval = setInterval(Play, 7000);
function Play() {
if (!_root.paused) {
clearInterval(nInterval);
gotoAndPlay("1st");
}
}
I can trace at any point in either frame and confirm that it is indeed getting there, but it completely ignores the stop(); . The only difference between this content and the others, is that nested further in is an XML Loader, throughout the rest of the swf there is FLV components, combo boxes, etc. all pulling in data dynamically so I don't see that making any difference.
Any ideas whatsoever would be appreciated, been trying ALOT to get this sucker working today.
Nested Movie Talks To The Main Timeline?
I'm very new to actionscript 3.0 (and actionscript in general for that matter) so this may be easily done.
My main timeline has two frames. On the first frame a button is clicked will take the users to frame #2. When frame #2 is played, a movie clip that takes up most of the screen appears. Now, there is a button to return to frame #1 in the main timeline, from within the movieclip on frame #2.
How do I get the "return to frame #1" button to work within the movieclip on frame #2? I assume the button needs to speak to the main timeline (or something like that) but just not really sure.
Thanks in advance!
Nested Buttons Not Talking To Main Timeline
Can anyone tell me why this code is not working? Basically I am trying to get buttons that I have in a drop down menu load an external .swf into an empty movie clip placed on the main timeline. However for some reason it is not working. The buttons are contained in a movie called "menuItems" which is then placed in a movieclip called "mainMenu" which is then placed on the main timeline.
on (release) {
_parent.gotoAndPlay("reverse");
if (_root._root._root.currMovie == undefined) {
_root._root._root.currMovie = "personalData";
container.loadMovie("personalData.swf");
} else if (_root._root._root.currMovie != "personalData") {
if (container._currentframe >= container.midframe) {
_root._root._root.currMovie = "personalData";
container.play();
}
}
}
Nested Buttons Not Talking To Main Timeline
Can anyone tell me why this code is not working? Basically I am trying to get buttons that I have in a drop down menu load an external .swf into an empty movie clip placed on the main timeline. However for some reason it is not working. The buttons are contained in a movie called "menuItems" which is then placed in a movieclip called "mainMenu" which is then placed on the main timeline.
on (release) {
_parent.gotoAndPlay("reverse");
if (_root._root._root.currMovie == undefined) {
_root._root._root.currMovie = "personalData";
container.loadMovie("personalData.swf");
} else if (_root._root._root.currMovie != "personalData") {
if (container._currentframe >= container.midframe) {
_root._root._root.currMovie = "personalData";
container.play();
}
}
}
AS3 Nested Movieclip As Button Main Timeline Won't Stop
Hello all,
Finally I've given in and am struggling to make the transition from AS2 to AS3. I bought a great book "Learning ActionScript 3.0" which has been very helpful. All in all, it's not as bad as I thought it would be. But I have run into a problem that no matter how many google searches I do and help files I read I cannot find a solution for.
On frame 5 in my main timeline I load a movieclip from the library.
ActionScript Code:
stop();
var pl:MovieClip = new mc_PrimaryLinks();
addChild(pl);
pl.x=400;
pl.y=300;
pl.addEventListener(MouseEvent.CLICK, navigate, false, 0, true);
function navigate(event:MouseEvent):void {
gotoAndPlay("btn_strategy");
removeChild(pl);
}
Nested in the mc_PrimaryLinks() movieclip is another movieclip (named "btn_strategy", same as the frame label) that is intended to control the main timeline.
The script works, it goes to the frame labeled "btn_strategy" in the main timeline. But then the problem starts. On that frame I have "stop();" but the movie won't stop, instead it replays the movie clip (pl) that I loaded at frame 5.
Has anyone else run into this problem or is there an error in my script?
Thanks,
Joe
Button In Nested Mc Needs To Jump Back To Main Timeline
so i have a main timeline and a nested one. the main timeline has a button named "how_btn" that plays the nested mc (named "how"). once i get into playing "how", i have a button named "menu" that i want to bring the user back to the main timeline (where the "how" button is). this is how i scripted:
how_btn.onRelease = function () {
gotoAndStop("how");
}
menu_btn.onRelease = function () {
gotoAndStop("nav");
}
the how button script works, however the menu button does not. is this b/c it's in a nested mc? i tried specifying the root, but that didn't do it either.
any suggestions?
AS2 HELP: Button In Nested Mc Won't Link Back To Main Timeline
so i have a main timeline with a mc. the main timeline has a button named "how_btn" that plays the mc (named "how"). once i get into playing "how", i have a button named "menu" that i want to bring the user back to the main timeline (where the "how" button is). this is how i scripted:
how_btn.onRelease = function () {
gotoAndStop("how");
}
menu_btn.onRelease = function () {
gotoAndStop("nav");
}
the how button script works, however the menu button does not. is this b/c it's in a nested mc? i tried specifying the root, but that didn't do it either.
any suggestions?
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.
Controlling An Mc From Another Mc - Not Both On The Main Timeline
Below is a link to what started this -
http://board.flashkit.com/board/show...hreadid=312161
What I want, is to know how I can control an mc within an mc on the maintimeline from within another mc also on the main timeline...
Do I go back to _root and then up again, or just directly access the mc I need to?
Controlling Main Timeline From MC
Hello,
I have a button nested in a Movie Clip. I want this button to control the the main timelines in one of my scene. When I use the following script:
on (release){
gotoAndPlay("presentation",1);
}
or
on (release){
_root.gotoAndPlay("presentation",1);
}
It doesn't do anything. If I try this script:
on (release){
_root.gotoAndPlay(1);
}
It will go to the first frame of my original or top scene which I have named splashScreen, not the one in which the Movie Clip is contained. If anyone knows how to script this correctly, it would be much appreciated!
Thanks!
Controlling Main Timeline...
Hello!
I am trying to make it so that when a movie clip plays, it will change the keyframe of the main timeline... does that make sence?
I need the gotoAndPlay() code that goes in between the () I'm trying to move onto frame 2 (in the main timeline) If I put in a (2) it'll take me to frame 2 in the movieclip...
Anyway, if this makes sence, I would really appreciate some help!!!!!
--Jacob1234
Controlling MC's On Main Timeline
So I have 8 productMC's on my main timeline in flash CS3 (using AS 2.0)
When I click one product I want the that MC to play and the other 7 MC's to either be set to _alpha=0 or be disabled
Once the MC is open I have a "view" and "back" MC within that MC and when back is clicked I want it to reset everything back to the way it was
I have tried to do all of this from the main timeline with AS but for some reason my back button isn't resetting anything and my view button won't go away
Here is what is on layer 1 on the main timeline
ActionScript Code:
_root.viewMC.onRollOver = function () { //only want this to show onrollover
_root.viewMC._alpha = 100;
}
_root.viewMC.onRollOut = function () { //hide viewMC on rollout
_root.viewMC._alpha = 0;
}
_root.prod1MC.onPress = function () {
//main MC is pressed it will set all other MC's AND viewMC to _alpha 0
_root.prod1MC.gotoAndPlay(11);
_root.backMC._alpha = 100;
_root.viewMC._alpha = 0;
_root.prod2MC._alpha = 0;
_root.prod3MC._alpha = 0;
_root.prod4MC._alpha = 0;
};
_root.backMC.onPress = function () {
//when the backMC is pressed it resets everything back to the alpha 100
_root.prod1MC.gotoAndPlay(2);
_root.prod2MC._alpha = 100;
_root.prod3MC._alpha = 100;
_root.prod4MC._alpha = 100;
};
This is working 1/2 way and my problem is that the viewMC keeps showing up on rollover even when I have it set to _alpha=0 when the prod1MC is pressed
And when you click the back button it doesn't reset the _alpha to 100
HELP
Controlling Main Timeline
I am looking for a way to tell the main timeline to gotoAndPlay at a certain labeled frame from within a movieclip on stage. This was as simple as could be in AS 2.0, but is proving to be impossible in AS3.0. What I want to have happen is that when the movie reaches the end in the movieclip on stage the it then will gotoAndPlay on the main timeline.
Why is this so difficult? And why is this not documented in any manuals or discussions? Sometimes I really hate AS 3.0.
Does anyone have any suggestions?
Controlling The Main Timeline Within A MC
Please assist!!
Im trying to control the main timeline from a button inside a seperate MC. eg: The navigation is a movie and when a link is clicked I want it to jump to a specific frame on the main timeline of the whole movie.
It sounds basic - I tried "_root.Level2" but this isn't working - Level 2 is the frame Label I have given.
Loads of thanks if you can help!
Thanks in advance
Issue With Main Timeline, Nested Movie Clip Relationship
Hello All,
I'm having trouble with a nested movie clip when I put a stop() on the
main timeline. The stop() occurs on the main timeline when the nested
movie clip is about 1/2 done with it's animation loop. I would like
the nested clip to keep playing its animation loop seamlessly when the
main timeline comes to the stop(), but as soon as the stop() is
reached, the nested clip starts back from the first frame on its
timeline and continues to loop normally thereafter.
How would I prevent the nested clip from "resetting" to it's first
frame when the stop() on the main timeline is reached?
Thanks much,
LJ
[CS3] Nested Movie Clips Affecting Main Timeline, Not Working
i have a movie that shows a series of full-size images in succession, but also have a scrolling thumbnail bar below it that i want to be clickable for people to jump to another image if they want. i've got the full-size images working, the scrolling thumbnail bar is working, and i have the buttons in the thumbnail bar connecting to the main timeline where the full-size image movie clips are played, but it's just not working correctly. when i click on the one thumbnail that is currently linked, it will work once or twice and then the second or third time just show a blank 'screen' in the full-size area.
the demo of it is here:
http://beta.candyteria.com/
the .fla is here:
http://beta.candyteria.com/site_reso...me_flash_2.fla
any help would be hot...
Controlling Movie From Main Timeline
okay, here's the plot:
I've got a movieclip of an airplane.
The whole clip is the plane retracting and putting out the landing. Now The first part until frame 10 is retract.
I need to make the movie play the 1st 10 frames and then stop. The gear is up then. If the gear has to go down, It needs to play frame 11 till 20 and stop on 20.
This has to be done from the main stage, or another object like a button.
I tried tell target, but that wont work or maybe I didnt get it right.
(or should I go to the newbies forum)
Mc Button Controlling Main Timeline?
I have to utilize a button within a MC which tells the main timeline [scene 2] to go to frame 2, but when I use:
On Release{
gotoAndStop ("Scene 2", 2);
}
Nothing happens.
Any advise appreciated.
Controlling Sound On The Main Timeline?
Okay, here's my problem...
I have a background music loop that's being controlled by buttons in a movie clip on the main timeline (using ON/OFF buttons and the linkage from the music loop in the library -- and Actionscript of course).
BUT... on the main TIMELINE I have multiple streaming voice-overs that I need to be controlled by another ON/OFF buttons, but the catch is if the user decides to turn OFF the voice-over on the main TIMELINE, and then turn it back ON again, I need the voice-over to pick up where the timeline currently is on the timeline. The reason for this is that I have animations that go with voice overs.
Someone mentioned to me to do a script that would just set the volume on the main timeline to "0", but I don't know how to go about creating an actionscript for that...
Any help is much appreciated!
Thanks,
Tim
Controlling Main Timeline From Movieclip
I've inserted a button within a movieclip, and I need it to control the main timeline, specifically jump to a different scene.
Here's the script...
on (rollOver) {
gotoAndPlay ("1");
}
on (rollOut) {
gotoAndPlay (23);
}
on (release) {
gotoAndPlay ("Brief", 1);
}
It's the last one thats the problem. "Brief" is a scene on the main timeline. But it's just not working. Any ideas?????? (the first two, "rollOut" and "rollOver" are on the movieclips timeline)
Thanks!
Controlling Main Timeline From Loaded Swf.
I have a index.swf loaded into a level on my main timeline.
loadMovieNum (index.swf, 2)
This loades fine. I need the index.swf to stop the main timeline it is loaded in. this is the code i have used before and it worked, this time it does not.
on (release) {
_root.level0.stop();
}
Please help. thanks
Dawn
Controlling The Main Timeline From A Child
ok i know this sounds super simple but why wont it work
i can control the main timeline from one MC with a button for that scene but i cant get it to jump to another scene using the same method
ie
code:
on (release) {
_root.gotoAndPlay("somelabel");
}
//works
//but
on (release) {
_root.gotoAndPlay("some_scene", "somelabel");
}
//doesn't work
ideas on whats wrong?
pulling my hair out here
see attachment for simplified version
Controlling Slides On Main Timeline.
Hi,
Right now I got three slides playing after one another(with information in text box). Problem with this is that some people (senior citizens ) can't read it all in that time period. I can make the slides last longer with more frames but then it will be too slow for some other users.
What I want is to make play and stop button on the stage for the actual movie. I looked on this forum and else on internet to find any help but I can't(they all have info on stoping sounds but not the actual movie). I want to put buttons like 'play' and 'pause' so that those old people can click on pause and take there time!
Please help me.
Thanks.
Controlling The Main Timeline From A Loaded MC
Hi guys... im back i asked this question the other day and the solution i got didnt quite work so i decided to repost and be as descriptive as possible -my problem is i have my main movie "TuffSite" and in it i have various scenes... into which i have empty movie clips that will hold various parts of my design in movie clips on my stage, in this case, i have my "menu_clip" loading into "menu_holdr" and in "menu_clip" i have my buttons -id like them to effect "TuffSite" lets say i want a button to go to and play frame 1 of a scene called Design in the main movie "TuffSite" i'll paste the code bellow but i owondering if the fact that im loading a movie clip into a movie clip and tryin to effect a movie a couple of layers up? i used to the following code which seemingly should work:
on (release) {
_root.TuffSite.gotoAndPlay("Designs")
}
as i understand it the root is refering to my main movie... so the only reason i can think of is that i've missed a "level" or something -any ideas, im gettin pretty Freaked out man!!!
Controlling Main Timeline From External Swf
Any help with this would be much appreciated.
Here's the problem. I've got a site that's loading several swfs from a main timeline into levels. So far so good. However, because I've got clicked state son buttons and other areas to reach those navigation areas I need to be able to tell a loaded external swf to target the clicked state of the navigation clip on the MAIN timeline. I've searched through the forum and found my solution only it won't work! I know I need to use _level0 rather than _root - I'm just wondering if I'm looking so deep with a/s it's not happening (the clicked state of abutton is 3 or so movie clips donw. Code below (top bits just a rollover thing specific to the loaded movie):
on (rollOver) {
gotoAndPlay("over");
}
on (rollOut) {
gotoAndPlay("off");
}
on (release) {
loadMovieNum("content_latestnews.swf", 1);
_level0.nav.navclip.button6.gotoAndPlay("clicked") ;
}
Thanks in advance!
[CS3] Controlling Main Timeline From Dynamic .swf
OK, this could be a very simple answer, but...
I have a main.swf which plays, then stops, loads a dynamic .swf... And what I want is, from either the dynamic .swf or the main one, when the dynamic .swf is finished, the main .swf will continue/play.
Thanks in advance for any help given.
Controlling Main Timeline From Child
Hi everyone,
I'm in need of some advice. I'm looking to control the main time line from a movie clip loaded into a level. Here's the deal:
I'm loading a swf file into level 10 of the maintime line using a load movie level script. I'd like a button on the child timeline to go to frame 6 of the main time when it's clicked. I'm struggling with the code.
Here's what I have
on (release) {
_root.parent_gotoAndPlay(6);
}
Problems Controlling MC From Main Timeline
Hi all,
I have a fairly basic problem that I'm sure is pretty easy to solve if you know how:
I'm working on a game, in which I would like to implement a fade to black and back to transparent effect in between various parts of the game.
So say from the main menu once the user clicks 'start game', I want to fade the whole thing to black, then switch screens, then reduce the alpha of the fader to reveal the game.
I've created an MC that is basically a transparent screen, that tweens in to black, waits a few seconds, then tweens out to a 0 alpha again.
My problem is that I can't seem to get the code to understand when the screen is at black so I can do the screen switcheroo.
Should I set up a flag, and put some code in the middle of the MC (which I would like to avoid if possible), or can I use ._currentframe to determine when the MC is in the right position?
Alternatively would the whole fade thing be easier to do using just AS?
Thank you people!
External SWF Controlling Main Timeline
Hi all --
I have a main SWF file that I am loading a smaller, external SWF file into (with loadMovie, if you care to know). Within that smaller file, I have a button -- ideally, this button should trigger an action within the main SWF file.
My problem is that I cannot get the external SWF file to control an action within the main SWF. I'm guessing there must be a way to do this, but I'm having some trouble here.
Thanks in advance... please advise!
Controlling Main Timeline From A Movieclip
I am helping someone (using MX 2004) who is trying to send the playback head to different scenes via a dropdown menu in a movieclip. We have tried many variations but still can make it work.
Any help is greatly appreciated!
AS2 - Controlling Movieclip From The Main Timeline
this ex. .fla controls the mc from itself but i would like to control it from the main timeline, ive tried a number of things but cant seam to get it to work
the .fla is here.
and the code is here if you dont dl the .fla:
Code: .....
Controlling Main Timeline From Dynamic .swf
OK, this could be a very simple answer, but...
I have a main.swf which plays, then stops, loads a dynamic .swf... And what I want is, from either the dynamic .swf or the main one, when the dynamic .swf is finished, the main .swf will continue/play.
Thanks in advance for any help given.
Controlling Main Timeline With Loaded Swf
I am loading an external swf into an empty mc on the main timeline. When the animation in the loaded swf finishes, I want to move to a different frame on the main timeline. Somehow I need to use the loaded swf to tell the main timeline to go to a new frame.
Putting a "gotoandPlay" and pointing at _root from the loaded swf doesn't seem to do the job. any ideas?
Playhead For Movie - Need To Account For Stops & Nested Clips In Main Timeline
I’m trying to create a play-head (not a load bar) with Action Script that shows where my movie is at in its timeline…
A little something like this…
|-----------------------------------------------------|
/
The difficulty is that on my main timeline I have 3 places where the main timeline stops to play a nested movie clip… once the nested clips finish it carries on down the main timeline again.
How can I create this play-head so it moves smoothly while still accounting for the nested clips ?… Can’t seem to wrap my head around it!
Thanks
b
Hover Captions On Main Timeline - Problems Addressing Nested Swf Buttons
Hi,
I have a problem where Kirupa's http://www.kirupa.com/developer/mx20...r_captions.htmhover caption code works when it is on the main timeline for buttons that are also on the main timeline. However i cannot make it address the buttons in the nested SWF named "Pictures".
I am very new to Actionscript and I have tried every variable that I can think of... _root / this / _parent etc... trying to get the code to recognise "button1" inside the swf which is loaded in Frame 59 called "Pictures". Button1 appears on Frame 4 inside the Pictures SWF but I do not know the code to reference this from the main timeline such that the hover caption works of this button...
I believe that the firstly i need to address the button somehow?
Code:
button1.onRollOver = function() {
captionFN(true, "Portes du Soleil", this);
this.onRollOut = function() {
captionFN(false);
};
};
Also there must be something that I have to do to the main code to load teh hover...
Code:
captionFN = function (showCaption, captionText, bName) {
if (showCaption) {
_root.createEmptyMovieClip("hoverCaption", this.getNextHighestDepth());
cap.desc.text = captionText;
cap._width = 7*cap.desc.text.length;
cap._alpha = 60;
//
if ((bName._width+bName._x+cap._width)>Stage.width) {
xo = -2-cap._width;
yo = -17;
} else {
xo = 2;
yo = -17;
}
hoverCaption.onEnterFrame = function() {
cap._x = _root._xmouse+xo;
cap._y = _root._ymouse+yo;
cap._visible = true;
};
} else {
delete hoverCaption.onEnterFrame;
cap._visible = false;
}
};
Please help...
I have attached the file...
BTW: This is a Flash MX 2004 related issue...
Charlie
Controlling The Main Timeline From Within A Movie Clip
Hey folks
I think I have a fairly simple problem.
I have a movie clip placed on the main timeline with a button inside of it. All I want to do is assign an action to the button that tells the main timeline to move on to the next scene. However I am obviously messing something up because the best I can do is tell the main timeline to go to a specific frame within the first scene using
on (release) {
_root.gotoAndPlay(50);
}
but can't get it to go to the next scene using
on (release) {
_root.gotoAndPlay("Scene 2", 1);
}
Any ideas peeps? Any help much appreciated
Controlling Main Timeline With A Loaded Movieclip [swf]
I have been racking my brains out on this one.
My main file is called "main.swf" and I am loading an SWF called "control.swf".
I need control.swf to tell main.swf to goto and play a certain frame when control reaches a frame marker called loaded.
I have tried level, _root, _parent and nothing...
HELP!!!
Thanks,
Controlling Main Timeline From Placed Movie Menu
hey,
I'm trying to make a simple site with multiple scenes for each section. I want to have the same menu in each scene by making it a movie that is placed in the main timeline. How can I make the buttons on the placed movie switch to different scenes on the main time line, ala _parent and _root.togo?
thanks,
Button Inside MC Controlling Main Timeline
Hello,
I have a movie clip on Scene1 of my timeline and inside that MC is a button, how can I set it up so that when that button is clicked the main timeline moves ahead one frame? Everytime I try to advance the main timeline one frame it only moves the MC ahead one frame!
Thanks!
|