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








Button Trouble


Before you disregard this post let me say this...
I have looked through these forums AND the macromedia site forums and couldn't find what I was looking for. Even before this I spent a while doing my best to follow Flash's help resourse.

I would like to create a flash button -- not something super complex, but not as simple as a up/down/over thing. Something closer to what I've seen around where when you hover it doens't just display a different frame but instead loops a number of frames.
The Flash help files are terrible. I got Flash MX 2004 (after using 2003 for a while) and the help files are nothing compared to 2003's.
I did my best to follow the tutorial that Flash sent me through but it never actually told me how to create a button in the first place -- assumed I knew that or something.
Any help would be great.

Oh, and how far I've gotten--
Control >> Enable simple buttons (on)
And I can drag the "Button" from the "Components" list over.
Past that (attaching multiple frame actions for each up/down/over set) I can't figure out.




FlashKit > Flash Help > Flash General Help
Posted on: 01-15-2004, 01:38 AM


View Complete Forum Thread with Replies

Sponsored Links:

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
Having Trouble Controlling Mc Button Within Mc Button
Based on Lee's tutorial for creating mc buttons, I'm having a problem creating an MC button and I'm sure it's just a matter of me putting my code in the wrong place or something.

Say I have a mc called "wheel" and in the root timeline, on rollover wheel goes to and plays (2) (animation) and stops on 5.

etc...just like Lee's tutorial. works fine.

INSIDE the wheel MC say I have a button on one of the spokes called homeBtn. It has it's own timeline that I want to animate when you mouse over it

Question is, where do I put the AS for that, on the root, or in the wheel movie clip? I've tried putting it in a few places and it's not calling at all. The wheel works fine, but when I mouse over the home mc it does not gotoAndPlay(2); no matter where I've put the script. Maybe I'm calling it wrong?

wheel.homeBtn.onRollOver = homeOver;

function homeOver() {
wheel.homeBtn.gotoAndPlay(2);
}

http://www.angyl.net/ELD

View Replies !    View Related
BUTTON TROUBLE
I have a movie in the "over" and in the "down" frames of a button (two different movies). When you click the button it plays the "down" movie like it should but then it plays the "over" movie again on release. How do I remedy this.

View Replies !    View Related
<<button Trouble>>
i have 5 scenes or so in my movie and i have the buttons for each of them. Now on the stage i right clikc on the button and add the script on release gotoand play then i put in my scene Home and put frame 2. but when i play the movie and click the home button it just replays the menu loading action and the rest doesnt restart. And when i add the script for the info section and when i click on it, it should bring me to a blank scene but it does nothing except replay the menu loading action. WHY?!


thanks for any help

nigel

View Replies !    View Related
Button Trouble
I'v been having recent troubles with flash button's i made a flash toolbar for my site and i cant seem to get the action script right to work with my frames page when you click on the button it goes to the link but not at the bottom page ware it is suppose to in frames pages. Please help me.

View Replies !    View Related
Help Me, Button Trouble
Im trying to make this button to open a new Url but
it writes the url and doesnot erases the actual url
check the example below:

http://www.mai.shiranui.freeservers....om/SeleccionFa

this is what i get.
what can i do ?

if u dont understand my problem u can see it here:
http://www.mai.shiranui.freeservers.com

View Replies !    View Related
Button Trouble....
Hi All,

I have a generic button MC doing the following for all navigation buttons:

on (rollOver) {
gotoAndPlay(2);
}
on (rollOut) {
gotoAndPlay(6);
}


This action script works fine to give it a nice rollover/out effect


Q:
What action do i need at instance level for 'onrelease' to load a new MC into a MC container??? I need actionscript that i can add to any instance of the above button so i can use just one button for whole site!

Cheers for all your help!!!

View Replies !    View Related
Button Trouble
I was wondering whether I could open a .pdf file from a flash movie with out it starting up an internet browser, or even dialing out. I want it going straight to A.Reader.
I'm only very new to Flash, so be nice when explaining

View Replies !    View Related
Button Trouble
hello all,

