ActionScript 1/2 :: Make A Flash Button Work In Navigation Bar
Oct 12, 2010
How do I make a button created in CS4 flash open another page in my website?
I created the button in flash cs4 with a static state and a pulsing state on "Over" and "down" that works fine. I tried adding the following action to the button>
on (press) {getURL("aboutus.html?include=contact","_self");}
but nothing happens when I view it in live view. and all the pages exsist in the file. (Using Dreamweaver CS4 to build webpages.)
I'm trying to make a navigation menu that primarily uses key presses to work.
Code: var keyListener = new Object(); var listSelection:Number = 1; function upPress() {
[code]....
(note: this uses the lmc actionscript tweening classes)I have 10 items in the list, and basically this works fine for the most part. Press up and the menu slides up 63 pixels (height of one button) when it's not at the end of the list, and press down and it slides down until you reach the end. and it keeps track of which one is selected. fine. great. but when holding down a key it skips forward but might only move the options list only a few pixels. or if pressing the keys really fast it'll make the list stop short.
I guess what I'm looking for is how to make this menu list work so they can make a selection through an animated menu using the keyboard. so press up and the list animates up to the next selection, or press up three times fast and it animates up to the fourth option.
I am trying to make the button to work. My button is located on the main timeline, but my action is placed inside the movie clip. So when the button on the main timeline is pressed I want flash to play frame labeled "enq" inside the movieclip. Makes any sense? The code i am using is:
I am trying to make a button work in a Flash cs4 file using as2. It is a template I am modifying from DreamTemplate. I don't know what I am supposed to change and exactly what I should change that unknown code to Here is the code I have:
[Code]...
As you can see I have tried to replace the url that was in the quotes and it does not work.
I'm creating an Entry Page slideshow here with Flash Cs3 and AS2: [URL] I'd like to be able to click on the whole slideshow (or the "Enter Site" text) to go to another page on the site, which I'm calling "[URL]." I've read various tutorials all day and tried many things, but couldn't seem to apply any "on release" action to the "Enter Site" text that would work. I even created an invisible button (putting a keyframe on just the HIT state and deleting it from the UP state), named the instance "invbutton3", and then typed in this action on the first frame and inserted a keyframe at the end of the show:
Is it possible to make the flash content go back to some previous frame when the user clicks on the back button in the browser? Similarly, can the the refresh button be used to refresh to the same frame and not go back to the starting frame?
My problem that I'm having is I am trying to build a menu consisting 3 buttons, side by side that open and reveal subnavigation buttons on rollover. Then on rollout of the main container button, they close back to where they were. I have built the buttons and everything works great, the only problem is that on rollover of the internal buttons, the main button senses this as a roll out and plays the rollout animation event (closes the button). How can I make the main button not sense the rollovers of the internal buttons and only play the rollout event on rollout of the main button?
I am trying to make a sprite button with graphics and can't make it work. I have successfully added text fields so I know the path is correct. I suspected my code was correct and confirmed it should be, after reading several tutorials showing the process for creating sprite buttons with graphics. Anyway, I imported nearly every class on Earth, but certainly everything which needs to be. Stage is gray and 800x600.The graphics code by itself with appear, but not when linked to the sprite. Also, the sprite won't appear no matter what. Another interesting piece of the puzzle: nothing will trace, not even objects such as textfields which actually appear and function on the stage when I text the code.
public class ContactClass extends Sprite { public function ContactClass() { var home_btn:Sprite = new Sprite();[code]....
having an issue with some mouse events I have. If you go here you can see what I mean.When you mouse over one of the thumbnail images, a title pops up. If you click one of the thumbnails, the group shifts to the right. (This is making room for what I'm working on right now, it's not just random ) If you then navigate to "About" or "Contact" then back to "Works" neither the mouseovers nor the clicking on the thumbnails works.That middle section is one object called "images" with three frames, each labeled and then navigated to inside the buttons with gotoAndStop(frame#).Here is my code for the buttons and mouseovers:
I'm using flash for the first time to create my graphic design portfolio and I'm having trouble keeping the file size small, and can reduce it by (hopefully) doing the following:
My resume has a lot of classic tweens with alpha channels (to create fadein/fadeout effects) and as of right now, I need to create a separate layer of fadein, fadeout for each transition. IE: My resume to portfolio page needs one 20-frame transition, my portfolio page to resume needs a 20-frame transition, my 2nd page of my portfolio page to my biography needs a 20-frame transition, etc. It's getting out of hand.
I could easily remedy this by using a lot of separate fadeins fadeouts and then coding buttons to navigate from, say, frames 120-130 (resume fadeout) then go to frame 160-170 (biography fadein), then navigate to a static page. I'm not sure if this is possible, as my buttons would have to change functions each frame.
Another possible way is that currently for each button I have different layers in order to direct the button to different frames, and have placing hem in the same spot. I'm wondering if there's any way to have buttons go to separate frames on different frames, if you get what I mean (on frame 120 it'll go to 130, on frame 150 it'll go to 160 but still be the same button". Right now each button is coded with on release gotoandplay <frame>.
i am trying to to do the following. I have 2 buttons on a page.when i click the first button it should just display the image i want it to.when i click the second button it should display the other image i want to display.
im trying to make a navigation bar for my flash site. The idea is that all the content is displayed in small vertical lines, like this - and when you scroll over a line it opens out to a thumbnail. At the same time the other lines move outwards to accommodate the space taken up by the thumbnail. I wanted only the line your scrolling over to show but its kinda similar to the mac osx dock. Ive tried using examples of mac docks and none seem to do what i want them too.
I have 3 movieclips, and I want them to work like buttons. It's for a website, so they need to redirect the user to a URL.
The entire flash file has 7 layers, and one of these layers is called "AS3", and is ment for all my actionscript. So, i figured if I gave the MC's an instance name, then I could write the AS3 in the "AS3"-layer. But I can't seem to get any code to work.
I am attempting to make an interactive scenes in flash. I am going for something like this on the Breast Cancer Fund homepage. [URL] What is the easiest way to achieve this?
Is it possible to make the browsers back button work inside a SWF but using just AS3 and not any other external files or anything else changed in the HTML page?
trying to make the close button work on this homework project. This app scatters photos on the stage, randomly and at random angles. They are drag and droppable and the clicked photo comes to the fore. Each photo has a close button intended to remove the photo from the stage, this last is what won't work. I know its a common topic, but nothing I've tried has worked so far. onClickCloseBtn is the problem.
i am trying to to do the following. I have 2 buttons on a page.when i click the first button it should just display the image i want it to.when i click the second button it should display the other image i want to display.
This Message Used To Be Entitled:"Can't make music on/off button work for my movie built in CS5..."But after literally WEEKS of being on this forum (& desperately seeking the answer in numerous ways) do you mean to tell me there is ABSOLUTELY NO ONE ON THIS FORUM that knows how to make a music/sound button work correctly? [code]Perhaps it's a simple adjustment,.
I have a photographer's portfolio site in the works. I'm using loadMovie connected to thumbail buttons of each photo to show a larger version of the photo. Here is the script[code]...
Now the photographer would also like to have a next/previous arrow buttons so the user can click through like a slide show. Is there a way to have Flash know what movie is currently loaded and based on that information go to the next or previous?
I ve got a drag and drop code working, but what I really want to do is have a check answers button that tells the user, you have none correct, or two correct or all wrong... I have one target area, and 3 correct answers (out of 7) so I would like to let the user put as many ansers on the target as they want and then check if they have any correct, also a reset code would be nice to put everything back where it started... I tried to break my code up but the events then went mad, Here is what i have so far, it works instantly and lets crrect answers stay and incorrect bounce back..
stop(); yes1.visible=false; allcorrect.visible=false; doit.text="drag over the words that mean Vision";
I need the user to type something into a text block anything at all they just have to type something.If they wright something into the text block then the button should be able to play.Here is what I have but it does not work.
on(release) { if(_root.text == " ") { stop// if the text box is just a space // do nothing } else { this.gotoAndPlay("37");} }
I have a navigation bar made in flash that I placed on a dreamweaver document and I don't know how to make the links work with the flash. How can I tell the flash to go to the certain dreamweaver docs?
(as) function onLoad(){ var menu :Array = [ {label:"Home", url:"[URL]"}, {label:"News", url:"news.html"}, {label:"Sports", url:"sports.html"}, {label:"Features",url:"features.html"}, [Code] .....
I am just trying to write a small actionscript in Flash CS4 for a navigation button and I am really lost.
I turned Script Assist and can not figure out even the first line nor can I turn Script Assist off. Should I be using Script Assist and, if not, how do I deactivate it so that I can type directly into the text box?