ActionScript 3.0 :: Make Buttons Within A Movieclip Play From A Specific Frame In Scene 1?
Aug 30, 2011
I have a movie clip on the main timeline. This movieclip has buttons that I want to play different frames in scene 1.
At the moment, this is the code I'm using in scene 1.
[Code]...
I'm getting the error below but have no idea what I should be doing.
[Code]...
View 3 Replies
Similar Posts:
Sep 27, 2011
What I want to do is have one movieclip that has many frames and turn that into a button and then make different instances of the button and have those instances display a certain frame of the underlying movieclip.
View 17 Replies
Nov 25, 2009
I am making an online portfolio and I have created the following scenes:homeaboutontactright now, I have three movie clips on the home screen that I have created into buttons.
on (press) {
go to Scene 2, frame 25 ?????????????????????
}
What I would like to do is after someone clicks on the button, it should then jump to another scene's specific frame number. So for example when you press the "about" button, the playhead goes to the "about" scene to 25th frame. Same thing for each button
View 3 Replies
Sep 16, 2009
I'm using Flash CS4 with AS3. I'm building a website for a friend the problem I have. When a user clicks on a button I want it to play a movie clip then stop at a specfic frame. I want all the buttons to play the same movieclip but go to a different frame.
The current actionscript I am using is located on frame 1 is:
home_btn.addEventListener(MouseEvent.CLICK, homebuttonClicked);
function homebuttonClicked(event:MouseEvent):void{
gotoAndStop(0)
}about_btn.addEventListener(MouseEvent.CLICK, aboutbuttonClicked);
function aboutbuttonClicked(event:MouseEvent):void {
gotoAndStop("aboutme")
[Code] .....
This allows me to navigate to the right frame but does not play for obvious reasons, if I use the gotoAndPlay function its carries on playing to the end of the movie.
View 2 Replies
Jan 13, 2004
What I am trying to do is get a button to make a movieclip go to a specific frame. I have a movieclip that plays a set of frames up to the 100th frame, and then I tell it to go back to and play frame 1 again. However, at about 105, I have another set of frames that I want to play at the push of a button. How would I go about doing this?
View 1 Replies
Apr 1, 2009
I've created a movieclip that is supposed to begin the movie with a rotation (it's a globe) and at a specific frame it should beginning to fade out. I've inserted the folowing code to the rotation and for this action it is working perfectly
Code:
onClipEvent (enterFrame) {
i = getProperty(this,_rotation);
setProperty(this,_rotation,i + 0.5);
}
But, when I try to insert any other line for the _alpha, a sintaxe error occurs and the rotation doesnt works.
View 1 Replies
Dec 24, 2003
I want the movieclip in Frame 1 Scene 1 to finish before skipping to Frame 2 Scene 1 im using gotoAndStop("Scene 1", 2); at the end of the MC
View 1 Replies
Apr 13, 2011
I have 10 buttons on my homepage and I want to play the same movieclip when you click on a button and after that move to a specific frame for each different button.
Someone know an easy to make this without having to create 10 differents movieclips just to change the action at the end of the movieclip?
View 1 Replies
Feb 24, 2009
URL...My question is how can i make the movieclips that act as buttons play a certain frame on my time line? ....i don't know where or what to insert.
View 1 Replies
Jul 14, 2011
i want to make a puzzle..a photo seperated in 10 pieces(10 scenes)withdifferent speed.each piece does a move from right to left and back again.when i push a button in the correct frame i want to go to the next scene to do to the same thing,if its the wrong frame i want to play another scene.and is it possible to all that staff with one button?
View 0 Replies
Apr 8, 2003
is there a way to refresh a scene to a specific frame?
I am making a chat room and am trying to figure out how to refresh the messages.
View 1 Replies
Apr 27, 2009
This time I'm experimenting with visibility. All the tutorials online vary a lot. I'm trying to find something noob proof. I have actionscript 2 and 3. I'm not sure which one to use..I'm just trying to learn how to make a frame become visible and Play when I click on a movieclip.
View 5 Replies
Aug 27, 2005
What im trying to do is play a movie clip between frames. So say we have two menus, when you are on menu 1 and you click the button for menu 2, a short movie clip plays and then you stop on menu 2. I realise I can do this by putting the movie clip on the main scene timeline, but is there anyway i can put it on the button? I think the action script would be something along the lines of "On release play MovieClip and goto frame X" As i said i want the movie to play as an almost filmic transition between menus, with a fade up and then out (Have got that bit sussed using the alpha controls)
View 3 Replies
Jun 7, 2009
I am getting better at Flash 8, but I have a problem. I am in a Movie Clip, and when you press 'g' it returns you to the first scene, and I want it to go to the second scene.
on(keyPress "g"){
_parent.gotoAndStop("Scene 2",7);
}
Is there a way you can do that?
View 1 Replies
Sep 1, 2010
I'm trying to get the following movieclip smallbutton to link to frame 5 on movieclip cont.The way the timeline is built is as so:content_mc > cont > (more mcs) > smallbuttonThis seems to be an issue from every answer I've tried so far since the movieclip "cont" is not being called in the main timeline; first there's content_mc and then comes cont.How would I go about getting the movieclip "smallbutton" to link to the 5th frame of movieclip "cont"?This is for AS 2.0So far I'm at:on (release) { _root.gotoAndPlay("cont"); _root.smallbutton.gotoAndPlay(5);
View 7 Replies
Jun 6, 2010
I'm trying to make a game of sorts. I have a button that you need to click that is in the center of the screen. Upon clicking it, it goes to the next scene.What I need here is for the mouse cursor to start in the upper right-hand corner of the stage of the second scene whenever said button is clicked. Not just a movieclip of a cursor, but the actual mouse itself, since it needs to be able to click a button on the other side.Below I've included an example of what needs to be done (not my actual game, but it shows the problem that I'm having. IT IS AN MX2004 FLA FILE.
View 3 Replies
Nov 17, 2009
I have a Flash movie that uses three scenes. In scene one I have a button with some actionscript to take it to a frame label in that first scene and play the movie from that point on. It works fine. The problem is, in the third scene, I am trying the same action with a different button, going to a different frame label in that third scene. I am getting an error saying the frame label does not exist in that scene. Even though it does! I've checked for typos and everything looks fine. I've copied and pasted the simple actionscript from the third scene below. Is there a line I need to add to make this work in a scene that is not the first scene?
rocketstart_btn.addEventListener(MouseEvent.CLICK, rocketbutton);
function rocketbutton(event:MouseEvent):void {
gotoAndPlay("rocket");
}
View 7 Replies
Dec 16, 2009
I am trying to make a little animation, where when the button is pressed it would take you to a random scene or Keyframe on the animation.
View 3 Replies
May 13, 2009
I have the loading audio file at frame one. However, I want to play the audio only at specific frame or frame lable. How do I do that? Below are my codes:
[Code]...
The above plays the sound as soon as the .swf file is loaded. But I want to play at certain point in time, say frame number or frame lable.
View 17 Replies
Feb 24, 2012
I have an .flv I need to drop into an .fla and code Cue Point to do the following:Play the flv to a specific frame ( in the flv) and then stop on the frame the flv stops I need a play button to be visible when this play button is clicked it plays the .flv from the frame it is on to a second place on the flv timeline were it needs to stop.same play button will be clicked and the flv will play to the end.
View 0 Replies
Feb 16, 2010
How can I get a button inside a movieclip link to a frame in another movieclip on the scene? I tried this code:
function gotoCenter(event:MouseEvent):void {
MovieClip(root).centermc.gotoAndPlay(2);
}
skruetest.addEventListener(MouseEvent.CLICK, gotoCenter);
..where "skruetest" is the button, "centermc" is the movieclip where I want to go to frame 2. I don�t get errors with this code, but nothing happens when I click the button. What can I do?
View 4 Replies
Jul 1, 2009
I'm using Flash CS3 and AC2... I have a button on my main TL and I want to go back a few frames and play a MC at a specific frame when hit.
View 3 Replies
Jul 5, 2010
is it possible to play mc in a specific time frame from the outside??
i'm actually making a card matching game and i'm having problem flipping the 1st card back if the cards don't match... i made 2 animation in 1 mc...the first one is to see the behind of the card...and the other one is to turn it back if wrong...
so is there a way that i could play the mc of the first card to frame 30 when clicking the 2nd card and they don't match??
View 4 Replies
Nov 9, 2009
I made a flash website and had one page load an external swf.
In this external .swf are thumbnails that link to another page (frame) all within the external swf. when you go to these pages there is a 'back' link which links back to the main external swf frame.
My problem is this: let's say i click a thumbnail in the external swf and it goes to the respective thumbnail page, and then i dont click the 'back' button but instead click another link of the main flash website - then i go back to the page that loads the external swf and instead of going to the main frame of the external swf it stays at the page i was previously on.
How do I get the link on the main flash website which loads the external .swf to always load on the first frame of the external swf?
This is my code for the page that loads the external .swf
var request:URLRequest = new URLRequest("branding.swf");
var loader:Loader = new Loader();
loader.load(request);
loader.x = 0;
[Code]....
View 4 Replies
Aug 18, 2002
How would I do this using actionscript? I was kind of thinking like this:
onClipEvent(enterframe){
if(thecurrentframe=2){
stop();
}}
But I am not completely sure. hat variable would the current frame part be in??
View 10 Replies
Mar 18, 2011
I have a number of buttons (that are in an array), I want to add a function that basically says:
If the name of the button that you have just clicked on == (is the same as the name of the scene label) then go to that scene: Now I have used this handler function which seems to work O.K, except for the fact that it keeps trying to goto the FRAME label instead of SCENE label.
I keep getting the error message when i click on a button saying:
ArgumentError: Error #2109: Frame label mars not found in scene home.
at flash.display::MovieClip/gotoAndStop()
function autoGoTohandle(event:MouseEvent):void {
for (var i:int = 0; i < arrayItem.length; i++) {
if (event.currentTarget == arrayItem[i]) {
gotoAndStop((destArray)[i]);
}}}
I figured it must be this line of code at the end: gotoAndStop(+(destArray)[i]);
But how do I change it so it goes to the scene label name and not the frame label name? I Tried adding quote marks like
gotoAndStop(("destArray)[i]");
But I am getting errors.
View 1 Replies
Nov 21, 2007
I have my flash on multiple scenes, and would like to play an animation when clicking on the navigation button before switching to a different scene.
I'm halfway to accomplishing this.
Here is what i used
Code:
_root.gotoAndPlay("changepage1");
_root.onEnterFrame=function(){
if(this._currentframe=="changepage2"){
[Code]....
The above code is on a blank keyframe. Changepage1 is the start of the animation and Changepage2 is the end of the animation.
Upon clicking the navigation button it plays the above scenes.
However it doesn't change scenes to scene "Home2".
View 1 Replies
Jan 14, 2010
I want to preload a movie into my main movie (so I know it's safely loaded fully). BUT I don't want it to start playing until a specific frame in the main movie? Preload movie but can't play until a specific frame
View 5 Replies
Jan 14, 2010
I want to preload a movie into my main movie (so I know it's safely loaded fully). BUT I don't want it to start playing until a specific frame in the main movie?Does anyone know how to do this in actionscript 2.0?
View 2 Replies
Feb 19, 2010
how to play the timeline with a simple button
example:
in AS2 you could attached script to button something like
on MouseEvent {
gotoandplay(6);
}
thats all I am trying to do, but in AS3 how do I simply get a button when clicked to go to a frame and play.
View 3 Replies