Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash








Button Problem


I have a button in a movieclip in scene 1 and want it to go to scene 3 when hit.

I have tried:

on (release) {
_root.gotoAndPlay ("Scene 3", 1);
getURL ("http://www.hotmail.com", "_blank");
}




FlashKit > Flash Help > Flash ActionScript
Posted on: 07-15-2002, 11:22 AM


View Complete Forum Thread with Replies

Sponsored Links:

Stop Button States In Button With Animation With Button
Hello there,

I wonder if someone could help me to do this:

I have a movie clip with 3 animated buttons in it. Now I want to make the same movie clip into a button itself but I want the inside buttons not to show their over, press or hit states.

If I try and change the buttons' states this will change the originals which I don't want to do. I could replace the buttons with stills but this could be very time consuming since I have a lot of buttons in very long and complex animations. I could also duplicate the buttons and make the changes and then substitute them in the new movie, but this is also a very long process...

Is there a way to disable the buttons' state in an instance of the button as supposed to all of them when changing the master ?

Thanks a million to whoever helps.

Daniel

View Replies !    View Related
Button On Top Of A Button... Still Retain The Base Button Actions?
Hi there.... is it possible to still use the rollover / rollout buttons when a underneath another button??

I have been trying to have a slide in menu that basically slides away on rollout, but of course when you have buttons on this slide in menu, this triggers the rollout on the underlying movie or button and makes the menu dissapear.

Is there someway to avoid this or should I be using a different approach? Maybe a hit test on the mouse cursor perhaps?

Appreciate any help in advance,

Scott

View Replies !    View Related
Back Button, Next Button, Exit Button
I have created a flash MX project by linking from scene to scene. and i don't know how to apply the actionscript for the "back" button, "next" button as well as the "exit" button. for the Back and Next (just like we have in our browsers). for the "exit" button, when the user click on it, it will display a confirmation message. can someone please help me.

thank you..

View Replies !    View Related
Rollover/off Anim Control Button, Problem Adding Button Functionality
Hi, I'm really new to flash, so forgive me for sounding like an simpleton.

I'm trying to create a button that when you roll over, it grows in size and some text animates onto it. When you roll off, the anim is supposed to reverse and go back to the rest state. I've managed to get the animation to work okay, so it grows and shrinks accordinly. My problem now is, I want to make this into a functional button, ie to add a mailto: link, or a link to another frame.

Whats the best way to achieve this? I've tried to convert to a button and have the anim in all button states, but this didn't work. And a get an error when trying to add the mailto action script to the button, saying 'on release' should only be used on instanced buttons. I tried making an invisible button behind the animated on, but I loose the animation playback when rolling over the invisible button. It seems I can't do both for some reason.

I'm using this script on the first frame to control the playback of the movie. And stop on the last frame.


stop();
this.onRollOver = function() {
rewind = false;
this.play();
};
this.onRollOut = function() {
rewind = true;
};
this.onEnterFrame = function() {
if (rewind == true) {
prevFrame();
}
};

Any help would be appreciated, I've tried so many times with different approaches to no avail.

View Replies !    View Related
Display Movie-clip With Image/text/button ..when Clicked On A Button
We had generated a template.

Template has 2 area
Buttons on left and right had side area is blank

on click of button we want to display a movie-clip having image/text and buttons for nvaigation.


We found that on click we can display the movie ...it displays image text is not diapled. Also we want to display buttons on the same.

Your help is great value addtion to us.

Thanks in advance

Ramesh

View Replies !    View Related
Button Inside Button - Only Parent's OnRelease Is Called (by Player Nature)
I am sure this is the most asked question in history of Flash, but I dont happen to know how to lets say create a popup menu, which should fade away when the user moves the mouse away yet make the movieclips in the menu have their onRelease handlers called. The issue is that when the menu gets the onRollOver and onRollOut handlers required to make the fade in/out work, the hand cursor appears over the whole menu, and the movieclips it contains dont dont react on the mouse anymore - the player seems to only consider the whole menu movieclip.

Is there a workaround for this without creating own mouse event handling system with hitTest and things like this ?

Maybe the trackAsMenu is relevant here ? I am not sure how to use it either

