Make Nested Movie Clip Button Go To Frame On Main Timeline?
Jan 29, 2012
I am making a website based in flash actionscript 3.0 i have a button nested in its own movie clip, because I have the button expanding to be able to read it i have figured out the only way to do this is by creating it as a movie clipa nd inside the movie clip creating it as a button. I added an event listener to the blog button by saying[code]...
i have named the symbol blog and have name the frame of where the blog page is going to be "blogframe" this line of code at the bottom is where i run into trouble the output window in Flash is saying "The blog button was clicked" just like i want it to. no errors are accouring why than is the playhead not going to frame "blogframe"? if the button is working when i click it the code is right i belive the problem here is it does not want the playhead to go to the frame i want it to. So i gues my question is, how can i make a button withing a movie clip interact with the main timeline?
View 3 Replies
Similar Posts:
May 18, 2010
I want to link a button in my main timeline to a label- frame in a movie clip. The movie clip is called "Adetail" and the label is "on01"... I type in the following script
[Code]...
View 1 Replies
Feb 23, 2011
I've got a main timeline .swf file called "blank.swf" which contains nothing but two blank movie clips one called called "pproduct", the other called "ppalette". In the script frame of this main timeline I use the simple "Loader = new Loader();" method to load a URL of an .swf file into the "ppalette" movie clip. The "ppalette" movie clip contains several color chip buttons, each of which use the same Loader method above to load an external .swf into a clip. Here's what I want to do: let those color chip buttons, when the "blank.swf" file loads, be used to load an .swf movie into the "pproduct" clip on the main timeline. I'm wanting to be able to swap depths with various movie clips which will take out the movie which has the palette, but I want whatever that palette has loaded in the original "pproduct" clip to stay there.
[Code]...
View 3 Replies
Nov 24, 2009
I have an action script code for playing a nested movie clip from the main timeline. I want to come back to the frame2 of the main time line when the nested movie clip goes to the last frame. Which code I have to add at the last frame of the nested movie clip to come back to the frame2 of the main timeline..
View 1 Replies
Jun 25, 2009
I am building a small banner, which ideally will have a random string of text fade in (long enough to be read), then fade out...to play another random text.
Each of my texts have been built as movie clips... they fade in, stay up long enough to be read, then fade out. At the end of this, I need the movie to go back to frame 1 of the main timeline, as I am using the following script:
Code:
_root.onLoad = function() {
//generate a random number from 1 to 11
var nRandom = 1+Math.floor(Math.random()*12);
//tell timeline to goto and play the random number 'nRandom'
gotoAndPlay(nRandom);
};
Each of my text movie clips are on a different frame, so I need to call a new random _root frame to play from within the movie clips. So far, all that is happening is whichever movie is chosen to play, goes in a loop.
View 5 Replies
Apr 29, 2010
how to jump to a certain frame number / frame label inside a movie clip on the main time line (ROOT) from ANOTHER movie clip elsewhere. Any ideas?
View 1 Replies
Oct 10, 2006
I have a movie clip on the main timeline called "map," w/ tons of nested clips. On an actions layer on the Main Timeline I have the following:
map.nestedClip.onRollOver = function() {
this._alpha = 50;
};
the rollover event fires, but the alpha reduction does not. I replaced the alpha = 50, with a trace statement, and was successful, plus I get the hand when I roll over the movie clip, so I know that the event is registering. However, when I place the same code directly on the instance, it works fine. I thought the only difference between placing code on the timeline and directly on an instance was a matter of convention, and that timeline code is generally a better practice.
View 4 Replies
Sep 13, 2010
how to make a button go to a specific frame on the main timeline my button called a play_btn and i want it to go to a specific frame on the main timeline ???
View 2 Replies
Sep 11, 2009
I'm using AS3 on timeline. I can't make a movie clip on main timeline visible.
On timeline I have a frame label (parte7) where I have three movie clip buttons (level_1, level_2, level_3). Only level_1 is visible.
On parte8 I have a movie clip (play_1), which inside has a button (newLevel). When user completes play_1, button newLevel takes the user back to parte7 to continue with level_2, which should be visible and level_1 should be invisible.
PROBLEM When button newLevel is clicked it goes back to part7, but level_2 button isn't visible.
Here is my code
PARTE 7
stop();
level_2.visible=false;
level_3.visible=false;
[Code].....
View 3 Replies
Jan 4, 2012
I'm in the process of designing this site as a portfolio for my art and am in the process of creating and laying out the galleries. My idea was to create movie clip animated buttons that would react to the roll over stuff. I got that part to work the way I wanted it. But now, I can't seem to figure out how to put a "Gotoandplay" type of code on the buttons so that the timeline would jump to the appropriate frame and play. (I put an "on(release) gotoandplay" on it the way I would put it on a button but it never responds. I have a couple of buttons that work fine with a "geturl". so I thought a "gotoandplay" would work fine. If this can be figured out in a way that I can easily use it for all buttons with just the frame number needing alteration, that would be best. After you click the splashpage door jpg, there will be a piece of paper on the floor. That is a button which should trigger the animation that starts at frame 114. When clicked, the page lifts up and spread open to two pages. But it never reacts
[URL]
View 6 Replies
Jun 25, 2006
I have a movie clip which, when closed, should send you to a specific frame on the main timeline... I have used frame labels on the main timeline... Here is a bit of my code so far:
[Code]...
View 5 Replies
Apr 26, 2009
I'm trying to make a flash website that has clickable buttons that will play different movie clips. But I dont know how to make it to just play the movie clip with the button you click without playing all the movie clips on the main timeline.
View 1 Replies
May 14, 2009
I've made a very normal animated pop-up menu for my flash website, i now want the items that show up to refer to the main timeline, i'm kinda puzzeled on this one, because i dont want to store all my content inside the movieclip (that was my first solution)
View 5 Replies
Mar 10, 2010
I have a movie clip on the main stage- inside that movie clip is a button- I want that button to contol a function on the main timeline-
example: Button Script
closeAll_btn.addEventListener(MouseEvent.MOUSE_DOWN, goCloseAll);
function goCloseAll(e:MouseEvent):void {
****don't know what to put here to activate "closeAllOpenMovieClips" function on main stage****
}
example: Main Stage Timeline Script
function closeAllOpenMovieClips():void { trek_mc.gotoAndStop(1); lost_arts_mc.gotoAndStop(1); rain_mc.gotoAndStop(1); vintage_mc.gotoAndStop(1);}
***don't know if I need more script on Main Stage Timeline that just "function" ***
View 5 Replies
Jun 23, 2009
I have a movie clip that loads and when it is done playing it has a close button that unloads the movie clip... I want to add code to this button that moves the play head to frame 20 of my main timline using actionScript 3.0
View 10 Replies
Nov 22, 2011
How do I link a button thats embedded in frame 2 (music page timeline) to a frame in the main timeline ( frame 3= biography page)? Both pages are on the same scene with link buttons embedded in each page independent timeline.
View 1 Replies
Aug 9, 2010
I am trying to "gotoAndStop" on a frame in a nested timeline from the main timeline, but can't seem to figure out the correct way to write it with it's 'parents' etc... this is how I have tried which makes sense to me (have tried other ways too) but no success.
gotoAndStop(parent."framename");
View 3 Replies
Jul 12, 2010
i've made a drop down menu that works fine as it goes for dropping down when moused over the button which triggers is menu. but when im trying to add functionality which is triggered by the nested buttons that drop down i cant control the frame position of the main timeline does anyone know how i can do this.
View 1 Replies
Jan 12, 2010
I'm trying to create a flash banner with several nested movie clips within it. I want each movie to run one after the other (not at the same time) but the top layer just keeps dominating (but not even working) even though I've added it's movie further down the main timeline. Before dragging on the second movie I inserted a keyframe.[code]...
View 3 Replies
Feb 5, 2010
I have a button inside a movieclip. When the button is clicked I want it to make a movieclip in the main timeline go to a specific frame. what's the code I need to use to define that movieclip located on the main timeline? Right now I have my code written inside the movieclip where the button is located because I have multiple buttons on multiple frames, and I don't know the syntax to define a button in a specific frame inside a movieclip.
Here's my current coding...
Code:
Select allfunction bwbtn2(btn:SimpleButton,frame:Number) {
btn.addEventListener(MouseEvent.CLICK,function() {photobw_img.gotoAndStop(frame);});
}
bwbtn2(bw19_btn,19);
View 2 Replies
Mar 4, 2008
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.
View 12 Replies
Jan 23, 2005
I'm trying to have a button go back to the main timeline and then goto another mc nested in another mc. For some reason it the output section when i test this says the following...Target not found: Target="_root.printmc" Base="_level0.instance8.instance29" Here is the script I have on the button.
on (rollOver) {
gotoAndPlay("move");
}
on (press) {[code]....
View 4 Replies
Feb 2, 2010
I cannot seem to find anything of what I need from google.(Well, I can find the reverse method to what i need ) Basically I wish to access a variable declared in the Root Timeline from my Movie clips timeline.
[Code]...
View 2 Replies
Oct 9, 2009
I have a file comprised of 1 scene and two movie clips. The clips are instanced into the Main Timeline and occupy Frames 1 and 2 respectively.MovieClip1 is an animation that has navigation buttons that appear at the end of the clip. I'm trying to get mouse click navigation to make Frame 2 on the Main Timeline active.
Here is what I'm trying but it is not working:
btExplore.addEventListener(MouseEvent.CLICK, ExploreClick);
function ExploreClick (evt:MouseEvent):void {
gotoAndStop(2);
}
this takes the animation to Frame 2 of the Movie Clip Timeline not Frame 2 the Main Timeline.
View 9 Replies
Nov 24, 2005
I am targeting a a movie clip. The problem is that all the syntax I have found for targetting clips looks like this: _root.sample_mc.sample2.mc. etc. The problem is, my target clip is in an swf that I've loaded into a container clip from my main timeline. So, essentially, I have a home.swf that loads menu.swf into a container called 'location'. In menu.swf, I have an MC called center, which contains the MC I am targetting called 'target'.
View 2 Replies
Aug 26, 2010
I'm trying to call a function called checkForHit() located inside of my Hero class at a particular frame of an attack animation of my Hero object. Meaning, when his weapon is at the point in the animation where it could collide with any enemies, I want to call the function that performs the check.My Hero Movie Clip is set up where it contains a Movie Clip on different frames that coorespond to the different animations (attacks, movements, etc). So the Hero MC contains a bunch of other MCs. That way I can just use hero.gotoAndStop("attack1");
The problem that I'm having is that the code that I wrote to call the checkForHit() function is written on one of the frame of the nested MC's timeline, and it's not being recognized. In fact, even if I put a trace("HELLO") on any of the frames on the nested MC, it's not being output. I even tried to put something that I know should cause an error on one of the frames, and it ran without throwing an error. It's almost like the code on the timeline isn't being compiled, or it's being skipped over somehow.
View 1 Replies
Feb 23, 2009
when I attach an mc inside another movie clip and then during interaction with the movie change the _x of that parent clip to whatever other value than original location, the _x of the child mc does not change as it regards its position in relation to the parent - moving the parent does not move the child within it how do i find the _x of the child in relation to the _root though as opposed to the relation to its parent?
View 1 Replies
Sep 10, 2004
How do I make the main timeline jump to frame 1 when the mouse moves out of the entire embedded swf?
View 1 Replies
Dec 6, 2009
I have my flash document set up in the following way: On the main timeline I have my buttons that I want to play movie clips embedded inside a movie clip on the main timeline.However, when I click each different button, the current movie clip stops playing and then the movie clip corresponding to the button plays.
I want them all to be able to play at once. So for example you push button 1 and the alien plays, but half way through you could click button 2 and the alien clip would keep playing, but also the helicopter clip would begin to play as well.Here is the code I have so far:
building_btn1.addEventListener(MouseEvent.CLICK, alien);
building_btn2.addEventListener(MouseEvent.CLICK, helicopter);
function helicopter(e:MouseEvent):void {[code]......
View 1 Replies
Dec 22, 2009
I am simply trying to tell my main timeline to go to the next frame when a movie clip reaches the end of its timeline (using AS3). Here is what I have which does not work.
Code:
MovieClip(root).gotoAndPlay(nextFrame);
View 2 Replies