ActionScript 2.0 :: Advanced Buttons Linking?
Aug 13, 2007I have made some advanced buttons and want to use then to navigate to a different frame in the site this is what have
b1.onRelease = function() {
this.gotoAndStop(10);
I have made some advanced buttons and want to use then to navigate to a different frame in the site this is what have
b1.onRelease = function() {
this.gotoAndStop(10);
I've just finished making advanced rollover buttons, but I just realized that apparently, I don't know how to link them. Can someone explain to me how to link rollover buttons and exactly where to place the code?
View 2 RepliesI'd like to know if there is a way to do the following: have a movieclip to act as a button, that is:
have an "over" and "out" states but at the same time have another frame that is used to have an "active" state when clicked. The problem is the following: since there is a rollOut state defined, when clicked the mc jumps to the active state (frame) but returns to the out state when cursor moved out of it of course...so...how do you have a button with, over, out and active states?
I have tried out on the advanced roolover buttons in this tutorial [URL]. But the problem now is tat I have a button a red crab when I rollover it it will become a crab grey button. I have 2 separate buttons for the crab. While basically the grey crab button's animation lies in the same movie clip as the word tween. So what I want is when I roll over the red crab it will display the grey crab, and when i roll out the grey crab will fade away to the red crab. And also when I clicked on the grey crab when the mouse is hovering over it it will open up another movie clip. There's also some mistake with the grey crab it only seem to be working when it is in graphic but want I want is a button. I can't assign ant actionscript codes to it if it only works in a button.
View 1 RepliesI have a navigation bar with a series of buttons on it. When you rollover any other these buttons there is and action on them saying :
on (rollOver) {
this.gotoAndPlay("over");
}
on (rollOut) {
[code]....
Now I want to create some AS that when a button is click and disabled and then the user clicks on another button all buttons will reset themselves and play "out" if they were previously clicked (enabled=false)So in the end I am just looking to say "Hey flash if a button 1 is clicked and disbaled and then button 2 is click then button 1 needs to enabled itself and play "out".
I have 6 buttons aligned horizontally. When I press one button, I want all of the buttons to move to different _X positions with easing that would be specified in an array or in a variable. I'm looking for the easiest code. I had the code and a fla. for this a few years ago when I was deep into Flash, mastering actionscript. Now, it's like starting over.
Also, can anyone assist me with a similar, more advanced code? It's the same as above, but when one presses a button, that button pressed would move to a specified _X position, and the button that was previously in that _X position would get back in line, to the far left of all the buttons...
[URL] i want the white box to close , when another button is click. Its pretty much similar to the TRANSITIONS TUTORIAL. Here it is : [URL]
View 3 RepliesI have a button that looks like this: [URL] so when you rollover, it plays an animation, and when you rollout, it plays the exit animation. And if you rollout before the the enter animation is over, it will jump straight to the exit animation. the swf right there works perfectly, exactly how i want it, so i popped it in as2 and it will not function, so I decided to come here, I need to know how to do this is as3. how can i make this work in cs3?
View 3 RepliesNote the button at the top called portfolio, on mouseover this button should loop through the "mouseover" label section, and when the user takes the mouse off of it it should continue to play through what it has started, and stop at the begining of the mouseover labelwhen the user clicks on the button it should play through the "trans" label (only once) and begin to loop at the label section "current" when the user goes to another section, for example, clicks another button besides portfolio, the animation should stop on the label "visited" my code for it to loop looks like this (on the invisible button over the movie clip)
on (rollOver) {
portfolioBtn_mc.gotoAndPlay("mouseover");
}
[code]....
I have got a very simple flash timeline, on each frame is a different page of a book. There is four pages alltogether. I am trying to create 'next' buttons so that the user can flick through the book.
This is the code I have used:
stop();
btn_1.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler1);
function mouseDownHandler1(event:MouseEvent):void {
gotoAndStop(2);
[Code]....
This was created with frames in dreamweaver and the nav bar and index page movie are swf files. When you click on the pages in the nav bar it redirects to the index page. It does this the majority of the time and every now and again when you click it will go to the actual page.The way it is set up in dreamweaver, it has the nav movie in the top frame and the content in the bottom. All I did was change the old i.p address to the domain name because our host changed. I did nothing else and then this started not working correctly.I have checked and double checked all links in flash and they work from the swf but when it is loaded in the browser it does that weird linking to the index again. This is the code in flash to link to the pages:
on(release) {
getURL("http://www.fostersfreeze.com/Food.html","_top");
}
[code]....
Is there a way to link a button to a .SWF file and if not is there a way to import an .fla file into a new scene of a different .fla file and then link the button to that scene? I am kind of a beginner to actionscript but I know some basics and am willing to learn.
View 1 RepliesI'm having trouble figuring how to get the buttons to reference the correct imageBox and position the imageHolder. The imageHolder is a movieclip on the main stage and inside of that are a series of imageBoxes attached for each image. You can click on each image and the imageHolder will move and the images will enable and disable. If you click on a button the current image will fade but then return to 100% alpha. It's not completing the disableImages function.
You can view a swf of it HERE. Probably viewing it will be better than anything I can describe.
This is the actionscript for enabling and disabling images and for positioning the imageHolder: ActionScript Code:
function disableImages() {
for (i=0; i<imageTotal; i++) {
imageHolder["imageBox"+i].enabled = false;
[Code]....
I have created 3 invisible buttons over a graphic. Each has its own button layer and action layer. For each action layer I have used:
my_button1.addEventListener(MouseEvent.CLICK,clickHandler1);
function clickHandler1(event:MouseEvent):void{
navigateToURL(new URLRequest("
[code]....
When I test the movie I see the hand icon so I know it's an invisible button, but when I click on it, it goes out of the flash play like it wants to go to a browser, but nothing happens. When I upload the files I can see the hand icon again, but nothing happens when I click on the link. I tried the changing the .html file that it is housed in to an .htm file, but that didn't work either.
I am new to this. I have followed several tutorials with noluck. I am using action code 3. I want to link an invisible buttonto an url. I placed the code in the layer with the button.Thefollowing code I have used, but then follows the error message. Ican't figure it out.1180: Call to a possibly undefined method on.1120: Access of undefined property release1180: Call to a possibly undefined method getURL.
View 2 RepliesI am currently working on an outdoors project. You can view the website here to see what I mention below.
The problem I am running into is that I want the Yahoo, Camospace, and Myspace logos to link to their respective websites when clicked.
All of the current action scripts I have found do not work for me at all.
I am using Flash CS4 v10, action script 3.0
Im making a flash program about pancakes (random I know). I have a "Mainmenu" scene and then a "Recipe" scene. I have a button on my mainmenu which takes me to the recipe page when I click it, the code behind the button is
"stop();btn_recipe.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);function mouseDownHandler(event:MouseEvent):void { gotoAndStop(1, "Recipe"); }"
Then when I arrive at my recipe page I have a button which will take me back to my MainMenu, the code behind that button is:
"stop();btn_home.addEventListener(MouseEvent.MOUSE_DOWN, mouse5DownHandler);function mouse5DownHandler(event:MouseEvent):void { gotoAndPlay(1, "MainMenu"); }"
So I run my program and the first button works and takes me to recipe page but the button to get to the main menu does nothing, click it and no response or anything
I have laid out the four pages that I wish and have created a button for each page on each page.I was told a simple stop script would stop the pages acting like a movie.I entered:
14:00PM
stop();
function button1_clicked(e:MouseEvent) :void{ gotoAndStop("home");}
function button2_clicked(e:MouseEvent) :void{ gotoAndStop("about");
[code]....
which I was told would accomplish this and link the buttons to the relevant pages. When I test the movie the buttons start flickering as well as the images.....
how to link moviclip to rotating buttons. the experiment button is working but do not know how to link the others.
View 1 Repliesi'm just a newbie....i want to link a button to some moving thumbnails...this is the code
[Code]...
So I have 3 buttons. One button links to an animation, the second button links to a different animation, and the third one shows the links. The first button works properly, but when I click on the second button, it goes back to the animation that is shown at the first button. How do I fix this? Here is my code for the first button:
button2.addEventListener(MouseEvent.MOUSE_DOWN,mou seDownHandler);
function mouseDownHandler1(event:MouseEvent):void {
gotoAndPlay(1, "random");
}
I have made sure that the button's instance name is button2, and that the scene name is "random".
Here is my code for the second button:
button3.addEventListener(MouseEvent.MOUSE_DOWN,mou seDownHandler);
function mouseDownHandler2(event:MouseEvent):void {
gotoAndPlay(1, "random1");
}
basically I had a situation arranged where when a button was clicked and flash would then display a certain image by jumping to a label on the timeline, and by clicking a different button a different image would be shown. this was working pretty well but for layout reasons I had to split these buttons and the timeline that they relate to up into separate movie clips. obviously the buttons dont do anything now, but what i'm hoping to find out is how I can link these items back up despite them being in separate movie clips. is this possible?
View 0 Replies1. I have very little flash experience, but have been tasked with creating a presentation.
2. I have decided that if each slide was a movie clip, it would keep my timeline tidy.
3. In the attached fla, you will see there are 2 slides, with (green squares) for buttons. The purpose of the button in the first slide is to advance to the second movieclip in the timeline and the purpose of the button in the slide2 movie clip is to go to and play the label "start" from the first movie.
However, nothing I do seemed to work. I'm hoping someone can talk me through it so I can replicate the button functions throughout the file for multiple movieclips / 'slides'
I've attached a txt file with the URL to where the .fla can be downloaded
why my 3 pages are not being brought up when i 'ctrl enter'. I am making an online game with 3 pages - an instructions page, game screen and end game screen and do not know why my initial page is not opening.It is sending me the error message:Error #1010: A term is undefined and has no properties.at MainClass$iinit()[code]
View 1 RepliesI am relatively new to Flash development. I have a scene that contains 3 buttons that are movie clips. I am trying to link each button to a seperate scene but no matter what script i use the buttons do not click through to the new scene.
Each scene consists of 20 frames that need to play when each button is clicked on, so rather than using gotoandstop i am trying to use gotoandplay to a specific frame within each of these scenes.
i have a movie in which i have 3 movieclips..lets call them MC1, MC2, MC3.In this movie i have 3 buttons linking to respective movieclips.but the button does not show any actionso far i have the actionscript on the button is:
on (press)
{
targetPath('MC1')
[code].....
It seems that my 4 buttons aren't linking correctly or something.I'm linking with labels, like this:
Code:
on (release) {
gotoAndPlay("intro");
}
The links go like this: Home, Photos, About Us, Contact Us.Here's what's wrong:
1.) If I click on About Us from the homepage, it goes to Photos instead.
2.) If I click on Photos while I'm on the Photos page, it goes to some unknown frame before the photos label, and stops where I don't even have a stop placed.
I made a drop down menu following the tutorial here. My problem is that the drop down buttons don't link to the respective scenes. Their rollover states work.
When I work on the drop down menu movie clip directly from the library, the button links work.[code]...
I'm currently attempting to link buttons to other frames in the movie. I've tried tutorials and just can't seem to get my code to do what I want. The issue is that the buttons are inside a movieclip, and I'm trying to link them to frames in the main movie (Scene 1).
View 6 RepliesThe buttons in the flash movie also link to movie frames in the flash and external html pages. Once movie plays and stops, all links work fine, the links to the anchors and the links to the other html pages, however when I try and link back to the flash movie from an external html page, to specific frames in the flash movie, the html link will link back to flash movie frame fine, however once your back in the flash movie, none of the buttons in the movie work anymore.I have embedded the flash movie in an HTML and published it with anchors,"home, about, events etc.used this code for several buttons in the flash linking to frame anchors in the movie:
///////////////////////////
home_btn.addEventListener (MouseEvent.CLICK, handler);
function handler (event:MouseEvent):void
[code]......