ActionScript 3.0 :: Home Button(jump To Frame) Not Functioning?
Sep 9, 2010
First off, I am new Second off, I hate action script it's a pain in the ass. Here's what im dealing with: Im making an info point computer program in flash cs3. After making several pages I am forced to make a navigation button to jump to the first frame(home).
At the home page you will be sent to several different pages (these links work just perfect. To create a home button i've made an button with the same code
Code:
home_now.addEventListener(MouseEvent.CLICK,homeClick);
function homeClick(event:MouseEvent):void{
gotoAndStop(1);
}
Unfortunate this does not work, while the links at the home page do work.
I've tried several things to fix it, but it won't do:
- Send to tagged frame "home" instead of frame "1".
- Change the instance name
- Putt the actionscript in the exact same frame.
Weirdly enough the home button does work on the keyframe where it is placed, even though I pushed the frame over all the other pages it wont jump to home.
Explanation (edited prt scrn):
img190.imageshack.us/img190/1212/84313940.jpg
View 1 Replies
Similar Posts:
Sep 6, 2011
I built a button in one of the movie clips in my project,
when I release this button, it goes to the 41st frame of the main timeline and continue to play until the frame 70 which has got a stop; command. till here everything's just OK. But I want this button to do something more though I don't know whether it's possible or not.
I want this button to go and play the frame number 41 in the main timeline, and then after it stopped at the frame 70 , then jump to frame 73.
View 5 Replies
May 22, 2009
I've got a button that I want to use to jump to a labeled frame within the timeline. When I click on the button I can't get my trace statement to work. The error message I get is:
Error 1061: call to a possibly undefined method addEventListener through a reference with a static type flash.display:SimpleButton
BtnDone is the instance of the button on the stage, btn1867 is the frame label I want to jump to once the button is clicked.
Here's the code:
stop();
btnDone.addEventListner (MouseEvent.CLICK,clickSection);
function clickSection (evtObj:MouseEvent) {
//trace action - what's happening in output window
trace("The button 1867 was clicked!")
gotoAndStop("btn1867");
}
View 3 Replies
Feb 9, 2010
i see a code back in my old days of flash pro 8.0of gotoAndPlay() and stop(),etc;now its as3.0when i tried my old codes b4 with as3.0 it doesnt work..well my button is named start_btn.. and all my buttons is on the same frame as it is..but i wanted for it jump to the next frame where most of the actions of my flash takes place..can some1 guide me thru this?im jst new to cs4..and lots of things has changed when i jumpd from pro 8.0 to cs4.
View 2 Replies
Sep 20, 2010
I have a button that when clicked,i want it to play an animation from frame let say 3.
View 2 Replies
Mar 2, 2011
This time, my goal is, I want to jump to a specific frame, when a button is clicked.
For example,
When I push button1, jump to frame 55,
When I push button2, jump to frame 65..
Buttons are designed in one frame, at the beginning, together...
View 2 Replies
Aug 26, 2009
I have many buttons in a few movie files, i need to select a few of these buttons and store them in an array so i use....
var twocolourbuttons:Array = ["mybutton1", "mybutton23", "mybutton34"];
I then need to show a movie file if the button that has been clicked on is in the array. so something like...
if e.target.name is in the array show the movie twocolor.visible = true;
i then need to go to a certain frame of the movie, depending upon where the button is found in the array. So if the button is at position three of the array, i need to jump to keyframe 3 of my movie.
View 1 Replies
Dec 2, 2009
I need to create a script that will jump to a certain frame in the scene when a movie cilp reaches its last frame. Putting a goto... within the MC itself doesn't work. I assume that I need to create a listener of some sort....I haven't been able to find what I need in any documentation (and I'm even been looking through AS dictionaries going back to Flash 4).
View 1 Replies
May 15, 2009
I'm creating my first website. I've managed to create a homepage. On the homepage is a enter site button, which once it is pressed starts thetimeline... I have an actions/labels layer which I am writing my code in. On frame number 'one' is my code below.
stop ();
enter_site_btn.addEventListener (MouseEvent.CLICK, buttonClicked)
function buttonClicked (event:MouseEvent): void
[code].....
View 5 Replies
Sep 10, 2009
I'm developing a site that has different pages on different frames. My buttons work correctly, and go to the correct frame, however, if I press it twice, it jumps to another frame. I have the actions to stop at each frame and this is the code I am using for the navigation.
[Code]...
View 4 Replies
Apr 17, 2011
A friend of mine wants to have some navigation-based mc links in frame 1, then nav to a certain frame, and then have a "back" button. When the nav mc links are clicked, the timeline skips to a given frame label.
Pretty simple.
Most of the links have the same nav mc in them, so when I nav to them, I can also access any of the other frames via something like:
linkg.Contact_btn.addEventListener(MouseEvent.CLICK,Contact_btn_clicked);
function Contact_btn_clicked(e:MouseEvent):void{
gotoAndStop("ContactPage");
}
The code above is in the first frame, and it is on it's own layer which spans the entirety of the frames in the project, so I would think that these function definitions would persist. But, when I go to a specific link, which does not have the nav mc in it, and then hit that particular frame's "back" button, all of my function definitions are gone, even though the nav mc links are now present, and as I mentioned the listeners should be active.
View 1 Replies
May 27, 2009
The reset button on this file doesn't work. In fact I was puzzled about why it had disappeared and it is there but the wrong size (see large navy blue shape in the lower right hand corner of the stage?) When you click this shape you get this error:
ArgumentError: Error #1063: Argument count mismatch on AddATree2/onReset(). Expected 0, got 1.Not sure what that means because I can't find any arguments in this function.This should work so that the text and polygons disappear when the reset button is clicked so you can do this again.Here is the code and the fla is attached. (There are three files inline: Reset.as Tree.as and AddATree.as. See attached .fla AddATreePrototype.fla)
AddATree.as
---------------
Code: Select all/* AS3
Copyright 2008 __MyCompanyName__.
[code]....
View 11 Replies
Sep 16, 2008
I have been trying to get a for loop to produce buttons based on a value.
My current code is:
var xPosition:Number = 50;
var yPosition:Number = 15;
//problem one is that "rows" is a variable from the html page
[Code].....
View 7 Replies
Mar 28, 2011
the only "Home" button that works is on the "Theory" page, which is where the actionscript happens to be located(frame 76).. In other words, if I click on the "Theory" button, I'm able to return to my home page. However if I click on any other button, it plays straight through the remaining frames and loops back to the beginning.
Frame 75(nav buttons)-
Code:
stop();
import flash.events.*;
import flash.display.*;
[code]....
View 1 Replies
Oct 7, 2001
I have a movie clip with a button, clicking on it goes to another scene. When in the other scene, i want to be able to click another button and go back to the original scene and have the movie clip be at the frame where I left it, or any other that I specify.
View 2 Replies
Mar 18, 2012
I have a memory game here. And each time a card is removed from the gameboard I have "cardCount -2", when this cardCount gets to zero, I want the program to jump to the next frame which is like a "game over" page. I've tried using gotoAndStop(); as well as nextFrame(); but it doesn't seem to be working![code]...
View 2 Replies
Nov 10, 2011
I have problem to jump to a frame after a video clip (which is on server) is done playing. Do you have any idea how to do this?
View 7 Replies
Nov 21, 2009
if a flash website can jump into another url if it enters a certain frame...
For example maybe something like?
on enterFrame {
getURL("http://www.sample.com/", "_self");
}
how do i tell the timeline to get that url instead of the button?
View 3 Replies
Aug 4, 2008
On the main stage there is a MC on frame 4.
I have a drop down menu button that I want to jump me to frame 2 of that MC
I tried this:
button.onRelease = function () {
_root.instance_of_mc.gotoAndStop(2);
}
but it didn't work.
View 8 Replies
Jun 22, 2010
I'm working on an image viewer that contains 14 projects, each being their own external swf.I am determined to get a functioning invisible next button that takes you to the next image in the current project or to the next project if you are on the last frame in that project.The current code works well enough starting at any project and clicking until you get to the next. When the next project comes up it stops working.
next_btn.addEventListener(MouseEvent.CLICK, loadnext);
function loadnext(evt:MouseEvent):void {
if(firstswf != null) {[code]...
It doesn't seem to throw out any errors...
View 14 Replies
Jul 27, 2009
I have a home.swf that is inside home.html.inside home.swf there is a btn with the following
cinema_btn.onRelease = function() {loadMovieNum("video_main.swf", 0);
inside video_main.swf is the following
loadMovieNum("video1/reels.swf",1);
the idea is to load reels.swf in level1 on top of video_main.swf in level 0 why reels.swf size looks much larger even though all swf's are 900 x 800?
[Code]...
View 2 Replies
Apr 22, 2009
I want to jump to a specific frame in the swf I load using the Loader class. As it is now it goes directly to frame1 in the file, which I dont really want it to do. I'm using Flash CS4
View 2 Replies
Nov 20, 2009
I'm trying to create a movie, that when a correct word is entered, it goes to a specified frame. The code below words fine but I need to make an addition to it,
on (release, keyPress "<Enter>") {
if (inputtext eq "word1") { gotoAndStop("frame1");
} else if (inputtext eq "word2") {gotoAndStop("frame2");[code]....
I was hoping to add extra words that would go to the same frame. I know I ca do this by�
if (inputtext eq "word1") { gotoAndStop("frame1");
} else if (inputtext eq "word3") {gotoAndStop("frame1");
but was wondering if there is an easier way, something along the lines of�
if (inputtext eq "word1", "word2", "word3") { gotoAndStop("frame1");
View 1 Replies
Dec 3, 2008
I have an animation where I want to play a movie clip and then play another movie clip from the library (selecting randomly from a group of movie clips). I couldn't figure out how to get this to work, so I tried to play the first clip, and when it gets to its last frame jump to a random clip which is already on the time line. The AS is attached.
Clearly I'm missing something critical here.
View 5 Replies
Aug 6, 2010
how to accomplish my current task. I have an .fla with 32 frames in it, an open frame, a close frame, and a bank of 30 frames in between. I want to set up some AS so that once the user clicks a "Next" button on the first frame, it randomly jumps to another one of the frames within the bank of 30. Then, when they get to that frame and view the contents, and click next, they'll randomly jump to another one of the remaining frames. This will only happen for 20 frames, after the 20th viewed frame, I want the "Next" button to take them to the final slide in the series. The purpose being so that each time a user views the program, it's never the same (well not likely ever the same) - so they'll all see 20 different frames in a different order.
I'm guessing I could do this with arrays, and the math.random method, some if/else statements.
View 6 Replies
Nov 16, 2011
i have a clock, and a background the background contains an animated ocean (100 frames) there are four sky themes which change on the appropriate hour to night-time, morning, sunset, sunrise (could just use alpha to show another here although maybe processor intensive)
ok so the ocean could animate on its own and only the sky would need to change, that would be the easy part
but when it gets to night-time the ocean needs to jump to the night-time version of itself so if the user presses the hour button, and the ocean is on daytime at frame 80, how would i say play night version at frame 81 so that the ocean doesnt skip animation??
View 27 Replies
Mar 23, 2011
Today I found that flash had no option to jump to unassigned frames.
Say, I am working on frames numbered from 1 to 250. Now I need to jump to frame number 15000 and I found that I cannot jump to the frame number 15000 directly. I have to click in the Timelline and move the scroller right to its full extent, again click in the last frame visible in the time line and so on continue this until I reached the frame 15000.
Is there any easy way to jump to frame 15000 ??
View 2 Replies
Jan 20, 2006
i'm trying to make a transition, but unfortunatelly cannot make it work! it does not jump from the _root frame to the one i indicate, simply repeats the movie in that frame everytime i press the buttons! here are my actions on the buttons:
[Code]....
View 3 Replies
Aug 3, 2008
I work with flash 2.0 in CS3 When I click a button I want to load an swf in a higher level of a "main" swf and jump to a certain frame of the "main" swf. Is that possible? In a nutshell, I want to bring in an swf in a higher level that play a fade to white animation, which then hits a stop motion on a blank frame at the end, then the timeline of the main swf should go to a frame where a transition fades white to a new section of the flash website. Or the timeline could jump right away. Either way I need a goToAndPlay action to work with a loadMovie action simultaneously on a button click. For some reason these two actions seem to cancel each other out.
View 1 Replies
Oct 26, 2009
I need to know How to jump to a certain Movieclip, And Frame with AS2!? By Clicking on a button.
Right now I just know how to jump whitin a Movie clip. But I need to jump to a whole other movie clip from a other movie clip.
This is what I know! (Se below)
on(release){
gotoAndStop(5)
}
[Code]....
Been searching more then 10 hours all over the internet. With No Result. Either im a retard or the solution is so simple nobody cares to post it.
View 8 Replies