ActionScript 3.0 :: Button Refer To Main Timeline?
Dec 17, 2008
I have a movie Clip on my main timeline and with in that movie clip is a button. That button has a CLICK event that I want o go back and refer to a "frame" on the main time line. How would I go about doing that?
Here is what I thought I should do
import flash.events.MouseEvent;
WebSitesBtn.addEventListener(MouseEvent.CLICK,WebDesignBtnClick);
function WebDesignBtnClick(event:MouseEvent):void{
_parent:gotoAndStop("Web Design");
}
"Web Design" is the Frame Label which I want to refer too
what I am missing or how I can properly refer to the main time line?
View 1 Replies
Similar Posts:
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
Jan 27, 2009
I can't seem to find this simple code anywhere. But, how do I access a movie clip on the main timeline from inside another movie clip. I want to:
Code: Select allwallpaper.gotoAndStop("blur");
i've tried
Code: Select allparent.wallpaper.gotoAndStop("blur");r
Code: Select allstage.wallpaper.gotoAndStop("blur");
Code: Select allparent.stage.wallpaper.gotoAndStop("blur");
View 12 Replies
Feb 28, 2009
I have a frame label on the main timeline called "History" I have a movieclip on the stage. Inside that movie clip I have a button.
I want to refer back to History from the button within the clip. Tried everything.
View 2 Replies
Dec 4, 2006
Is there a way to refer to an object on the main timeline from inside another movie clipThe "_root." function does not work and I am still unfamiliar with the "_parent." functions purpose.
View 2 Replies
Feb 1, 2010
I would like to know how to access a XMLList object in main timeline from movieclips.Can XML be accessed through 2nd level(nested movieclips)? In frame 1 of main timeline, the XML file has been loaded.
var xmlData:XML = new XML();
var data:XMLList;
xmlData.ignoreWhite = true;
[code].....
View 0 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
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
Feb 17, 2009
I am just about to give up on this whole as3 thing altogether. It is so complex that it is becoming prohibitive for designers, event technical ones ike me (I program easily in perl/php/javascript/sql). All I am trying to do start the main timeline from a button. The button's "up" state is also a movie clip.
Here's the process I am looking for:
1) the main timeline progresses until a certain point where I have inserted a stop();
2) I then display a "continue" button (which is an animated movie clip).
3) the user will "click" the button and the main timeline continues.
My simple Code:
this.stop();
function closeIt(event:MouseEvent):void
{
[code]....
My problem: when the button is clicked it just starts the button over again.
View 5 Replies
Jul 30, 2010
I've a problem about AS2 on button within a MC.
In my working flash, there are 2 MCs
1. a MC called content, full size as the movie, act as a blank platform to load external swf
2. another MC button containing a button, click to loadMovie, placed on top of MC content
I'd like to click the button in button to load an external swf in content.
The script I added on button in MC2
Code:
on(release){
loadMovie("XXX.swf", this.content);
}
[Code]....
View 6 Replies
Nov 10, 2009
I have a movie clip (mc_menu) that sits on the main timeline. Inside mc_menu I have several buttons that display items inside the mc. I also need to display an image on the main timeline. I have converted the image to a movie clip (mc_01). I am using AS2.
View 2 Replies
Jun 19, 2010
i want to link a submit button in a movie clip to the main timeline, any ideas of how to do it?
View 15 Replies
Oct 6, 2009
i need to code a button in the main timeline and this is the code im using:
ActionScript Code:
stop();
stuff = 0;
day = 1;
money = 50000;
[code]....
There is an error with line 9- the one in bold. its a syntax error- but whats wrong with it!
View 9 Replies
Jan 9, 2010
I'm pretty new to flash and i'm trying to figure out how to hide a button that is on the main time line in one part of my movie clip. I tried doing "btn_return.visible = false" on the mc but its coming back saying btn_return is undefined.
View 9 Replies
Jul 1, 2004
I have 2 scene, using button to swap in between file. If the button is in maintime line i can swap in between but my button is inside a movieclip in scene_1. After I click it reload the scene_1 and my script on button is:
on (release) {
nextScene();
}
Is it using
_root or
this.(dot)
.
View 6 Replies
Jul 21, 2008
I am so frustrated now - I'm trying to clean up my code, but I just don't understand this issue.
I understand that on(release)[code]...
- But there are two things I just don't manage to convert;
1) How do I move the following from the btn_volumeSlider to the main-timeline?[code]...
View 3 Replies
Jul 1, 2004
i hav 2 scene, using button to swap in between file.if the button is in maintime line i can swap in betweenbut my button is inside a movieclip in scene_1. After i click it reload the scene_1,and my script on button is
on (release) {
nextScene();
}
[code].....
View 5 Replies
Oct 1, 2009
I have a container movie which loads another movie into a Loader object which then gets added to the main timeline. The loaded movie has a main class which controls all the other classes in that movie. The container movie has one other element - a scrollbar which scrolls the loaded movie (which is longer than the container) up and down.
When content changes in the loaded movie I need to pass a message to the scrollbar. If I trace parent.parent.parent from the init() function of the loaded movie it traces [object MainTimeline]. My scrollbar, sBar is a direct child of the main timeline, but tracing parent.parent.parent.sBar doesn't work So how can I pass a reference to the scrollbar to the loaded movie? Here's the code in the container movie:
PHP Code:
var ldr:Loader = new Loader();
var sBar:Scrollbar;
ldr.contentLoaderInfo.addEventListener(Event.INIT, initHandler);
[code]....
View 3 Replies
Aug 13, 2011
I have a movieclip inside the OVER on a button, right now I have an animation that causes the button's brightness increases from 0 to 10 over 24 frames and then come stops because of a stop (). I now intend to add an animation after stop () which gets the button's brightness goes back to 0 again when you no longer hold the mouse over the button. I would therefore like to make some kind of mouseOut event that allows Movieclip go to the next frame. I have tried to insert a target path but it seems that it can't reach the movie clip inside the button.
View 1 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
Aug 15, 2009
I have a Flash project which has about 90% of its code in the first frame, on a layer called 'actions'. the remeainder of the code is attached to several buttons throughout the project. I want to take the code attached to the buttons, and paste it into the first frame, 'actions' layer. what I want to know is how to do it, and still have the buttons function properly. This is in AS2, and will eventually be converted to AS3, when I get all the working code on the first frame. I don't know how to reference it, from the first frame of 'actions' layer.
[Code]...
View 1 Replies
Oct 2, 2009
I have a thumbs_mc with thumbnail images. Within thumbs_mc, I have a transparent overlay_mc that functions as a button. Mouse over the overlay_mc and the alpha chages so there is a tint over that particular thumbnailWhen overlay_mc is clicked, the main timeline goes to a particular frame label.What I need to do is have the position of the playhead on the main timeline also determine the alpha of the overlay_mc so the viewer knows which thumbnail is playing.
View 1 Replies
Nov 2, 2009
as always, this seemed simple in AS2, but i am stumped with this simple command in AS3.
i have a main timeline [one scene] that has multiple movies, one after each other, in different frames. i need the buttons that are placed in a layer below the movies to access various movies in the scene. was really simple in AS2.
it appears that i can get my button to go to the frame, but the movie contained in the frame will not load and or play. [i have 2 frames dedicated to each movie, the second frame, in the actions layer has a stop command]. the following is the actionscript and the errors i am getting.
AS3:
food_btn.addEventListener(MouseEvent.CLICK, playfood);
function playfood(event:MouseEvent):void {
gotoAndPlay("food");
}
[Code].....
View 3 Replies
Feb 11, 2010
I have a movie created that is broken down into sections on the timeline (home about contact etc) Each section has a movieclip I want to be able to be in the about movieclip and click a button that will bring you back to the main timeline contact section Heres is the actionscript I am using to navigate the main timeline for each section
stop();
//handle events for buttons...
index.addEventListener(MouseEvent.CLICK, clickSection);
about.addEventListener(MouseEvent.CLICK, clickSection);
wind.addEventListener(MouseEvent.CLICK, clickSection);
[Code].....
View 1 Replies
Oct 16, 2010
I have a stop on my main timeline. At the stop I have a movieclip play. In the movieclip I will have a video play. After the video plays I have a button for the user to continue play until the end of the movieclip. Once the movieclip is done I want to resume back to a specific frame in my main timeline.
View 3 Replies
Dec 1, 2010
I have a btn within a Movieclip at a certain keyframe the user is asked if they want to go back to make another selection from a choice category (within the maintimeline)
As of now the code I have for the btn that jumps you back to the main timeline is:
on (press) { gotoAndStop(_root.stop(24));}
Does _root.stop(24) need to be in quotes?
ie. "_root.stop(24)"
View 1 Replies
Jan 20, 2011
i made a main(parent) page that loads an swf which has a button(a1) which on click i need it to move the timeline of the parent
i wrote this code to the external swf and tryed many commands such as Object(root).gotoAndStop(1);
a1.buttonMode = true;
a1.addEventListener (MouseEvent.MOUSE_UP,a1a);
function a1a(event:MouseEvent):void {
}
View 3 Replies
Jan 8, 2009
I have been fighting with Flash for the past week attempting to change my code so that when you click on the movieclip photo_mc, the playhead will advance on the main timeline. I have tried everything:
eg: (code on mc)
on (release){
_root.gotoAndPlay("options");
[code].....
View 5 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