i have my main movie,
i load an external .swf on the release of a button,
that works fine.
then from that external .swf,
i try and load another external .swf.
i will not work.
it loads a black screen instead of my movie.
any ideas...?

here is the code i use.

main movie:

on(release){
loadMovieNum("moviename.swf",1);
}

external .swf:

on(release){
loadMovieNum("movie2name",2);
}

View Replies !    View Related
Button Trouble
I get this message everytime I create a projector:

"Scene=interface, Layer=Layer 33, Frame=360: Line 1: Mouse events are permitted only for button instances
on (release)"

This is the actionscript I have on frame 360:

on (release)
{
loadMovieNum("file.swf",1);
}

I do not understand. What am I doing wrong. Thanks!

View Replies !    View Related
Button Trouble..
im having trouble with an animated button i made, the way i constructed it was have a movie clip in it have an invisible button that tells it what frames to go to on rollOver and rollOut. the problem is i cant find a way to get the buttons to tell the main movie to go to a certain frame when they click. help !

View Replies !    View Related
BUTTON TROUBLE - Please Help An Old Man
Hi people, I'm having trouble with my first attempt at flash.
I am converting a book to a website/presentation. It consists of a chapter menu page/scene with eight button links (containing three .png files in each) to individual chapters. On the individual chapter pages I have the same buttons (slightly smaller) with the links slightly altered (for eg: if you are already on chapter 3 and you click the chapter3 button at the top of the page it takes you to the main chapter select page).

I have only completed the first four chapters. Just the animation only (about 5 seconds) with no text or gallery pics just a jpg bg, a transparent bitmap (converted to symbol for textbox bg) and the buttons and links. When I go to test my movie the first three chapter links work, I go to click on chapter 4 and then the links stop working, as if the page is froze, now no links work at all. I have checked all my links actions and they say they are still there. I have used the same button symbols for all my menu buttons, and used tweening on them (size, motion, transparency option)
All my chapters/scenes are contained within one movie file, there will be about about 12 scenes in total when it is finished, I would expect the site to contain a lot of text (scrolling) with many images to display also. To try and organise I have made numerous folders in the library to colate all the various chapter files.

I would be very grateful to any flash veterans who can help me solve this problem, I am determined to master this application, I just love the versatility to express your ideas into workable creative design.

KAIN

View Replies !    View Related
Button Trouble
i just recently upgraded from flash 5 to flash mx
now whenever i make a button to get the text to change color it has to be directly over the text and on flash 5 it could have been any part of the button
so i thought i would get the bright idea and mask over the text with a box with a complete alpha fade but now there a very thin line at the edge of the box that will make it roll over

any of you more seasoned mx users know what is going on and how can i fix this
well i could fix it by making the entire button a graphic in photoshop but i mean fix it inside flash mx

View Replies !    View Related
Button Trouble
i have 2 frames and 2 buttons. i want 1 button to go to the first frame and the 2nd button to go to the second frame. souds simple but what i tried didnt work. what action scrips do i use?

View Replies !    View Related
Button Trouble
here is my dilemma I have a navigation with buttons ,lots of 'em, I have a little banner animation that flies out when you rollover each button with a description of what each one is. Now if you rollout the animation goes back to the beginning. so

on rollover=banner slides out
on rollout= banner slides back from where it came.

now if you rollover too fast the banner will get stuck.
I was thinking of putting a variable on the buttons to see if they in fact are being moused over currently but if the mouse goes by too quickly it will still be thinking that the mouse is over it and thus the variable will be true as well,even though the mouse is not actually over the button

Please help!!!!
here's the flash

View Replies !    View Related
Button Trouble
For some reason i cannot get my buttons to work correctly on my site. the actions they have on them are as follows :
on (rollOver) {
gotoAndPlay(2);
}
on (rollOut) {
gotoAndPlay(11);
}
on (release) {
getURL(contact.html);
}


I cannot get them to open up the next html. like if i open the index i cant get it to open up another page. please help me ive been up for 28 hours tryin to get this site done. thanks

View Replies !    View Related
Button Trouble
hi people, hope you can help me out here!

