ActionScript 2.0 :: Changing Frame In MC With Button On Main Stage?
Oct 24, 2006
I have one button and it's primary role is to stop all sounds in the project when triggered. It is just positioned on the main stage in the main project, not inside of a MC.
I then have a very simple music playing system (4 buttons, one for each song) in it's own MC which displays text of the artist and title song when respective buttons are pressed.
This works fine, apart from the fact that when I click the 'stop sounds' button the text is still displayed from whetever the last song was that had been playing.
I was thinking there must be a simple method of incorporating an actionscript function into the 'stop sounds' button, so that when it's pressed it also takes control of the movie clip and moves it to the first frame which doesn't display any of this text.
I was thinking of a simple gotoAndPlay command followed by something, but I don't know the command to tell Flash where to find frame 1 of this movie clip rather than just frame one of the whole project.
View 3 Replies
Similar Posts:
Jan 24, 2011
I have a movieclip and within it is a bit of actionscript and a couple of different movieclips to make it function like the button on a ball point pen (you click it and it stays clicked until you click it again).
var booleanClick:Boolean = false;
var colorTransform:ColorTransform = optBox.transform.colorTransform;
optHitState.addEventListener(MouseEvent.CLICK, onClickHandler);
function onClickHandler(myEvent:MouseEvent){
[Code].....
I don't want to get deeper into this monster of a project without making sure this is working first. Is my boolean working and just my trace statements aren't worded right or is my method to change the boolean wrong?
View 1 Replies
Aug 21, 2011
I was wondering if it's possible to change the frame of a movieclip (present on the stage) by going on a certain frame or clicking a button in the main movie, if you get what I mean. Let's just say I want to go to frame 2 in movieclip "Symbol". Also, would it be possible to do the opposite and go to a frame in the main movie from a movieclip?
View 9 Replies
Dec 9, 2003
I have two movie clips on the main stage: mcNav and mcContent1 (mcContent1 is located in the 2nd frame).
When I click btn1 which is a movie clip within mcNav, I want to go to the 2nd frame on the main stage where mcContent1 is located.
And then go to frame 10 within mcContent1 and stop.
Here's what I have:
btn1.onRelease = function() {
_root.gotoFrame(2).mcContent1.stop(frame 10);
View 2 Replies
May 6, 2008
I have a moviclip on the main stage with a stop action on the frame above. I want the movie to play ahead from that frame on the main stage after a certain frame is reached in the movieclip.
I tried using this simple function on the main stage;
if (_root.myMovieclip.signal._x = 100){
gotoAndPlay(win);
}
So when signal._x moves to 100 in the movieclip, the frame jumps to "win". However this doesn't work. I tried using a timer on the frame as well but it does not provide an accurate enough response.
View 7 Replies
Oct 23, 2009
I have made a button with sound and a text that I want to change after the user clicks on it. In the button-symbol I have one layer for sound and one for shape. When the user click the sound is OK and the link to the URL I have stated is opened. Fine. But the button do not change as I drawn it in frame "down" in the four-frame timeline - I want the button to have another text when clicked.
View 3 Replies
Jun 12, 2005
Is it possible to make a call from inside a MC to change a frame on the main stage (IE: scene 1 frame 2) rather than just frames within the MC? I've already tried going gotoAndStop("1,2") but that seemed to do jack.
View 1 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
Mar 20, 2010
when i use tha main.swf the button in frame.swf is useless but when i use the frame.swf ONLY it runs the buttons function...
[Code]...
but in main.swf what is syntax in order to use the button?
View 6 Replies
Jan 1, 2010
I create a movieclip button, and I want to change main timeline from it. what should I do ?
Is it useful to use MovieClip(root).gotoAndPlay(Is there any other way to change main timeline?
View 6 Replies
Apr 19, 2009
I have a very simple .fla. One frame, one button on the main stage. I have named the button and when I right click>actions, it says I can't put actions in this area. So then I put the Actions on the main timeline/keyframe. The code below works, but I can't get code to work in the button that I placed on the main stage. This button is dynamically placed by the first two lines of code.
Code:
var MyButton:ButtonOne = new ButtonOne();
MyButton.x = 100;
MyButton.y = 300;
addChild(MyButton);
MyButton.addEventListener(MouseEvent.MOUSE_DOWN,startMC);
function startMC(event:MouseEvent){
myMovieClip.gotoAndPlay(11);
}
If I try to just have the code that looks something like this..
Code:
ButtonOne.addEventListener(MouseEvent.MOUSE_DOWN, startMC);
//movie clip function startMC sits here..
I get an error saying the symbol doesn't exist.
View 8 Replies
Apr 18, 2010
How to control button in movie clip in order to exit back to the main stage.
I used this code:
on(release){
_parent.gotoAndPlay(1);
}
The thing is: In the main page I have a manu you can choose to which movie clip to go. (The first frame on the main stage has a stop(); action in order to be able to choose). And the code bring me back to the main page but start the specific movie clip I exit from all over again. How can I stop this loop?
View 3 Replies
Mar 19, 2010
Im trying to load a movie using a button. I just want the button, when hit, to load an external .swf file inside the movie clip playing.
In AS1, (I never did learn AS2) this is what the button command said
on (release) {
loadMovieNum(�About.swf�, 0);
}
So how would this translate into AS3?
View 1 Replies
Jun 23, 2011
I have a button that I cant link. This was the correct code for the movieclip.
Code:
MovieClip(this.parent).tint_mc.gotoAndPlay("on");
Only now I have a button inside a movieclip. And Flash cant find my button from the mainstage. I tried
Code:
Button(this.parent).fac_btn.addEventListener(MouseEvent.CLICK,link);
View 1 Replies
May 5, 2011
I have a scrollPane on my stage, and I have a movieClip inside of it with a bunch of buttons. When you click on one of the buttons, I need it to gotoAndPlay a frame label on the main timeline. So far I cannot get this to work.
View 6 Replies
Feb 5, 2010
In AS2 I need code for a button, on the main timeline, to go to a frame in a mc off the main time line. I have attached a picture of the time lines in case I have not articulated my needs well.
View 5 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
Feb 8, 2010
I've beein digging forums everywhere but cant find the solution to my problem...
I have an external swf "advert_3.swf" loading into the main index.swf.
advert_3.swf has two buttons: one needs to go to "services" frame the other to "events" within a content_mc which is in the index.swf.
that is in the index.swf:
ActionScript Code:
var request:URLRequest = new URLRequest("advert_3.swf");
var loader:Loader = new Loader();
loader.x = 35;
[Code].....
View 1 Replies
Jan 12, 2011
I have this code below on this button that is inside of a movieclip. I just want this button to do is move the main timeline to a specific frame thats all.
[Code]...
I didnt put i a object name before the addeventlistener because I'm not sure what to put because if I put "this" the other buttons will bt controlled by this code and if i put "parent" only that button will work.
View 7 Replies
Aug 11, 2009
I've got a button on the main timeline that i only want to be visible on from frame 2 onwards. I know i could just place it on a new keyframe on frame 2 but then i can't get the AS on frame 1 to control it and i don't want to duplicate all my code. (Its static text, converted to a btn mc). why the following isn't working?
[Code]...
View 2 Replies
Apr 29, 2011
In the attached file you can see 2 .Fla files a CS5 and CS4, they are the same! I have a main global scrollbar which compares to the other scrollbars that are loaded from the countries drop down menu on the top left..(you can see it clearly) Scrollbars work fine...however... i do need the user to be able to scroll simultaneously the scroll bars either with a button somewhere on stage or with another main bar..
View 1 Replies
Nov 22, 2009
On the main stage I have a button that I have made invisible once the file is loaded. Inside a movieclip I have on frame 15 the following actionscript 3 code
button_mc.visible = true;
I want the button to become visible at the end of this movieclip. I am not using an external as3 file, I am putting the as3 code in its own layer on the first frame.
I know it has something to do with the path to the button, but I cannot figure it out. If there is anyone who can point me in the right direction for referencing instances by instance name that reside on the main satge from inside a movieclip
View 3 Replies
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
Sep 11, 2010
I wanted to create a portfolio in flash, so I designed the layout in photoshop, with different webpages in different groups. So groups i created: home, about, porfolio, contact, affiliates, topbar, menu.I use Creative Suite 3 or CS3I then imported the groups into flash as movieclips, using the import to stage function. here is the image of the main scene in the flash. (SEE IMAGE 1st thumbnail)I created a new layer on top of all the layers and used labels at equal intervals to differentiate between pages.here's the image depicting the same.(SEE IMAGE 2nd thumbnail)Now in the home movie clip, i made all the text layers as movie clips to make button animations and assigned sounds and actions to them i.e. rollver, rollout andclick events. here's the swf.(PM ME FOR SWF)I want to know the code or method to load the frame labelled ''about'' in the main scene when i click on the movieclip button 'about' which is in the movieclip 'home'. Here's the code i tried for the first 'about' button, but it returns error "1120: Access of undefined property event."
code:
ActionScript Code:
var OverSound:roll_over = new roll_over();
[code].....
View 0 Replies
Jan 15, 2007
im trying to play a frame in an external .swf with a button from my main flash file.
View 5 Replies
Oct 26, 2007
how to mute a audio embedded in a button's timeline from the main stage
View 1 Replies
May 11, 2011
ive made a simple game for a uni project, when you get game over a movieclip comes up and inside the movie clip there is a button to restart the game. how to i code the button inside the movieclip to gotoAndPlay to frame 1 on the main timeline?
[Code]...
View 4 Replies
Jan 25, 2010
I just wonder that how can i write this code that means if the "specific" button is clicked(i mean if the homebutton is clicked=true) like this.. and how can i refer a button that in main stage while in an another clip's substage..
View 1 Replies
Jan 25, 2010
I just wonder that how can i write this code that means if the "specific" button is clicked(i mean if the homebutton is clicked=true) like this..and how can i refer a button that in main stage while in an another clip's substage..
View 3 Replies
Jul 20, 2011
I have created a website which loads external swfs as pages onto the main stage on the click of a button. I am using Flash CS3 and Actionscript 3.0. Here is my code:
[Code]...
View 6 Replies