View Replies !    View Related
Flash Button: Question Regarding "Animation In MouseOver And MouseOut On The Button.
Hello. I came across a problem while creating a flash button and I've come here to seek your help.

I am creating a Flash button where:

- MouseOver on the button will play Movie #1.
- MouseOut on the button will play Movie #2.

Now, I can do the first part without a problem because I can create Movie #1 within the "Over" section of the button. The problem is, I don't understand how to implement a method so that when MouseOut is detected, Movie #2 will play.

I don't know if you guys can understand what I mean, and I have supplied a link to the .fla file below:

button.fla

Any suggestions or help will be greatly appreciated. I am sort of a newbie to designing with Flash, and this part of working with buttons seems a bit advanced to me. Thank you. Have a nice day.

View Replies !    View Related
On Stage Pressin Button..works, Test Movie, Press Button Dosent Work
i really need some help on that, it's really annoying me, on the stage i enable simple button and simple frame actions, then i click and it goes to the specified frame, but when i go and test the movie and click on the button, it just sits there, i've tried everything, any ideas?

View Replies !    View Related
Questions Re: Button Event Code Syntax W/ Variables & Browser Back Button Programming
SHORT VERSION OF MY QUESTION
I have some variables in my movie named backMovie & backFrame, Then I have a button that I'd like to attach the following code to, but obviously I've formatted it incorrectly. Could anyone please offer me the correct syntax for using variables in these instances.

on(press){
loadMovieNum('"+backMovie+".swf',1);
}
on(release){
_level1.gotoAndPlay(backframe);
}


LONG VERSION OF MY QUESTION
I have a movie and my client has now said they cant live without the back and forward buttons on the browser working.....Grrrr