I have a load of buttons on one side of the screen and would like them to load .swf files onto the other side when clicked (which i have in the libary) i have managed to do it on rollover, but of course as soon as you move off the button, the swf vanishes. can any 1 help me out here?

thanks in advance,

Andy.

View Replies !    View Related
Button Trouble
Is it possible to click and hold a button but have it continuously be clicking as if i'm clicking it one at a time?

View Replies !    View Related
Trouble With Button
I having trouble with this movie clip/button.
The button is in the movie clip. I just want to click and go to a different scene.

I simply tried goto > scenre.
Will not work.

Thanks.


http://www.justinnguyen.com/site/

View Replies !    View Related
Button Trouble
I'm only an artist and really have no idea about AS. I need some help with buttons. I have a button that I've made the 4 states for, but when I export the movie to test it, the button doesn't work. Also how do I get a button to got to a certain frame after release. Thank you for any help! Cheers

View Replies !    View Related
Button Trouble.
I'm having trouble with a button on my flash. It keeps blinking

FLASH FILE HERE


That is where my flash is. if you hover your mouse over the top left. a bar comes out... i placed a link on the blue "BLOG" icon. but when u hover your mouse over the blog. it begins to blink and it is not clickable.
PLEASE HELP



HERe is my .FLA file: CLICK HERE

View Replies !    View Related
Button Trouble
Hi All,

I’m in need of some help with the buttons on the menu bar for my site. I have created the whole site in flash and a have a bar of icons which navigates people to some examples of my work. I created the menu using the tutorial on this site called ‘Creating a MAC OS X - Like Menu’. The tutorial was excellent and I was able to take the principle and apply it to my site. The only problem is that I can’t get the buttons which are in a movie clip to link.

I have tried embedding a simple button (with the actions to link it) in a blank movie clip as a test and I couldn’t get this to work either. So I must be putting the actions in the wrong place (?). They are in the button instance in the movie clip and I’m just using the - on (release) gotoandplay etc commands.

Has anyone got any advice to help solve this problem?

Cheers

Ollie

View Replies !    View Related
Trouble With My Button
I made a button and nested a movie clip in the over frame, then I copied the frames and reversed them.
The whole animation is 2 seconds long.

I want the animation to stop at the 1 second mark (Frame 20) and then onRollOut play the rest. I'm just not sure how to do that.

http://manfromjapanx.tripod.com/button2.swf

Any help is greatly appreciated.

Still a flash noob here

Thanks

View Replies !    View Related
Button Trouble
Ok Fellows,
I was hoping that you all can help me out here. I had created thi button and it is in a movie clip. but when I try to point to another movie clip on the main scene it doesent work I will give you an example of what i am doing.
(incide a movie clip) on (press) {
myMovieClip_mc.loadMovie("thumbnail/1.jpg");
}
Now keep in mind that the button in in a movie clip time line not on the main time line, If i put this button on the main time it would work. My questtion is How can i link that movie clip wish is on the main timeline to a button that is in a movie clip?
your advice will be much appreciated

Ohh! one other thing. the other actionscirpt that I am using is this:

(in a movie clip) on (press) {
loadmovie("thumbnails/1.jpg","myClip_mc");
}

View Replies !    View Related
Button Trouble
go here and roll over the light on the left. Notice that if you roll over it too fast then the button gets "stuck" I've had this problem before but I dont know what the fix is. My .fla is attached if you need it
Thanks so much

View Replies !    View Related
[F8] Button Trouble
hi all,

i'm trying to create a password working with a button
that when clicked goes to a different directory of my site.

eg. if the password typed is fish
when the button is clicked it goes to http://www.mysite.co.uk/fish/

at present i have a input text box with a 'var' of 'password'

and actionscript on the button

on (release) {
getURL(http://www.mysite.co.uk/,"+ password +", _blank);
}


but this is not working :-(
any ideas, i'm stumped :-)

View Replies !    View Related
Button Trouble
I was wondering if someone could tell me how to properly set a button so that when it's clicked an instance of an image or movie loop plays and stays on screen. I've tried to figure it out myself but the most I can get is for the image to show up when the button is clicked, but as soon as the button is released it disappears. I also need to make it so that the instance can appear more than once at the same time if the button is clicked a second time, a third time, etc.

I also need to trigger multiple instances at the same time when the button is clicked. And if it's not possible to do that or to duplicate the instance as the button is continuously pressed, should I just make multiple buttons for multiple instances or what?

Any help would be much appreciated,
Thank you,
Art

View Replies !    View Related
[F8] Button Trouble
I am doing a flash portfolio, and I need a button to load a pdf file in a new window when pressed. Any help would be appreciated. Thanks

View Replies !    View Related
Button Trouble
I am doing a flash portfolio, and I need a button to load a pdf file in a new window when pressed. Any help would be appreciated. Thanks

View Replies !    View Related
URL Button Trouble
Hey guys, this is probably something very simple to fix however I am a dummy with action scripting. My button is a continuous rollover button, the actionscript is great however the tutorial that provided the code did not state how or where to put on(release) getURL function so the button just has the rollover code at the moment.

onClipEvent (enterFrame) {
if (go) {
nextFrame();
} else {
prevFrame();
}
}
onClipEvent (load) {
var go;
stop();
enter_btn.onRollOver = function() {
go = true;
};
enter_btn.onRollOut = function() {
go = false;
};
}

What and where would I add the getURL?

View Replies !    View Related
Button Trouble
Hello,
I am working on movie player in Flash MX which has 5 time control buttons at the bottom. I don't really know Flash that well, yet I have been charged with finishing this project. Two of the buttons work fine and are finished, the other three, however, do not:

1)Play/pause button: The play function works, but I need it to turn into a pause button while the movie is playing, and also have the graphic change to a pause button.

2)Scrub buttons: I can't get them to work at all. Basically, I am trying to get a function close to "while mousedown,prevFrame();". The other one just needs to be the polar opposite.

Any help would be greatly appreciated as I am very stuck. If I need to provide more information, please let me know.

Thanks,
J

View Replies !    View Related
Button Trouble
Hi
Im new to action script and I need a bit of help
I need to know how to make a button play an animation on rollover and rollout
for example I put the mouse over the button the buttons animation plays
and the animation stops at a certain frame(I can do this one with a movie clip in the button)
and when I put the mouse away the button plays an animation that brings the button to its previous appearence (cant do this one)

and if I put the mouse over the button and move it away before the animation ends
it keeps playing untill it ends and then plays the rollout animation

I think you guys get the picture
so how do i do it?
also I want to know how they made seperate animations connected to buttons at homestarrunner.com
thank you!

View Replies !    View Related
Button Trouble
Hi All,

I';m pretty new at this and have managed to get my buttons to control the timeline but I'm running into a snag.
If I press a butoon, after it takes me to the desired frame (page), if I clisk on the same button it advances to the next frame... hence the next page.

This is the code I have been using:


ActionScript Code:
import flash.display.MovieClip;
import flash.events.IEventDispatcher;
stop();
thebutton.addEventListener(MouseEvent.MOUSE_DOWN,gotoframe32);
function gotoframe32(event:MouseEvent):void {
    gotoAndPlay(32)
}


Thanks!

I can post an swf if it helps.

View Replies !    View Related
[CS3] Button Trouble
I am having trouble with my buttons, they work perfectly, do what they are supposed to do. I am using this code for my buttons:


Code:
choco1.visited = false;
choco1.onRollOver = function()
{
this.gotoAndStop("over");
}
choco1.onRollOut= function()
{
if(this.visited) this.gotoAndStop("visited");
else this.gotoAndStop("up");
}
choco1.onRelease= function()
{
this.gotoAndStop("over");
this.visited = true;
}
choco1.onPress= function()
{
this.gotoAndStop("down");
gotoAndPlay('1');
}

//-----------------------------------------------------

choco2.visited = false;
choco2.onRollOver = function()
{
this.gotoAndStop("over");
}
choco2.onRollOut= function()
{
if(this.visited) this.gotoAndStop("visited");
else this.gotoAndStop("up");
}
choco2.onRelease= function()
{
this.gotoAndStop("over");
this.visited = true;
}
choco2.onPress= function()
{
this.gotoAndStop("down");
gotoAndPlay('2');
}
....
When you click on the movie clip it goes to another frame and an animation plays:

THE PROBLEM: When it goes to the animation frame after clicking the button, you are still able to click the button even though the buttons are behind the animation that is playing...how would i go about disabling the buttons while it is on the animation frame but also keep the visited state of the button clicked?

Thank You.

View Replies !    View Related
Button Trouble & Getting .Key Help
First, I'm a flash newbie, and am attempting to make a 2d golf game.(not mini golf)
I know a bit about programing, but only in Java. I have run into two problems while writing the code, and would appreciate help. BTW eveything compiles so the problem isn't syntax...
First I want to give you my setup, incase the problem is there.

ActionScript Code:
//initialize the movie clips
_root.createEmptyMovieClip("empty", 10);
_root.attachMovie("frame", "frame", 1000, {_x:275, _y:200});
_root.attachMovie("powerBar", "powerBar", 2000, {_x:68, _y:335});
_root.attachMovie("clubChanger", "clubChanger", 3000, {_x:90, _y:315});
_root.attachMovie("level1", "level1", 3500, {_x:275, _y:176});
_root.attachMovie("ball", "ball", 4000, {_x:-100, _y:-100});
//-----------------------------------------
//initialize the variables
//I read somewhere lining up the variables like this makes flash load faster...
hit=contact=false;
power=accuracy=clubType=ballType=cFrame=0;
buffer = 2;
you can ignore the irrelevant stuff.

The first (and I think easier) is trouble with getting buttons to work...

ActionScript Code:
//this changes the club
clubChanger.clubUp.onRelease = function() {
    if (clubType<13) {
        ++clubType;
    } else {
        clubType = 0;
    }
    clubChanger.goToAndStop(clubType*3+1);
}
clubChanger.clubDown.onRelease = function() {
    if (clubType>0) {
        --clubType;
    } else {
        clubType = 13;
    }
    clubChanger.goToAndStop(clubType*3+1);
}
//this returns the power for the clubs
clubVX = -(clubType-20);
clubVY = clubType+7;
clubChanger is a movie clip, and clubUp and clubDown are buttons on the clip
I want pressing the buttons to go to a certain frame within ClubChanger, by changing the club type. I thought this code would work, but

My other problem, which I am completely stuck on is the power bar.

ActionScript Code:
function powerControl() {
    if (Key.isDown(Key.SPACE)) {
        powerBar.gotoAndPlay(2);
    }
    if (!Key.isToggled(Key.SPACE)) {
        cFrame = powerBar._currentframe;
        powerBar.Stop();
        if (cFrame>45) {
            power = (90-cFrame)/2;
        } else {
            power = cFrame/2;
        }
    }
}
powerBar is a movieClip with stop(); on the first frame, and I want this function to start playing when space is tapped, stop when space is tapped again, then set the variable power to the frame it stopped on /2 (or if the bar is on its way back down to the difference in the total frames(90) and the current frame);

Thank You
NickYC

View Replies !    View Related
Button Trouble
Hey,
Pretty new to flash but I'm getting there, Just a quick question for a problem I'm Stuck On.
I Want to make a Portfolio in flash for a project I've been given. I've made the menu and the buttons but i need to be able to click the buttons to take you to different frames with the different pages on. I'm stuck on the script for how to do this though. Can anyone help please?
Thank You,
Paul

View Replies !    View Related
Button Trouble
hi again everyone.....
I was wondering if someone would be able to help me to get my buttons to work. I'm thinking I'm just not scripting them right but I'm also alittle confused as to how to get the loaded actions to play where I want them to. If one of the wonderful masters here would pm me, I'll send the fla document for them to look at. All I need is someone to set the About button for me and I think I can find what bonehead thing I've done or haven't done after that.

Please, please, please????????

View Replies !    View Related
Having Trouble With Button
im having trouble linking a button thats on a child scene and have it show on the parent scene in place of the present child scene that the button is on ex go to my site http://www.nightspotz.com and hit the read more link in the welcome section......please help and show the action script please.....and example if anyone has one

View Replies !    View Related
Please Help Button Trouble
Hello anyone who's reading this: I have created a very long Flash animation including a drop-down menu which is a movie clip. Of course, as a drop-down menu, it includes a series of buttons. The frames that I'm trying to make the buttons link to are outside of the movie clip, and I've been trying and trying to make it link, but it won't (I've even tried putting the frame inside of the movie clip). Can someone please lend a helping hand and tell me what's wrong?

Thanks

View Replies !    View Related
Button Trouble
Hello. Before i ask my question i would really like to say that this is a great place to learn new things and exchange ideas with great people. I really apreciate the effort that goes in keeping this place going.

now to the question...

I have a map of a town with a button for every block in the town. there are about 150 buttons in all. the have the sabe behaviour when you hover over them(they turn green and display a comment)

I got the file from a friend and he chose to ahnd code each button this way...

Code:
_root.asanorte.quadras200n.mc202n.btn202n.onRollOver = function () {
mostracaption (" 202 norte ");
_root.asanorte.quadras200n.mc202n.gotoAndStop(2);
}
_root.asanorte.quadras200n.mc202n.btn202n.onRollOut = function () {
escondecaption ();
_root.asanorte.quadras200n.mc202n.gotoAndStop(1);
}

_root.asanorte.quadras200n.mc203n.btn203n.onRollOver = function () {
_root.asanorte.quadras200n.mc203n.gotoAndStop(2);
mostracaption (" 203 norte ");
}
_root.asanorte.quadras200n.mc203n.btn203n.onRollOut = function () {
_root.asanorte.quadras200n.mc203n.gotoAndStop(1);
escondecaption ();
}

_root.asanorte.quadras200n.mc204n.btn204n.onRollOver = function () {
_root.asanorte.quadras200n.mc204n.gotoAndStop(2);
mostracaption (" 204 norte ");
}
_root.asanorte.quadras200n.mc204n.btn204n.onRollOut = function () {
_root.asanorte.quadras200n.mc204n.gotoAndStop(1);
escondecaption ();
}
.......
.......
.......
it goes on like this for the rest of the buttons
I saw that this is not very practical so I did the following to reduce the code

Code:
var squad:Number;
var quad:Number;

for(squad=100; squad <=700; squad+=100){
//trace("Quadra "+ squad + " norte");

for(quad=2; quad <=16; quad++){
var msgLabel:Array;
msgLabel = [((squad+quad)+" norte")];
//trace(msgLabel);
//trace("asanorte.quadras"+squad+"n.mc"+(squad+quad)+"n.btn"+(squad+quad)+"n");
//asaNorte
_root["asanorte"]["quadras"+squad+"n"]["mc"+(squad+quad)+"n"]["btn"+(squad+quad)+"n"].onRollOver = function () {
mostracaption (msgLabel);
_root["asanorte"]["quadras"+squad+"n"]["mc"+(squad+quad)+"n"]["btn"+(squad+quad)+"n"].gotoAndStop(2);
trace("colorChange");
};//endRollOver

_root["asanorte"]["quadras"+squad+"n"]["mc"+(squad+quad)+"n"]["btn"+(squad+quad)+"n"].onRollOut = function () {
escondecaption ();
_root["asanorte"]["quadras"+squad+"n"]["mc"+(squad+quad)+"n"]["btn"+(squad+quad)+"n"].gotoAndStop(1);
};//endRollOver

//asaSul
_root["asasul"]["quadras"+squad+"s"]["mc"+(squad+quad)+"s"]["btn"+(squad+quad)+"s"].onRollOver = function () {
mostracaption (msgLabel);
_root["asasul"]["quadras"+squad+"s"]["mc"+(squad+quad)+"s"]["btn"+(squad+quad)+"s"].gotoAndStop(2);
};//endRollOver

_root["asasul"]["quadras"+squad+"s"]["mc"+(squad+quad)+"s"]["btn"+(squad+quad)+"s"].onRollOut = function () {
escondecaption ();
_root["asasul"]["quadras"+squad+"s"]["mc"+(squad+quad)+"s"]["btn"+(squad+quad)+"s"].gotoAndStop(1);
};//endRollOver
};//endFor
};//endFor
the result is that the labels appear but i can't seem to get the gotoAndStop() to work
I tried doing it with a with(){} statemente but had no luck onRollover and onRollOut did not work.

any ideas on how this can be implemented in a better way?
thanks in advance

View Replies !    View Related
Button Trouble
Anyone know how to carry a button through different scenes.

for example. If the user clicks a button i want it to show up i a certain place of the scene and stay there for the rest of the scene. If however the user chooses a different button i want this new button to showup in the same place as the first button.

I guess it would be something like a dynamic button...any ideas how??

View Replies !    View Related
Button Trouble
ok... now that we've got the array's figured out im having troubles with buttons
basically all i want is for a movieclip called "slider" to move and adjust its length when i roll over a button called videobtn... here is what i have so far... again, thanks for your help


ActionScript Code:
function moveSlider(xpos:Number, sliderwidth:Number) {    var xPosT:Tween = new Tween(slider, "x", Regular.easeOut, slider.x, xpos, 2, true);    var wPosT:Tween = new Tween(slider, "width", Regular.easeOut, slider.width, sliderwidth, 2, true);}videobtn.buttonMode = true;videobtn.addEventListener(MouseEvent.ROLL_OVER, mouseOverVideo);       function mouseOverVideo(event:MouseEvent):void {        trace("videobtnselected");        moveSlider(12,36);    }

View Replies !    View Related
Button Trouble - Everything Looks Right
AHHHHR! dont know why there is a problem here. It seems to be perfect. What am I doing wrong here????????

TS

please have a look at the file

View Replies !    View Related
[CS3][AS2] Button Trouble
I am having trouble with my buttons, they work perfectly, do what they are supposed to do. I am using this code for my buttons:


Code:
choco1.visited = false;
choco1.onRollOver = function()
{
this.gotoAndStop("over");
}
choco1.onRollOut= function()
{
if(this.visited) this.gotoAndStop("visited");
else this.gotoAndStop("up");
}
choco1.onRelease= function()
{
this.gotoAndStop("over");
this.visited = true;
}
choco1.onPress= function()
{
this.gotoAndStop("down");
gotoAndPlay('1');
}

//-----------------------------------------------------

choco2.visited = false;
choco2.onRollOver = function()
{
this.gotoAndStop("over");
}
choco2.onRollOut= function()
{
if(this.visited) this.gotoAndStop("visited");
else this.gotoAndStop("up");
}
choco2.onRelease= function()
{
this.gotoAndStop("over");
this.visited = true;
}
choco2.onPress= function()
{
this.gotoAndStop("down");
gotoAndPlay('2');
}
....
When you click on the movie clip it goes to another frame and an animation plays,

THE PROBLEM: When it goes to the animation frame after clicking the button, you are still able to click the button even though the buttons are behind the animation that is playing...how would i go about disabling the buttons while it is on the animation frame but also keep the visited state of the button clicked?

Thank You.

View Replies !    View Related
Button Trouble
hi again everyone.....
I was wondering if someone would be able to help me to get my buttons to work. I'm thinking I'm just not scripting them right but I'm also alittle confused as to how to get the loaded actions to play where I want them to. If one of the wonderful masters here would pm me, I'll send the fla document for them to look at. All I need is someone to set the About button for me and I think I can find what bonehead thing I've done or haven't done after that.

Please, please, please????????

View Replies !    View Related
Button Trouble
Can you help?

I need a button on my site that allows the viewer to download a zip file. Is there an easy way of achieving this?

thanks

View Replies !    View Related
Button Trouble
Hi all..

Okay this seems a bit basic but its got me confused.. I'm trying to load in external swf's in for each section, with the navigation and title etc. being on the main swf. So pretty straight forward.. clicking a button loads the external swf into a blank mc, "mc_hold". When you click on another button it'll run the same command except for the other swf. So i've got this far... and i'm thinking it'll do the trick however when I check the actionscript it reports :

"Statement must appear within on handler
but_news.onRelease=function(){"

Could someone please try and explain to me what is going wrong?


ActionScript Code:
//but_news is a navigation button in the main swf
but_news.onRelease=function(){
//news.swf is the external swf being loaded into mc_hold
mc_hold.loadMovie ("news.swf");
}


Thanks!

View Replies !    View Related
Button Trouble
I'm trying to set a variable with a button click but with MX 2004 I can't figure it out. Before in MX, i could just select the button, open actions and give it some commands. This is what it looks like now

myButton.onRelease
set (_root:whatever, "whatever");

What's the story on fixing this? God i love having to re-learn flash.

Meaddas

View Replies !    View Related
Button Trouble
I can't seem to get this script to work. It does the onRelease function but not the onRollOver function.
Code:

var mcl:MovieClipLoader = new MovieClipLoader();

var mclL:Object = new Object();

mclL.onLoadProgress = function(target,loaded,total) {
   loader.percent.text = Math.round((loaded/total) * 100) + "%";
}


mclL.onLoadInit = function() {
   loader._visible = false;
   loader.percent.text = "";
}

mcl.addListener(mclL);

mcl.loadClip("carorb.swf",holder)

b1_mc.btn_txt.text = "ORBS";
b1_mc.hit_mc.onRollOver = function() {
   this._parent.ani_mc.play();
}
b1_mc.onRelease = function() {
   loader._visible = true;
   mcl.loadClip("carorb.swf",holder);
}

b2_mc.btn_txt.text = "Collages";
b2_mc.hit_mc.onRollOver = function() {
   this._parent.ani_mc.play();
}
b2_mc.onRelease = function() {
   loader._visible = true;
   mcl.loadClip("carousel.swf",holder);
}

b3_mc.btn_txt.text = "Simple Scroll";
b3_mc.hit_mc.onRollOver = function() {
   this._parent.ani_mc.play();
}
b3_mc.onRelease = function() {
   loader._visible = true;
   mcl.loadClip("scroll.swf",holder);
}


b4_mc.onRelease = function() {
   loader._visible = true;
   mcl.loadClip("bigshow2002.swf",holder);
}
b4_mc.btn_txt.text = "Pictures 2002";
b4_mc.hit_mc.onRollOver = function() {
   this._parent.ani_mc.play();
}

b5_mc.btn_txt.text = "Pictures 2003";
b5_mc.hit_mc5.onRollOver = function() {
   this._parent.ani_mc.play();
}
b5_mc.onRelease = function() {
   loader._visible = true;
   mcl.loadClip("bigshow2003.swf",holder);
}

The link to the fla

http://lifeisdifficult.fileave.com/photopage1.fla

The link to the swf

http://lifeisdifficult.bravehost.com/fl ... opage1.swf

TIA

View Replies !    View Related
Button Calling Mc Trouble
I have a full nav setup and all works fine. The problem I'm having is that when you hit a particular button to call on the mc it loads fine but if the user should happen to rehit that button it goes back to frame 1 ready to be hit and played again. I need this to stay loaded if hit again. If you hit any other button they exit fine also. Any help would be greatly appreciated.

Thanks

View Replies !    View Related
Button Action Trouble...
when I give a button an action such as "on press, go to and play frame x" it goes to the first frame of my movie and loops back to the frame with the button, instead of going to 'frame x' and playing the embedded movie clip. If I tell it to go to 'the next frame and play' it works... the only problem is that I'm making a webpage with several buttons, each supposed to go to a certain frame and play different movie clips. I've tried not using clips (keyframing all animation in the main scene or other scenes), I've tried two different versions of Flash, I've tried labeling the keyframes instead of using their numerical values... I'm pulling out my hair here... If anyone can help me out, I'd really appreciate it.

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