So I did some research on programming the browser back button but determined that it wasn't cross-browser friendly and therefore it was safer to try and create a back button within my movie. The problem is I am loading several multi level swf's and also am a very novice actionscripter (so I'm sure my way is the looong way)

Anyway, I managed to create several variables that change each time a different navigation element is clicked.

What I'm trying to do is reference some of these variable in the programming of my movies own 'back button'. But I don't know how the code should look. My variable names are 'backMovie' & 'backFrame'.....and I've tried variations of the following:

on(press){
loadMovieNum('"+backMovie+".swf',1);
}
on(release){
_level1.gotoAndPlay(backframe);
}


But they don't work

If it helps, I've uploaded my practice files to: http://www.lucid-life.com/back-button-workaround.zip

(It would be a bonus to learn that the actual back button of the browser could be programmed with this actionscript...but I dont think that's possible...is it? and using the anchors method with the back button woudln't work because I'm using levels...right?)

Any help or advice greatly appreciated!
Many Thanks in advance

Cheska

View Replies !    View Related
Rotating Menu/ How To Prevent Button Sound When Button Is Under Another Layer
I have a rotating menu on my site. The menu buttons have a sound effect when they are rolled over.. I have a layer overtop of the rotating menu, but the buttons still rollover (and that sets off the sound effect.) when they are hidden by the top layer. How can I prevent this? It there any _x _y actionscripting that I can do to prevent this?

Here is the site if you want to see what I'm talking about:

http://www.webraptor.com/index2.html


Thanks,

-- Jeff

View Replies !    View Related
Button: Level1 Button Tells Level2 Movie To GotoAndPlay
on (release) {
_root._level2.gotoAndPlay ("interact", "startscreen");
}
___________________________________________

What's wrong with that?

I have a button within a level 1 movie, and I want it to tell the movie on level2 to go to the 'startscreen' label within the "interact" scene.

I've tried a few variations, but nothing seems to make it work. Any ideas?

(the _root. thing was added, cause I saw everyone else using it. still doesn't work)

Thank you all for being so helpful in advance!

Tone.

View Replies !    View Related
When You Click On A Button, The Button Grows Into A Large Box With The Content Inside
How in the world are people doing that?? Hopefully you know what I mean... and example would be right here. When you click on one of those boxes, you can open the "card" and then the white box grows into a larger box with the content inside. Is there a relatively simple way to do this?

*begging*

View Replies !    View Related
Mute All Sounds Button / Resume Playing Sound Button
Hi there gang!

ok i dont know how exactly to do this..so i need some help, a fla file for this kinda thing would be super if you happen to have the solution.

Ive done about a 5 mins flash presentation with audio speak for that duration, the speak itself is cut up into about 36 seperate wav files on the timeline. ANyhow i would like a MUTE button that when click would mute the sound...BUT!

Important thing is that if the viewer decides to click it again at anytime and wants to hear the speak, it should resume from where you are currently going on the timeline..this is streaming speak which is in sync with animations.

I could use a Stop all sounds commmand but then thats not quite enough..would like to also have the option to resume speak and in sync from where you are currently..

The file is here and is almost done..exe file link:

http://www.beats.midnightsunrecordin..._LtY/LtY20.exe

Im in quite a hurry with this so if anyone has any comment please please..im crap with action script so an FLA for normal MX would be helpful..

many thanks!

cc

View Replies !    View Related
(I Guess) An Easy Button Question - How To Make A Function For A Button
Hi!

I have a little button problem. I have plenty of buttons in my presentation which should take the movie to different frame labels. But some of the buttons shouldn't be active from the beginning and they should have a different ("not active") color. Instead of setting enable = false; and color changes for every button, I tried to make a function and then call it. I put it in the first frame. It looks like this:
code:
/*** TRYING TO CALL THE FUNCTION ***/
_root.flowerButton.notActive(this._name);

/*** FUNCTION ***/
function notActive(nameofbutton) {
nameofbutton.enabled = false;
//color change...
}

I don't know if this script is alright or not, it simply doesn't work. I tried many combinations and put trace to the function, but nothing. It looks like I can't call a function for a button like this. Can anybody help me how to make it work? And I would really appreciate an explanation why this code doesn't work.
Thank you!

Poco

View Replies !    View Related
Button Problem: Animation Stops When Cursor Is Moved Off Of Button.
I have a row of buttons for my navigation bar. On the over state of each button I placed a quick movie clip. I'm trying to figure out how to get the movie clip to complete even when the cursor is moved off of the button. As it stands right now, if I move my cursor off the button the movie clip cuts out and the button returns to its original state.

Any help would be very much appreciated.

Thank you.

View Replies !    View Related
Convert Button Event Code To A Function AND 'if,then,else' Statement On A Button Even
mac os X
flash mx 2004


Hi

Can anyone please help me convert the following code from a button event into a function:


on (press) {
paypal = new LoadVars();
paypal.cmd="_cart";
paypal.item_number= myVB2;
paypal.item_name= mvVB;
paypal.upload="1";
paypal.business="ady@atinybitofgod.com";
paypal.currency_code="USD";
paypal.amount= myVB3;
//paypal.handling ="2.00";
paypal.send("https://www.paypal.com/cart/add=","_blank","post");
}



My plan is to have 5 of these (obviously named differently and with slightly diff. values for the variables) and then on a single button's (press) i will have an 'if,then,else' statement, which will call one of these 5 functions depending on the value of another variable in my movie.


is this possible??? I have been spending 2 weeks now posting on numerous threads trying to find a workaround for a different problem, with no joy..so the above is my *hopeful* solution... please ask me if i haven't explained anything clearly enough.....

Thanks so much for your time and any help you might be able to offer...

kindly with crossed fingers,

Cheska


(ps...if you want to try and help my initial problem, you can visit http://www.atinybitofgod.com/kids/paypal.html and see all my code and my swf and the rror i get from paypal when i try to send three variables that reference other variables in my movie.....BUT...since i have had no joy and think that ive tried most peoples suggestions, i'd really like to try to figure out this new 'function' and 'if then else' thing on my button...if that's even possible).

View Replies !    View Related
Button [ ] On Click Goto Frame 2 [X] Movieclip X Mark Button
Ok I have a movie clip first frame looks like this [ ] second frame looks like this [X] I want to apply action script to it that says on press goto frame 2. Then another that says if on frame 2 go back to frame 1! But I'm kind of lost here I don't how to make this happen!

View Replies !    View Related
Changing The Function Of A Button Depending On Previous Button Press
Hi all,

this problem has been stressing me out all day! (its probably extremely simple, but i can't get my head round it)

I was wondering if anyone can help me, I'm loading in 5 jpegs from an external file using "loadMovie" and i have 5 corresponding buttons (1-5) to load them with.

I want to change the jpeg the button loads in depending whether a separate navigation button has been pressed -

i.e.

navigation buttons:

-motorbike pics
-car pics
-lorry pics

If a user clicked on "car pics" then the loading buttons 1 to 5 would load "car1.jpg", "car2.jpg" and so on...

similarly if the user clicked on "lorry pics", the same loading buttons 1 to 5 would load "lorry1.jpg" and "lorry2.jpg"

any help and code snippets would be greatly appreciated!

Thankyou!

View Replies !    View Related
FLASH 8 - Toggle Button/released State/pressed Button
I have a series of buttons inside an array. I am trying to get the buttons so that once they are pressed, they remain in the over state. Which is a darker color than the up state. So that people know which button they have pressed. Is there an easy way to do this for buttons?

Please help someone,
Thanks,
M

View Replies !    View Related
Mc Instance Activated By Button How Do I Unload Mc On Click Of Another Button?
I have 4 buttons each with a mc instance attached. on release of button one it plays the movie clip - eg click "about us" button plays a movie clip to open up the company details. But when you click the 2nd button "contact us" I want the first movie to disappear(unload) and the 2nd movie clip to play.

Can anyone help?
Desperate!!!

View Replies !    View Related
Jumping To A Scene From Button In A Movie Clip Button?
I need to jump to a scene from a button inside a movie clip of ascene. Can any one please help? On the frame for the button in the movie clip I have this action script:

on (press, release) {
gotoAndPlay ("presCambells", "presCamp");
continue;
}

It works (with enable simple button action) in flash, however, when I publish and preview as a swf flash file it just shows the current scene with the movie clip looping after I click on it. Please Help.

View Replies !    View Related
MC Acts As Button, Cancels Out Button Contained In MC Aghhhhhh
There is a MC on my stage. With in that MC is a button that changes color in the OVER instance. I would like the MC on the stage, with the button in it, to load an .exe file when the mouse is released.

I am using this code for the MC to load an .exe file

on (release) {
fscommand("exec", "CEAS_ACT.exe");
}


But when I use the "on (release)" command, the OVER state no longer activates. Hence, there is no change in color when the mouse goes over the button on the MC - very frsutrating.

Can anyone throw me a bone here? This has to be ridiculously easy, and I'm looking right past it.

Thanks for your help.

View Replies !    View Related
Button._focurect Disables Also Button Keyboard Access
I'm trying to make my Flash movie keyboard-accessible.
It's a search engine control panel, with a drop list for categories, a textfield and a Search button.

I have set a "halo" effect to enhance the GUI element currently under focus, for both keyboard and mouse interaction.

Everything works fine if I leave the _focusrect active, but it's really ugly and I want to eliminate it.

Unfortunatelly when I set Button._focusrect = false, the buttons recieve focus but are not "pushed" when I press the spacebar (I tried to add Key-specific triggers to a button, but that doesn't work either).

Does anybody know how to help this?

p.s. I already set all the tabIndex stuff...

View Replies !    View Related
How To Make A Button In Flash Work As A Form Button?
I'm trying to figure out how to use a button in flash as a form button. I have all of this HTML:

<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but22.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<input type="hidden" name="add" value="1">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="julie1@juliedesigns.com">
<input type="hidden" name="item_name" value="picture">
<input type="hidden" name="item_number" value="picture1">
<input type="hidden" name="amount" value="10.00">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="lc" value="US">
</form>

And I want to be able to make button in flash be able to do what that form button would. Anyone know how to do this?

View Replies !    View Related
Making A Button Event Happen Without Click A Button
hello.

Got this script, an event happens when the user clicks
a button. The button isn't a standard movie clip button,
its a component.

No actions attached to the buttons.

There is an actions layer with the actions:

loadFeedBtn.addEventListener("click",Delegate.crea te(this,loadxml));

loadFeedBtn is the instance name of the button.

there is also:

function loadxml(p_evtObj) {
bla bla bla
}


My question, how do I make it, so that it just performs the action
that the happens when the user clicks the button, with out them clicking the button, just by them entering the frame?

Thanks

View Replies !    View Related
Switching Out A Component Button With A Custom-made Button
Hey there,

I had a programmer work up some code that would allow me to use different usernames and passwords to enter a site. This was done with .as and xml. It works beautifully. The .as is a separate file that I also upload with the swf.

The problem I'm having is that the programmer used a component button and I need to use one that I made (one that matches the rest of the site). I created a button and switched the component button out with this newly made button. But now it refuses to work! I've tried naming it exactly the same in the instance box and even in the properties box but it just will not work.

What could I be doing wrong?

View Replies !    View Related
Mute Button Not Working For Button Rollover Sounds
I got my code for a mute button from the flashkit FAQ on sound,
and it seems to be muting everything but my rollovers. Anyone have any ideas?

it mutes the sound in all levels except for the buttons in _level0
and the button itself is in _level0 ?

code: // on main timeline
globalvolume = new Sound(); // no associated movie clip.

//button to mute sound and change toggle mc frames
on(release){
if(_root.globalvolume.getVolume() > 0){
_root.globalvolume.setVolume(0); // mutes all sound
play(); //switch to mute frame
} else {
_root.globalvolume.setVolume(100); // unmutes all sound
play(); //switch to unmute frame
}
}

thanks in advance for any input

View Replies !    View Related
Recording Button Instanec Names On Button Press
Hi,

I have a number of different buttons in a scene each with different instance names. On pressing any one of these buttons the program moves to the next frame.

I need to record the instance name of the button which is pressed. Currently on each button i have code which on (release) sets a variable 'name' equal to that button instance. ie for the button whose instance name is 'james' i have:

on(release){
name = james
nextFrame()
}

I want to increase the number of buttons and do not want to have to manually write code for each button.

Is there a way in the main scene to get actionscript to find the instance name of the button which is pressed so that for any button press the name of that button can be saved?

many thanks
john

View Replies !    View Related
Button Script On Timeline Works Only When Button In Same Frame
in frame 1 i have define what btn1 shall do when clicked. this works if the button is also in frame 1.

is there a way to define btn1 in frame 1 and let the button appear for the first time in frame 3?

View Replies !    View Related
Trying To Get A Button To Play A Movie Clip After I Click The Button
trying to get a button to play a movie clip after i click the button. right now when i preview my web i have to hold the button for it to play and after i let it go it dissaperes. please help with flash mx. use to corel rave so simple but limited

View Replies !    View Related
Mute Volume Button & Start/Pause Button
Hi!

OK..I used to be "OK" at AS1 and AS2...but I haven't done Flash in 2 years. Now I've plunged myself into CS3 and AS3 and feel like I know NOTHING! And I suppose I do...I don't understand "Classes" and a lot of things.

Can someone direct me to a tutorial that teaches me how to:

1) Create a button that toggle mutes/unmutes an embedded audio (voice over) file that streams throughout the entire movie? (I need to be sure that the file syncs exactly to the animation, that's why it's embedded).

2) Create a button that simply toggles start/pause for the main movie timeline.

Thank you for ANY help you can give.

--Darcie

View Replies !    View Related
Multiple Button Instances From Single Button Symbol?
Greetings,

I would like to create a single button symbol, place multiple instances of it in a scene then change the text and target URL for each button instance. I once saw and advanced button tutorial that explained how to do this very clearly. I believe it used dynamic text inside a button symbol. Has anybody seen this tutorial? If not, is this easy to explain in a forum such as this?

Thanks!

Steve

View Replies !    View Related
Tell Flash Which Button Is The Previous Button So It Can Goes Back To Normal
i have many buttons with rollOver and rollOut states... when the user clicks on a button the button stays red.. when the user clicks another button that button stays red and the previous button goes back to normal..

well how do i tell flash which button is the previous button so it can goes back to normal as the next button clicked goes red???

please help

View Replies !    View Related
OnRelease Of Button, Is It Possible To Goto Top Of Page After Button Is Click?
I would like to know a script or what ever i can use to make it that when someone click on my button, i want it to go to the top of the page, not reload the page, just goto the top... is this possible?

View Replies !    View Related
Difference Between Button Component And Creating A New Button Type
I'm using this sample code to send/receive data when a button is clicked. It works with a Button Component but not with a button I create. Any ideas while?

Code:
var submitListener:Object = new Object();
submitListener.click = function(evt:Object) {
var result_lv:LoadVars = new LoadVars();
result_lv.onLoad = function(success:Boolean) {
if (success) {
trace("content = "+result_lv.content);
} else {
trace("Error connecting to server.");
}
};
var send_lv:LoadVars = new LoadVars();
send_lv.file = "bios.html";
send_lv.sendAndLoad("http://[url]/press/content/talk_w_flash.php", result_lv, "POST");
};
mc_menu.submit_button.addEventListener("click", submitListener);
Thanks,
Pete

View Replies !    View Related
To Click On One Button And Have This Action Initiate A Buttonclick On Another Button?
I want the user to click on one button and have this action initiate a buttonclick on another button. How would I code the first button?

Thanks ...

View Replies !    View Related
Button States - How To Keep Button On Rollover State When Clicked.
on (rollOver) {
this.btn_about.gotoAndPlay("mouseover");
setProperty(this.btn_about, _x, 25);
setProperty(this.btn_about, _y, 29);
}
on (rollOut) {
this.btn_about.gotoAndPlay("mouseout");
}

on(release){
_parent.gotoAndStop("about");
}

There's my button code. Now a rundown on my delima.

I have a movie "company.swf" that is loaded into an empty MC "content" that is located within my main movie "main.swf". My buttons are all located inside an MC "subnav" inside of company.swf. I have seperate MC's for each button with an actual button with just a "hit" area. I would like each button to stay in the rollover state when clicked so a user knows where they are in each section. I hope I'm being clear here. My rollover and rollout works fine.

Please help!! Thanks

View Replies !    View Related
Movie Clip Within Button - How Do You Disable Down State Of Button?
Hi - I have created a menu down the side of my flash site which is in the form of a button so that when the user rolls over the button, it brings up the menu. Within, this button is just text - the names for each page the user can select to go to (text is within movie clips so I can add actionscript to them).

However, I want to add on (press) {gotoAndPlay("home",1); } etc for each movie clip within this button but when i test the site, this code does not work as the buttons down state has priority over the movie clips within it.

Is there some actionscript code which could disable the down state of a button? (as i only need the button as a rollover anyway and i need the movie clips within the button to have priority in terms of actionscript for linkage etc)

Thanks

View Replies !    View Related
Paypal Button Code Works Fine For One Button But Not Another
Hey there, I have a paypal btn with this code on it:

on(release){
mylv = new LoadVars();
mylv.cmd = '_s-xclick';
mylv.encrypted = '-----BEGIN PKCS7-----MIIH0QYJKoZIhvcNAQcEoIIHwjCCB74CAQExggEwMIIBLAIBAD CBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYD VQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW 5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2 ==-----END PKCS7-----';
mylv.send('https://www.paypal.com/cgi-bin/webscr', 'POST');
}

(i took a few characters out of the encrypted string--just in case and to shorten the post)
This button works fine.

Now, I need a second button for a different item.
So, I went on to paypal last night and generated a "buy now button" several different times. Copied and pasted the encrypted string where the old one is. When I have the site live and click on the new button it takes me to a paypal pages that says "We were unable to decrypt the certificate id."

Any one have this issue before? And does anyone have any idea of how to correct it?

Thank you in advanced,
hutch

View Replies !    View Related
Rollover Button To Be Triggered By Area Smaller Than Button
I'm pretty new at Flash. I am creating a flash file to insert into a PowerPoint, since PP has no way to really use mouseovers. This is my first project, but I'm going to want to do a lot with this technique in the future.

I have an image of the toolbar of our software and images (transparent pngs) of the tooltips with arrows that will point to the icon.

I can make a roll-over button that only appears when the user rolls over the icon, but the tooltip text is wider than the icon that triggers it, so the buttons I'm creating overlap.

So I want the area that triggers the roll-over effect to be smaller than the button. Or is there a better way to accomplish this task?

Thanks for any advice!

View Replies !    View Related
OnRelease Of Button, Is It Possible To Goto Top Of Page After Button Is Click?
I would like to know a script or what ever i can use to make it that when someone click on my button, i want it to go to the top of the page, not reload the page, just goto the top... is this possible?

View Replies !    View Related
New Button Doesn't Stop Previous Button Videoplayback.
Hello.

I'm very new to ActionScript, just trying to put a simple portfolio site of mine and don't have enough time to dig flash properly. My site contains buttons, which after click go to given frame in the time line and display videoplayer. Autoplay is false, but when you hit play on the player and the video rolls with audio and then when you don't press stop just another button (all buttons are visible all the time on the stage) it gives another frame and another video player with different content, but the previous audio is still playing! I don't know how to fix it fast and in least complicated way.

ActionScript for button:

this.buttonname_btn.addEventListener(MouseEvent.CLICK, clickListener0);
function clickListener0(event:MouseEvent):void {
gotoAndPlay("framename");
}

And at given frame is a keyframe with videoplayer, and frame after it is actionscript saying gotoAndPlay("previousframe"), so multiple button click doesn't goes to next keyframe with another player.

In short: i need to stop all ongoing playback after button click, but still be able to press play on the player and get content.

Thank you in advance for your help.

View Replies !    View Related
Pass Button Instance Name To A Function When Button Is In ScrollPane?
I have a ScrollPane component which holds a movieclip from my library. I am trying to set up a funtion to read the movieclip.button instance name when I click a button. On a trace, all I receive is "spContentHolder."

How can I capture the button instance name when the button resides inside the scroll pane?

Thanks.

View Replies !    View Related
Text Field Over Button Prevents Button Being Clicked
I'm trying to create a custom button class that lets you specify some simple parameters, including the text that goes on the button. However, the text field blocks the button (because it's on top of the button), and so the even listener assigned to the button doesn't detect a CLICK event.

I've read about setting mouseChildren = true, but that works for other display objects and isn't an option for a TextField instance.

Can anybody tell me what I'm missing here. And also, is there a different way of going about having some sort of customizable button that might be better?

If it helps, here is my basic class. An instance of the class is instantiated with:

var btn:ButtonSimpleText = new ButtonSimpleText(120, 20, "Button Label");
addChild(btn);

CLASS BELOW










Attach Code

package {
import flash.display.*;
import flash.events.*;
import flash.text.*;

public class ButtonSimpleText extends Sprite {
public function ButtonSimpleText(w:Number, h:Number, labelText:String){
// Button
var button:SimpleButton = new SimpleButton();

var up:Shape = new Shape()
up.graphics.lineStyle(0,0xFFFFFF,1);
up.graphics.beginFill(0xCC0000);
up.graphics.drawRect(0,0,w,h);
up.graphics.endFill();

button.upState = up;
button.overState = up;
button.downState = up;
button.hitTestState = up;
button.addEventListener(MouseEvent.CLICK, clickListener);

// Text format
var tf:TextFormat = new TextFormat();
tf.font = "Arial";
tf.size = 12;
tf.bold = true;
tf.align = TextFormatAlign.CENTER;
tf.color = 0xFFFFFF;

// Text label
var label_txt:TextField = new TextField();
label_txt.selectable = false;
label_txt.text = labelText;
label_txt.width = w;
label_txt.setTextFormat(tf);

var btnHolder:Sprite = new Sprite();

btnHolder.addChild(button);
btnHolder.addChild(label_txt);

addChild(btnHolder);
}

private function clickListener (e:MouseEvent):void{
trace ("Click");
}

}
}

View Replies !    View Related
Make Button Work Only If A Radio Button Chosen?
Hi I hope you can help. I have a series of questions on different key frames. You advance by pressing a button. But I would like to make it that you need to attempt to answer and choose an answer from a radio button before the button allows you to move on. I could use a dynamx text box to produce feedback saying you must choose an answer. Could anyone help me with the code I would need to put on?
stockdill

View Replies !    View Related
Button Question: Image Effect After Mouse Is Off The Button
I searched everywhere on the forum but I guess this is a basic question regarding the mouse effect.

I have no problem creating menus and buttons to do effects with mouse over and mouse down. But the question is, how do you keep the effect from NOT getting cut off when the mouse is rolled over to another button.

If you take a look at http://www.team3d.net for a button example, when the mouse is rolled off the button, the button smoothly goes back. I still don't get how you do this. Is it done with an ActionScript or can it be done by just a movie clip?

Please help! Thanks in advance...

View Replies !    View Related
Navigation Trouble, Using Button Rollover, Rollout And Button Down
Hello all

Take a look at the following sites; and notice their menus. Both have a rollover and rollout on their buttons, and when the button is hit the button stays down until another button is pressed. In the scissor sisters site, the neon bar still fades out after another has been pressed.

Franz Ferdinand
Scissor Sisters

I am trying to achieve this myself with my own site, which you can view in progess here:

My Site

I have mastered the button rollOver and rollOut effect, in which i gathered the code from a kirupa tutorial. My problem is, getting the neon bar to stay underneath teh last button that has been pressed.

The main movie is located on the main timeline in frame 2, because frame 1 contains the pre loader.

The actions for frame 2 of the main timeline are:


Code:
stop();
movieLoader.loadMovie("news.swf");
total = movieLoader.getBytesTotal();
loads = movieLoader.getBytesLoaded();
percent1 = Math.round(loads/total*100);
movieLoadText.text = "Loading news "+percent1+"%";
if (loads != total) {
} else {
movieLoadText._visible = false;
}
Now the buttons are not buttons, they are movieclips, which are located on the stage, and have instance names of b1 for news, b2 for biography etc etc

Inside the movieclip, the animation of the neon bar fading in takes 25 frames, and this has a stop action on the end.

This code is placed on the first frame:


Code:
stop();

news.onEnterFrame = function(){

if(rewind == true)
{
prevFrame();
}

}




news.onRollOver = function(){

rewind = false;
gotoAndPlay(25);

}

news.onRollOut = function(){

rewind = true;

}

news.onRelease = function(){
_root.logo.gotoAndPlay("buzz");
_root.movieLoader.loadMovie("news.swf");

}
As you have probably noticed this is the same as the kirupa tutorial.

So now my problem is to make sure that the last button clicked leaves the underline bar down until the next button is pressed.

Whoever can solve this for me is a life saviour!

Thanks

Williby

View Replies !    View Related
Button Inside Complex Button RollOut/RollOver
I created a movieclip from the tutorial "Complex Button RollOut/RollOver Effects" which I want to use as a menu. Is it possible to add buttons inside this movieclip??? I try and try but the buttons are never recognized, only the movieclip can be pressed.

View Replies !    View Related
Switching Out A Component Button With A Custom-made Button
Hey there,

I had a programmer work up some code that would allow me to use different usernames and passwords to enter a site. This was done with .as and xml. It works beautifully. The .as is a separate file that I also upload with the swf.

The problem I'm having is that the programmer used a component button and I need to use one that I made (one that matches the rest of the site). I created a button and switched the component button out with this newly made button. But now it refuses to work! I've tried naming it exactly the same in the instance box and even in the properties box but it just will not work.

What could I be doing wrong?

View Replies !    View Related
Switching Out A Component Button With A Custom-made Button
Hey there,

I had a programmer work up some code that would allow me to use different usernames and passwords to enter a site. This was done with .as and xml. It works beautifully. The .as is a separate file that I also upload with the swf.

The problem I'm having is that the programmer used a component button and I need to use one that I made (one that matches the rest of the site). I created a button and switched the component button out with this newly made button. But now it refuses to work! I've tried naming it exactly the same in the instance box and even in the properties box but it just will not work.

What could I be doing wrong?

View Replies !    View Related
Movie Clip Button Doesn't Let Button Change
if i have a btn inside a mc, and i want the btn to change colors in rollover but the movie clip on top does not let it. what can i do?


thanks gneius people

View Replies !    View Related
How Can I Make My Button Revert Back When Another Button Is Chosen?
http://filebox.vt.edu/users/gyanez/f.../main_menu.fla
http://filebox.vt.edu/users/gyanez/f.../main_menu.swf


I am creating the navigation bar for my first Flash site. This is what I want to have happen:

When user first enters site the "home" button is already highlighted and disabled since this is the first page user sees. When the user rolls over another menu item that item gets highlighted while previous button choice remains highlighted too..BUT when user clicks the new menu chocie the previous highlighted menu choice should revert back to its other state since the user is now on a new part of the site.

I cant seem to get this done with what I currently have...looks like buttons dont have hierarchy so I cant tell it to do something like: HB.HB_up_mc.gotoAndPlay(2);

Any help would be appreciated.

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved