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








Two Questions About Buttons...


Okay, before I begin I would just like to say that I did try to search the forum for answers to these questions, but it wasn't pulling up anything...

Question 1: I have a floating button that on rollover it plays a little animation, and on roll out it plays something else... but if i move the mouse in too fast, or out too fast it stick, and I was wondering what the code would have to be reset it after a couple of seconds, or something like that...

Question 2: When it over my floating buttons, it has a little hand that lets the person know they're over a button, what code would I have to add the take away the hand on the roll over, so it's just the arrow...

Any help would be positive...

Regards,

Troy




FlashKit > Flash Help > Flash Newbies
Posted on: 02-16-2005, 04:12 PM


View Complete Forum Thread with Replies

Sponsored Links:

Questions About Buttons...
Hi, this may sound like a newbie question but I still need it answered if anyone would be so kind

Right now I have a button and I want the mouse over to play a movie clip right through without it mattering if the mouse is taken off or not. Also when someone clicks on it, right now they have to hold down the button in order for the animation to play all the way through. Is there any way to make the animation play through before it brinks up wherever I link it to, or when the mouse rolls over, it plays all the way through even if the mouse is moved off the button.

For example if a person puts his mouse over a circle, it turns into a square no matter where his mouse is, and when he clicks on it the square minimizes itself and blows up, without the user holding down the mouse over the button.

Any help would be wonderful, thanks!

View Replies !    View Related
Questions About Buttons
This is probably a silly question, but here goes anyhow
I created my website in flash (yay!) http://portfolio.eediva.net/asampete
when i hover on the buttons, it won't change to the mouseover color unless your pc's arrow is not over the text. Try it out and see.
Why does that happen and how can I correct it?
Thanks

View Replies !    View Related
Buttons And Clips Questions
Hi All,

I have a button that loads a movie clip into a frame but the when the
clip is loaded the button that loaded it is still active (behind the
loaded clip invisbile but clickable). How do I 'remove' or disable the
loading button ?

I have another button on this frame that gotoandplay at another frame
- again this button is still active when the other clip is loaded and
if I follow this link the loaded clip continues to play over that
frame !

Alternative methods to achieve the goal are always appreciated !

TIA

famouseccles

View Replies !    View Related
Stupid Questions About Buttons
Ok this might be a stupid question about buttons. Ok here goes... Im trying to make one button that is in a movie clip, then to have the movie clip on stage at different points, then to have each button move when one of the buttons is rolled over (mouse event rollover)...actually in a _y setting. i can get the buttons to move but they're not moving correctly...i dont have a problem with doing it with one button. but it seems that the other ones are getting in the way. Not sure if this is right but, i tried to change the instance name on one of the buttons, but they all seemed to change.???

Any ideas??


thanks

View Replies !    View Related
Couple Questions About Buttons
I have 2 questions, hope you can help.
First, I have my main movie that once loaded, has buttons that will load differernt .swf files onto the main stage.
Im trying to get smoother transitions between the different .swf's.
Is there a way to get the loaded .swf file to finish playing before the next one starts? In other words, it tweens out, then the new one tweens in. I have tried different scripts, but cant seem to get it to work.

Second question, How to you disable the button once its pressed?
This is what I have tried, but again, it doesnt work. Only the handcursor quits, but if I press the button, the movie still loads again.


on (release) {
servicebutt.useHandCursor = false;
}
on (release) {
sevicebutt.enable = false;
}
on (release) {
_root.mtclip.loadMovie("services.swf");
}

Thanks for your help.
Josh

View Replies !    View Related
Questions About Text Buttons
I am creating a button that is text. I want, whenever someone goes over the text it blinks and it is a loop until someone's mouse is not over it.

Also, Have it link to one of my pages that I am creating?

Thank you so much

View Replies !    View Related
Questions About Advanced Buttons?
Hey I was wondering.

I have made a set of buttons that are movie clips. They have animations that they go through when you interact with them. This part works fine.

This question that I have is fairly simple but I have not found the best way to achieve my goals. I want to control the main time line with these buttons but because they are movie clips the on () function does not work with them. If there is a way around this feel free to let me know.

Thanks...

View Replies !    View Related
Couple Of Questions Concerning Buttons And AS
Hi,

1. I've got a button with the following as on it:


ActionScript Code:
on (rollOver) {    if (this.exhibit._alpha != 100) {        this.exhibit._alpha += 20;    } else {        this.exhibit._alpha = 100;     }}


I am trying to get it to fade in to 100 Alpha...but it just jumps to 20. How can I get it to fade in at a speed of 20.

2. I've got a mc that was previously a button with the following code on it:


ActionScript Code:
on (release) {    _root.changePhoto(1);    this.txtIndex = this.pIndex+1;}


When it was a buttons it would change the variable no problem..now that is it a movie clip is performs the function but won't change the var??

Much thanks.

View Replies !    View Related
Couple Of Questions Concerning Buttons And AS
Hi,

1. I've got a button with the following as on it:


ActionScript Code:
on (rollOver) {    if (this.exhibit._alpha != 100) {        this.exhibit._alpha += 20;    } else {        this.exhibit._alpha = 100;     }}


I am trying to get it to fade in to 100 Alpha...but it just jumps to 20. How can I get it to fade in at a speed of 20.

2. I've got a mc that was previously a button with the following code on it:


ActionScript Code:
on (release) {    _root.changePhoto(1);    this.txtIndex = this.pIndex+1;}


When it was a buttons it would change the variable no problem..now that is it a movie clip is performs the function but won't change the var??

Much thanks.

View Replies !    View Related
Two Questions In One - Bullets And Buttons
Hi

I am, trying to create a bigger area for the "clicking hotspot " to take place..
so that the user doesn't have to try and find the clickable area .. how do i increase the size of the button without increasing the size of the text in the button...

Second question:
i would liketo create bullets in my text where is this option?
thanks
melissa

View Replies !    View Related
Buttons And Component Scrollbar Questions...
Hi, I'm having the most difficult time with this and I'm hoping I can get a hand with it...this is a 2 part question, so please bear with me.

PART I:
I have buttons throughout my flash movie that trigger MC's to load that have text content. Everything works well except one thing; when I click the buttons and then click them again I have a strange thing happen...my text fields have a component scrollbar with them and when I click the button a second time the scrollbar gets all screwed up. I have the scrollbar set to be a certain length but the second button click makes it tiny and really useless (not to mention really unprofessional looking). So my question becomes how can I click a button once and then disable it until I click another button? I already have a code that will turn the button off, but it's not what I need. I want each button, when clicked, to simply not respond to mouse clicks, but I need it to still be 'a button' and respond to rollOver's and rollOut's...any ideas??

PART II:
As I mentioned above, I'm using component scrollbars in my movie. I have numerous text files that I am importing which are of various lengths. I'd like to know how I can get the scrollbar to recognize if a text file is too long for my dynamic text box's size and to be visible if the text is indeed too long for the box and of course to be invisible if it is not needed. Right now I have (very amteurishly) turned the scrollbar on or off with the _visible ='s script by manually testing each text file within my movie but I'd rather have a script that will recognize if the scrollbar is needed or not. Obviously I don't know how and I'd like to learn what to do, so could anyone point me to a tutorial or share their experience with this kind of situation with me?

Thanks for reading, have a good day.

View Replies !    View Related
Couple Of Questions (buttons And Transitions)
1)
If I have a set of buttons that will load pictures above (a gallery), how can I "mark" the buttons so that they can tell which ones they have seen and which ones they haven't?

It would be a white square for each picture, red when it's the current picture, and then blue after it has been looked at.


2)
What is the best way to make an entire page move? Meaning... If I have 5 major sections on my site, I can click on one link and the page will seemingly "come from the top" then you click the "home button" and it would appear to move up back in to place...

I guess I would describe it as one huge page, with it moving in place according to clicks... I just figure out what the best way to do it is.

3)
Lastly what is the best approach to make a music page for a band, so you can hear the music at great quality, with little or no wait, and also not downloadable?

Thanks for any help on these issues.

View Replies !    View Related
Two Questions: Buttons & Standalone EXE Problem
First Question

What's the easiest way to assign a button to do three different things when clicked for the first, second and third time?

Second Question

My harddrive knackered and I lost my flash projects and all I have of some of them are the standalone EXEs. Does anyone know of a way, if it's possible, to extract a SWF from it?

View Replies !    View Related
Questions About Buttons, Variables, And Timeline:
I'm somewhat of a newbie at flash/actionscript. I posted a question yesterday about buttons and how to use variables. Someone responded with some code, however I guess I'm not savy enough yet to apply it. Here is basically what I have:

-background animates on stage
-panel with buttons animates on stage
-buttons are home, projects, get a site, and contact.
-I want each button to call up a different graphic but first, animate the current one off the stage.
-I want to be able to disable the button for the one currently 'active'
-Each graphic or clip that is called up has a unique set of movie clips for both entering and exiting.

I have a stop action following the home state. Further down the timeline I created each 'routine' for entering and exiting the stage. I just need to know how to call them and dismiss them so to speak. I know there is some actionscript that will go with each button, but I'm not sure what and where to put the rest of the actionscript to make it work.

I read the tutorial at:
http://www.flashadvisor.com/tutorial..._Clips-25.html

but I'm still in the dark a bit. It refers to movie clips, so I'm not sure if I need to copy my 'routines' off the main timeline and paste them into a movie clip to call them up or not. Seems like I should be able to refer to them at either place.

Thanks so much, sorry for all the questions!

View Replies !    View Related
Two Questions About HTML Publishing And Buttons
I've made a home page with three buttons. The action to go to another page on release is below, minus the curlycues etc. because apparently there's a length limit to the forum posts?

getURL("tanskiphoto.html", "_self");

The links work in the .swr versions of the page, but not in the html version. Any suggestions? Also how can I move this site to a GoLive site to add regular non-Flash pages to the site?

View Replies !    View Related
Dragging And Dropping Buttons /MC Questions
I created a flash movie with a lot of buttons for dragging and dropping around in the stage.
I wanted to make it such that even if i drag one of the button away from its original position, a new same button will appear at exactly the same position. Also, i would like to make it that some buttons are always on top of the other items when being dragged and dropped.
How do i do this?

I am only able to code the dragging and dropping part, but not able to do the rest whereby some buttons are always on top of the others and there will be new same button when the button was being dragged.
I do not know how do i code for movie clip, is it better to use movie clip instead of buttons?

View Replies !    View Related
Two Simple Questions: Mouseover, Buttons
how do i activate a movie clip (of four images separating) with a click OR mouseover, while maintaining the four images as buttons? HELP!

View Replies !    View Related
Radio Buttons - Multiple Choice Questions
Hello all,

I've been having some difficulties getting a clear understanding of how to code radio buttons. I have been creating a training cd for a client of mine and am now stuck at the final chapter...the main quiz.

Does anyone know of a good tutorial (that is free hopefully) that I can take? Or does anyone have any advice. I'm new to the world of action scripting.

Thanks,
BBQ

View Replies !    View Related
2 Questions: Pause Before Next Action - Mocing MCs W/ Buttons
1st Q:
How do I delay the next action... like say I wanna do this

x=1
x=2
x=3

but I want it to pause 1 seccond between each one, like:

x=1
pause(1s)
x=2
pause(1s)
x=3

2nd Q:
How do I make it so that when you hold down a button a movie clip moves?
It works w/ I use keypress because it repeats the actions over and over, I tried to add a while loop to this:

setProperty("btn_1", _x, 1_x);
1_x=1_x-1;

but it froze up.

What's up?

View Replies !    View Related
Flash Buttons/general Actionscript Questions
Sorry if this is basic but i have not ever really touched much on action scripting and i know what im trying to achieve now relies on it.
I have 4 buttons on the stage and what im after is:
1. when one button is pressed, it'll begin an animation and stop.
2. Then when one of the other buttons is pressed, it would "rewind" the previous animation and then play its own animation.

Somethings i wanted to avoid was say if one of the animations were playing and not finished animating yet, and the other button was pressed sooner, it would rewind from whatever point of the other animation.

i hope im clear! lol
Ill try to give an example, say one button makes a line drawn on the screen, and another button fades in some text.
if the first button is activated and a line is drawn on the screen, then i would want the other button to play the first buttons animation backward (so the line is erased) and then fades in the text.

Any help? looking around at tutorials, its hard to pinpoint the actualy actionscript i would need and how to use them.
How would i setup this project? animate on the timeline, use symbols, etc etc

Oh and im on flash cs3, i havent decided on to use AS2 or AS3

View Replies !    View Related
Two Questions: Creating Buttons & Form For Sizing Images
Hi there. I'm seeing some talk about creating movie clips to make buttons and I'd really like to create buttons that look like... well the buttons above this message. With a little symbol and words... can't seem to find a "how to" on making buttons like that. I'd appreciate any direction or tutorials on that. Thanks.

Also, here is my bigger problem. I'm racking my brain trying to figure out how to create a way to click on a b/w pattern and have the user be able to size the pattern by percentage and then print it the way they sized it. Make sense? Any help at all would be greatly appreciated. Thanks all!

Amy

View Replies !    View Related
Outputting Text, And Creating & Showing Buttons & Questions
Question 1: how do I create a button, show it, and so on[indent]I know I can draw something, select it, and convert it to symbol, is it possible to do that, then set that symbol as a button, also, if I import an button, or image, is there anything else I have to do so I can use it as a button, and how do I store it as a button (is it listed as some type of variable? or a object I guess? (Please give an example or so))

Question 2: How do I output text ?How do I type like in php echo "Hello"; or in C++ MS-DOS cout<<"Hello" etc.. to print textQuestion 3: If I wanted to "set" the background color to a hex code, how would I do that?

Question 4: If I have an image imported, how do I set its size (width/height) and position it on the screen correctly

Question 5: What do Imported things & Symbols appear in? as Global Variables? or a Movie Clip or something? an Object? and where abouts would they be (I have Macromedia Flash Professional 8)

This is the current code I have right now

Variables I have (name, starting value, array)
_global.c, set to the value of int_n (which is 5), no array

code:
Hex Generator

Code:
function RandomHex(c) //takes a string variable
{
new_code=Array() //gets 0-9 and A-F stored in it
for (var i:Number = 0; i<10; i++)
{
new_code[i] = i;
}
new_code[10] = "A";
new_code[11] = "B";
new_code[12] = "C";
new_code[13] = "D";
new_code[14] = "E";
new_code[15] = "F";
c = "0x";
for (var i:Number = 0; i<6; i++) //loops six times
{
var int_c = Math.random(15); //random number between 0 & 15
c = c + new_code[int_c]; //stores the value in the string "c"
}
//or var c:Number = Math.floor(Math.random()*21);
//Should I return c; ?

}
function CreateCircle()
{
RandomHex(code[_global.c]); //calls RandomHex to store the value in code[_global.c]
orb[_global.c] = main.createEmptyMovieClip("orb"+_global.c, main.getNextHighestDepth()); //creates new mc
orb[_global.c].lineStyle(5, code[_global.c], 100); //styles the mc
orb[_global.c]._x = 600;
orb[_global.c]._y = 400;
orb[_global.c].moveTo(3, 0);
_global.c += 1; //increases c so we dont erase the last created mc
}
moving my circles

Code:
function move_circles(orb1, orb2, orb3, orb4, orb5) //takes 5 mcs
{
_global.i += 1; //increases i
if (_global.i > 361)
{
_global.i = 0; //dunno what I put this for lol
}
var Radius = Array();
var Rad = Array();
var X = Array();
var Y = Array();
var orb = Array();
orb[0] = orb1;
orb[1] = orb2;
orb[2] = orb3;
orb[3] = orb4;
orb[4] = orb5;
for (var i:Number = 0; i<5; i++)
{
Radius[i] = (i+1)*10; //Radius for my mc (which are drawn circles) to rotate from
Rad[i] = _global.i*Math.PI/5;
X[i] = Math.cos(Rad[i])*(Radius[i]);
Y[i] = Math.sin(Rad[i])*(Radius[i]);
orb[i]._x += X[i];
orb[i]._y += Y[i];
if (Rad[i] = 0)
{
CreateCircle(); //should call CreateCircle() and create 1 new mc which is a small colored dot, that will once created, move up, then after 5 seconds, be removed
}
}

}
setInterval(move_circles, 100, orb[0], orb[1], orb[2], orb[3], orb[4]);
Any help appreciated

View Replies !    View Related
Hey, Questions About MC's With Diff Buttons Doing Same Thing? - And Some Random Snow?
OK, I have a movie I'm making for a website - and I have some problems with it, take a look at it - I attached it, as you can see each movie clip has a slider and a play and stop button - the slider is linked to the volume, and the size of the head in the middle is linked to the volume. How would I make each slider change the volume ? (actually I would like to link the slider to track progress, and then link the size of the head to track progress,) but i'm kindof confused as to what to do

Also! the notes in the back are too much, and i was wondering if i could get them to go behind the MC's, also, I was wondering if I could get them to only spawn on the music bars, and not in the middle.

Whoever helps with this -- it is greatly appreciated, I've been stumped for weeks.

Thanks
Wyatt

-ps. sorry the clip doesn't have music yet, it is still in its early stages.

View Replies !    View Related
Hey, Questions About MC's With Diff Buttons Doing Same Thing? - And Some Random Snow?
OK, I have a movie I'm making for a website - and I have some problems with it, take a look at it - I attached it, as you can see each movie clip has a slider and a play and stop button - the slider is linked to the volume, and the size of the head in the middle is linked to the volume. How would I make each slider change the volume ? (actually I would like to link the slider to track progress, and then link the size of the head to track progress,) but i'm kindof confused as to what to do

Also! the notes in the back are too much, and i was wondering if i could get them to go behind the MC's, also, I was wondering if I could get them to only spawn on the music bars, and not in the middle.

Whoever helps with this -- it is greatly appreciated, I've been stumped for weeks.

Thanks
Wyatt

-ps. sorry the clip doesn't have music yet, it is still in its early stages.

View Replies !    View Related
"Can I Make Moving Buttons" And Other Questions
QUESTIONS:

1. Is it possible to make moving buttons? If yes, how?
2. How to make a button permanentely disappear after clicking it? (not by simply by going to another frame, but really disappear)?
3. Can externally loaded pictures as links to other websites? (you click on a button, a picture gets loaded; you click on a picture which acts as a and a new window pops with that website)

THANKS 1000000!

View Replies !    View Related
XML Quiz - Randomizing Questions & Level Of Difficulty Questions
Hi Folks,
I've been tasked to do a quiz in XML with a few caveats and I need some help.

The quiz needs to pull randomized questions from the XML file and also I need to have this sort from 3 levels of difficulty. For example, a user would possibly get fed 3 easy 3 medium or 4 hard questions.

My XML is set up as follows:
<QUIZ>
<QUESTION TEXT="Harry Markowitz won the Nobel Prize in Economics for a paper on portfolio diversification that he wrote while..." ANSWER="2">
<CHOICE>A. on the faculty at Columbia</CHOICE>
<CHOICE>B. a grad student at Chicago</CHOICE>
<CHOICE>C. a janitor at MIT</CHOICE>
<CHOICE>D. a patent clerk in Hamburg</CHOICE>
</QUESTION>
</QUIZ>

These questions are being stored in an array called questionsArray. So I guess all I need to do is call these from the array @ random, but the level thing is really kickin' my butt. Im just kind of lost on this one and I was hoping for some insight all the way around on this. For some reason XML in Flash scares me. It always ends up being nightmare. Someone please wake me up from the nightmare:-

Thanks,
Michael

View Replies !    View Related
Few Questions Projector Questions
I'm making a projector file for use on a CD, and have a few questions--

I'd like to make an exit button that closes the projector-Possible? If so, basic way to do it?

I'd also like to run a bat file on exit (if the whole exit/close thing is possible that is), and know that the fscommand exec has to be used, but can you have an "do this and then close the projector" sort of command on a button?

Last thing-Right now it says Flash Projector at the top of the window-Can this be changed with some autoscript, and if so, how?

I've gone through the tuts (or most of them) and can't find answers to this stuff, so any help would be appreciated--

View Replies !    View Related
3 Sound Questions; 2 Other Questions
1.Okay, say you're using an event sound, and you want it to fade out after it reaches a certain point or if you press a button. How do you do it?
The thing that I'm going for is using an event sound that plays as you read text. You can press a button to continue reading the text. I also want the song to loop a couple times, just incase it takes the reader a while to read it all. Then, when you press the last button, the music fades out. How do you do that? I would just make the music cut off, but that would be too choppy.

2. How do you cut out a part of the song? For example: You want the long intro cut out, and the main chorus to play.

(note I have a Mac)
3. I have heard you can convert wav files to MP3 files by using a CD ripper. I used a CD ripper, but it wouldn't import the .wav file. I found other files, but they're either for Window users or shareware. Does anybody have a link to a Mac CD ripper that can convert them that's freeware, or do I just have to pay?

(non-sound questions)
4. I go to a website where they allow you to submit flash cartoons you have made in .SWF format. However, there is no download sign. How do I download it? I have been told how, but it was by a Windows user, and he told me of different options. How do I download it?

5. I'm just curious, but is it possible to import another person's .swf file? I'm just wondering, because one guy said "The sound effects I used were ripped from someone else's flash file".

Thanx for your time.

View Replies !    View Related
Questions Question Questions :)
I just have tons of questions :P ... learning is a good acivaty... ok to the question i have... How could one make a gradient move... i want it to follow a object that passes by... i want to do it in code... i have been assumeing that a heavily coded flash site is smaller than a site with more tweens... is that right? i can work in flash but i'm foggy on the details of the program... i have many more questions and need answers...

What is wanted:
I want to create shapes, such as triangles and squares, that are actually made up of small (maybe 5X5 pixel) squares which will make up a "pseudo" gradient mesh (to save on processor load). The end result is to create shapes that simulate light reflecting off a 3D shape and have that light source respond to the mouse cursor.

So imagine a red triangle with the light source being the mouse (or an mc), as the mouse moves, the small squares of different lightness move to simulate the reflection.

Perhaps there is an easier scripted way to do this, that kooky subQuark suggested this wording!

Any help would be appreciated.



thanks ... laters Jimmysomebob

View Replies !    View Related
Buttons, Buttons, And More Buttons...oh And Movie Clips Too
MY QUESTION IS AT THE END and UNTIL THEN IS A BACKGROUND... PLEASE HELP!

moving along...
Ive now made several .fla files for my hour long movie. each .fla file ranges from 2-20mb. not too shabby... Ive done the load movie thing and it ran fine... i havent put any sound yet.. but i'll ask about that question later...

okay.. so the whole thing has about 30 slides... i have 5 .fla files which has 3-5 movie clips in each... each movie clip has about 1-3 slides.

everything is fine so far... (no audio, but im not there yet)

Since i dont have sound cutting software currently... i thought id make movie controls for this video....

originally i put the controls in the original timeline.. not the movie clips.. but my pause didnt work and my play acted like a fast forward... my fast forward would go to the next movie clip(which i anticipated)... but I wanted the fast forward to jump every 12frames..

so here comes the problem....

i copy pasted the buttons in the same exact place in every movie clip.... so it should ,in theory,work like it was on one timeline.. but it wont export.. the file is still the same size.. (insignificantly larger ,less than a mb)..

my question is:

does having buttons on every movie clip ( which frames length range from 400-2000, avg.1000) have a problem with flash...??????????not allowing me to export.. or maybe it's just having so many errors it wont run... in fact... when i close it down (because it wont let me cancel..) it wont let me re open the .fla again.. unless i restart the computer

View Replies !    View Related
[F8]Buttons, Buttons, Buttons Dynamic Text?
Hi

I've got a set buttons that are different instances of the same mc. I'd like to make labels for each button but I don't want to have to duplicate all the buttons in the library and add the labels separately.

I think I need to to this with Dynamic text but that as far as I've got with the searches I've done on Google.

Thanks in advance for any help.

View Replies !    View Related
ActionScript In Buttons To Reference Movie Clips Inside Buttons
I want to reference a movie clip inside a button, to use tell target on the button. Is there a way to use something like:

tellTarget (this.movieclipname) {
}

that way i can use multiple instances of one object, rather then having to make a different action for every single time i want to use it.

View Replies !    View Related
Hiding Buttons Or Movie Clips With Buttons With Actionscripting
Greetings,

I really need someone's help. I am trying to hide buttons from screen when certain conditions are set. For example, I have a variable called Amount. Now, I have a textfield that displays the value of Amount. Three buttons are visible. Each button has actionscript so when click each button would subtract some amount from the variable Amount. Button 5 will subtract 5 from Amount and button 10,20 accordingly. Now, when Amount is less than 20. I wanted to make the 20 button disappear from the screen (not using timeline, object oriented actionscripting). Then when Amount is less than 10 the 10 button will disappear.

I tried making the button disappear with "five._visible=false;" However, I was told I could not do that with buttons. So, i created a movie with button inside. It disappears with "moviefive._visible=false;" But the button does not work when visible. I can see the little hand when I place the mouse over the button, but it does not work. It does not subtract from the variable Amount.

When someone clicks the five button, five button has code that will subtract 5 from Amount and if statements that will "twenty._visible=false;" if the Amount is now less than 20.


Could someone please help me. Thank you very much. I really appreciate any assistance you could provide.

Thanks again

View Replies !    View Related
Multiple Buttons Loading MC Buttons On Single Stage
Hello,
I need three buttons , working independent of each other, to "turn on" the MC in three seperate boxes, all on the same timeline- further, I want these MCs once "turned on" to actually be buttons that can then send the user to a different page. I can make this work if it's only one button, using two frames (by "hiding" the already launch MC over the top of it- then sending the link to frame two etc) but I need ALL three buttons visible, in whatever order the viewer clicks them! (Think of a wall with three windows and the MCs are the window images!) SO: the viewer clicks a button (any or all three) that turns on the movie clip and the movie clip can then be clicked to launch to a new page. Is this even possible?
-sorry for the long explanation- thanks for any help!
ras.

View Replies !    View Related
Dynamic Text For Multiple Buttons W/ Scroll Buttons/bar
HELP! I know a similar question to this has appeared multiple times before, but here is my situation:

i have four buttons, each of which will load a a separate text file into a dynamic text field (ie: button A to textfield 1, button B to textfield 1).

The other trick is, this also has a custom scroll bar. (I would rather just use an up and down arrow, but if i have to use a bar as well, I will not be too distraught.)

Is there a way that I can have all the text files loads in a dynamic text field PLUS have a scroll bar to aid with scrolling.

Any help would be greatly appriciated. I have been trying to figure this out for about a week now, and am still no where.

peter /slqu.net

ps: i am a designer, and for some reason, programming, even of the most simple nature, still eludes me. so please take pity me

View Replies !    View Related
Avoiding Paypal Shopping Cart Buttons - Need A Way Around Buttons
Hi - I'm on MX; my client wants a VERY minimal site. I'm using his Paypal business account to sell merch, and the process is pretty easy to set up...EXCEPT that he wants to avoid the buttons provided by Paypal. They provide the HTML to paste in for said buttons; I'm using dynamic scrolling text, pulling from an external .txt file. I know how to HTML format for links, etc. - is there a way to bypass the use of an actual button, and just use text links for the "add to cart" and "view cart" buttons? I know that if I upgraded to MX 2004, I would be able to place images (buttons) in my dynamic text - but that is a moot point, as he wants to avoid buttons altogether. I'm copying the HTML code Paypal offers for the add to cart button below:

------------------------
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="willyt14@aol.com">
input type="hidden" name="item_name" value="Hilarity and Despair">
input type="hidden" name="item_number" value="001">
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">
input type="hidden" name="bn" value="PP-ShopCartBF">
/form>
-------------------------

Thanks so much!

View Replies !    View Related
Targetting 'Hit' State On Buttons/immediately Disabling Buttons
Hi,

I have a button which, when clicked on, is set to disable itself. However, when it's clicked, the mouse is obviously still over the button and so the 'Over' state is shown - which implies that the button is still active. I don't want this - I want the button to be completely disabled as soon as it is clicked. If I move the mouse away from the button then it becomes completely disabled.

See here:

http://www.russellgillman.co.uk/testmenu.swf

When you hover over the buttons the text becomes yellow. When I click on a button, the green block moves to the selected button and the button is disabled, and yet the text remains yellow. I want it to become white immediately.

Code on the button:


Code:
on (release) {
services_btn.enabled = false;
getURL("www.site.com", "mainFrame");
slider.xMove = services_btn._x;
about_btn.enabled = true;
rates_btn.enabled = true;
rental_btn.enabled = true;
sales_btn.enabled = true;
coverage_btn.enabled = true;
contact_btn.enabled = true;
}
What I'd like to do is to target a specific frame in the button - eg:

services_btn.gotoAndStop("Hit");

but this doesn't work.

Can some help please!? Thanks...

View Replies !    View Related
Buttons Whos Actions Depend On States Of Other Buttons -HOW?
Hi,

I’ve made a 3D animation as a background to my homepage, and have imported it into Flash CS3 as a series of still TIFF images (one image on each frame).

Now I am looking to control this animation using a series of 9 buttons. At the moment each button does the following:

Button1: Play frames 01 – 20. Stop.
Button2: Play frames 21 – 30. Stop.
Button3: Play frames 31 – 40. Stop.
…etc.

However, I want to make each button’s action dependant on the states of the other buttons:

When the user presses any of the 8 buttons other than the one that is currently engaged, I want the animation relating to the button that is currently engaged to be played in reverse, and then the animation belonging to the button that has just been pressed to be played!

For example, if Button 1 has been pressed, then the user presses Button 2, I want frames 20 – 01 and then frames 21 – 30 to be played. Another example; Button 3 is engaged, user presses Button 1 – frames 40 – 31 should be played and then frames 01 – 20.

If anyone could help me with the ActionScript to perform this (ideally AS3 but AS2 is fine) then I would be extremely, extremely grateful.

Thanks in advance for any comments.
Ben.

View Replies !    View Related
Buttons Whos Actions Depend On States Of Other Buttons -HOW?
Hi,

I’ve made a 3D animation as a background to my homepage, and have imported it into Flash CS3 as a series of still TIFF images (one image on each frame).

Now I am looking to control this animation using a series of 9 buttons. At the moment each button does the following:

Button1: Play frames 01 – 20. Stop.
Button2: Play frames 21 – 30. Stop.
Button3: Play frames 31 – 40. Stop.
…etc.

However, I want to make each button’s action dependant on the states of the other buttons:

When the user presses any of the 8 buttons other than the one that is currently engaged, I want the animation relating to the button that is currently engaged to be played in reverse, and then the animation belonging to the button that has just been pressed to be played!

For example, if Button 1 has been pressed, then the user presses Button 2, I want frames 20 – 01 and then frames 21 – 30 to be played. Another example; Button 3 is engaged, user presses Button 1 – frames 40 – 31 should be played and then frames 01 – 20.

If anyone could help me with the ActionScript to perform this (ideally AS3 but AS2 is fine) then I would be extremely, extremely grateful.

Thanks in advance for any comments.
Ben.

View Replies !    View Related
Replacing Dedicated Gallery Buttons For Next/prev Buttons
Hey all, I could use some help with this. It's probably something simple but it beyond my current abilities - any assistance would be aprreciated.

Well I'm using the code from one of the XML gallery tutorials. Currently the code has dedicated buttons for each individual gallery, however I'd like to change it so it only uses next/prev buttons and perhaps use an XML file to establish how many galleries there are, that way it would be easier to add additional galleries later on without cluttering the screen with a whole bunch of buttons.

here's the code...


PHP Code:



function loadXML(loaded) { if (loaded) {  xmlNode = this.firstChild;  image = [];  description = [];  thumbnails = [];   total = xmlNode.childNodes.length;  for (i=0; i<total; i++) {   image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;   description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;   thumbnails[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;    thumbnails_fn(i);  }  firstImage(); } else {  content = "file not loaded!"; }}xmlData = new XML();xmlData.ignoreWhite = true;xmlData.onLoad = loadXML;xmlData.load("images1.xml");gallery_txt.text = "Gallery 1";// gallery buttonsbtngal1. onRelease = function(){ xmlData.onLoad = loadXML; xmlData.load("images1.xml"); gallery_txt.text = "Gallery 1"; thumbnail_mc.unloadMovie(); p = 0; thumbnail_mc._x = +1;}btngal2. onRelease = function(){ xmlData.onLoad = loadXML; xmlData.load("images2.xml"); gallery_txt.text = "Gallery 2"; thumbnail_mc.unloadMovie(); p = 0; thumbnail_mc._x = +1;}btngal3. onRelease = function(){ xmlData.onLoad = loadXML; xmlData.load("images3.xml"); gallery_txt.text = "Gallery 3"; thumbnail_mc.unloadMovie(); p = 0; thumbnail_mc._x = +1;}///////////////////////////////////// listen = new Object();listen.onKeyDown = function() { if (Key.getCode() == Key.LEFT) {  prevImage(); } else if (Key.getCode() == Key.RIGHT) {  nextImage(); }};Key.addListener(listen);previous_btn.onRelease = function() { prevImage();};next_btn.onRelease = function() { nextImage();};///////////////////////////////////// p = 0;this.onEnterFrame = function() { filesize = picture.getBytesTotal(); loaded = picture.getBytesLoaded(); preloader._visible = true; if (loaded != filesize) {  preloader.preload_bar._xscale = 100*loaded/filesize;  preloader.loadText = Math.round(100*loaded/filesize)+"%"; } else {  preloader._visible = false;  if (picture._alpha<100) {   picture._alpha += 10;  } }};function nextImage() { if (p<(total-1)) {  p++;  if (loaded == filesize) {   picture._alpha = 0;   picture.loadMovie(image[p], 1);   desc_txt.text = description[p];   picture_num();  } }}function prevImage() { if (p>0) {  p--;  picture._alpha = 0;  picture.loadMovie(image[p], 1);  desc_txt.text = description[p];  picture_num(); }}function firstImage() { if (loaded == filesize) {  picture._alpha = 0;  picture.loadMovie(image[0], 1);  desc_txt.text = description[0];  picture_num(); }}function picture_num() { current_pos = p+1; pos_txt.text = current_pos+" of "+total;}function thumbNailScroller() { // thumbnail code! this.createEmptyMovieClip("tscroller", 1000); scroll_speed = 30; tscroller.onEnterFrame = function() { if ((this._ymouse>=thumbnail_mc._y) && (this._ymouse<=thumbnail_mc._y+thumbnail_mc._height)) { if ((this._xmouse>=(hit_right._x-3)) && (thumbnail_mc.hitTest(hit_right))) { thumbnail_mc._x -= scroll_speed; } else if ((this._xmouse<=30) && (thumbnail_mc.hitTest(hit_left))) { thumbnail_mc._x += scroll_speed; } } else { delete tscroller.onEnterFrame; } }; } function thumbnails_fn(k) { thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth()); tlistener = new Object(); tlistener.onLoadInit = function(target_mc) { target_mc._x = hit_left._x+(eval("thumbnail_mc.t"+k)._width+5)*k; target_mc.pictureValue = k; target_mc.onRelease = function() { p = this.pictureValue-1; nextImage(); };target_mc._alpha = 50;target_mc.onRollOver = function() { this._alpha = 200; thumbNailScroller(); }; target_mc.onRollOut = function() { this._alpha = 50; };}; image_mcl = new MovieClipLoader(); image_mcl.addListener(tlistener); image_mcl.loadClip(thumbnails[k], "thumbnail_mc.t"+k); } stop(); 






Thanks

View Replies !    View Related
Creating Animated Buttons Tut-Linking The Buttons To Content
I followed Lee's excellent tut on creating buttons using movies clips.

I am rather confused as to how the buttons can be linked to content -

ie Portfolio button to portfolio page - Contact button to contact page.

Im rather new to flash 8 however from my understanding of MX2004 I know
how to create a behaviour on a button symbol to play a certain page. After playing about with Flash this evening I was unable to get any button created using the tut to link to another page.

Can someone point me in the right direction, code or otherwise.

Thanks

Chris

View Replies !    View Related
Mx04: Any Idea How To Deal With Buttons On Top Of Buttons?
Hello fellow flashers.

Just a quickie hopefully; i have a rollover mc that when rolls over darkens a banner and as such shows the text more clearly when the mouse rolls over it (when its not rolled over you can see the pic clearer unedrneath) anyway ontop of this rollover mc i have a button now when you roll over that button the mc dissapears as if you've rollout of it again because the button is obviuosly taking priority.

Here's the question: Is there any way of getting both the mc to play its role and the button to have its over state at the same time?

dean!!

View Replies !    View Related
Rotating Menu Buttons On One Of The Buttons Press
This is a really simple question but one which i can't seem to find an answer for...

I'm trying to do something like the nav menu at www.echoprojects.com. I've done like half of it now but i got 2 questions:

I'm spinning a basic menu with 2D circles using _rotation and the tween and transition class, with easing. Now thats no problem, but I need to get the rotation rotating at different angles depending on which button is pressed. I can do the angles part....but i can't seem to find a way how to rotate the buttons at the angles depending on which button is pressed. I cant even tween a single button when that is pressed. I tried variables functions actions on different keyframe and on the actual buttons....but to no avail lol.

Another more offtopic to AS question is so far I've worked simply with 2D buttons and stuff. If anyone can point me in the right direction to get it working with 3D stuff, then that would be greatly appreciated.

Thanks, esurio.

Edit: oops, forgot i got an example file somewhere lol....see attatchment

View Replies !    View Related
Making MC Objects With Embedded Buttons Act As Buttons?
Hello everyone, thanks for reading my post.

I'm working on a map 'thumbnail' interface, with about two-dozen thumbnails that get larger (gotoandStop 5) on mouseover.

Now, this is the code I am currently using to achieve this effect:

Code:
on (rollOver) {
gotoAndStop(5);
_root.x += 2;
_root.VARIABLE_MC_NAME.swapDepths(_root.x);
}

on (rollOut) {
gotoAndStop(1);

}
Where should I put the onClick getUrl piece? And how?

I don't understand if it should be part of this function or have its own function.

Thanks for looking at this, all comments and answers appreciated.

-Tim

View Replies !    View Related
Movie With Buttons Via AttachMovie, Buttons Not Working
'm developing a flash menu (using flash MX) for a website I'm building (it's a gallery to show off my travel photos and my journal entries). I have the basic layout the way I want but I am having a problem accessing buttons within an attached movie.


Code:
//quick hack to get onRelease functionality for a movieclip
_global.MovieClip.prototype.onRelease_ = function(murl){
this.onEnterFrame = function(){
this.onRelease = function(){
trace(murl);
delete this.onEnterFrame;
}
}
}

//when a user places their mouse over a menu item, it will scroll out from the right
//if there are submenus associated with this item, loadsubMenu function will be called
MovieClip.prototype.topmenuOut = function(tmo_speed,has_sub1,toload,temp_name){
if(has_sub1 eq "" || has_sub1 ne "false" && has_sub1 ne "true"){
has_sub1 = "false";
}
this.onEnterFrame = function(){
if(this._x > 0){
this._x -= tmo_speed;
}
else{
if(has_sub1 eq "true"){
_global.isShowing = this;
this.loadSubMenu("add_",toload,temp_name);
}
delete this.onEnterFrame;
stop();
}
}
}
//when a user moves their mouse away from a menu item, if it is "exposed" it will move
// back to its default
MovieClip.prototype.topmenuIn = function(tmi_speed,has_subm){
if(has_subm eq "" || has_subm ne "false" && has_subm ne "true"){
has_subm = "false";
}
this.onEnterFrame = function(){
if(this._x < 214){
this._x += tmi_speed;
}
else{
if(has_subm eq "true"){
_global.isShowing = "";
}
delete this.onEnterFrame;
stop();
}
}
}
//called from topmenuOut if there are submenus present; will attach the appropriate movie //as set in the movieclip that the mouse is currently placed over and will attach the //submenu clip to the current movieclip
//all calling (top level menus) movies have had their linkage set to export for actionscript //and first frame and reference names set
//in addition the submenu is faded in and out depending if todo (passed from calling menu //movie) is set to add_ or del_
MovieClip.prototype.loadSubMenu = function(todo,omovie,temp_movie){
if(todo eq "add_"){
temp = this.attachMovie(omovie,temp_movie,100,{_x:0,_y:54});
temp._alpha = 0;
temp.onEnterFrame = function(){
if(temp._alpha < 100){
this._alpha += 5;
}
else{
delete temp.onEnterFrame;
}
}
}
if(todo eq "del_"){
temp.swapDepths(99);
temp.onEnterFrame = function(){
if(temp._alpha > 0){
this._alpha -= 5;
}
else{
delete temp.onEnterFrame;
temp.removeMovieClip();
}
}
}
}
//from a menu movie (acting as button) on the main timeline(called //guestbook) and defined in the movie itself
on(rollOver){
topmenuOut(5,"true","subm_guestbook","temp_guestbook");
}
on(rollOut){
if(_global.isShowing eq this){
loadSubMenu("del_","subm_guestbook","temp_guestbook");
topmenuIn(5,"true");
}
else{
topmenuIn(5);
}
}
on(release){
this.onRelease_("hello");
}
The problems lies in the fact that I have a movie called mov_subm_guestbook, exported for AS and first frame with the label: subm_guestbook. When you hover over the top level menu "guestbook", it will move from right to left then the submenu will be show (attached to guestbook via attachMovie) with the fade in and fade out effects working. However I cant access any of the two buttons in the submenu. I have defined both as buttons and nothing. I've used

Code:
Button.prototype.swapDepths = MovieClip.prototype.swapDepths;
to set the depth of the buttons within the attachedMovie to something high like 10000 using <instancename>.swapDepths(10000). But still no go.

I've tested out the submenu with "Test Scene" and the buttons work then, just not if I attach them to another movie with attachMovie.

I'm still new to actionscript (but I'm really familiar with other types of coding and scripting) and I would appreciate any help.

Thanks.

bungilo

View Replies !    View Related
Buttons Within Buttons Not Effecting Main Timeline
i am having problems with a scene i am trying to create.

In the beginning there are a group of buttons on the left that collapse into one button titled Expand. In place of the collapsed buttons a list of text button options appear. All of this is contained in a Movie Clip in my scene.

When rolling over the options I want the user to be taken to different frames on my main timeline

My problem:
The options(text buttons) I have made are controlling the timeline of the Movie Clip they are held in rather than effecting the Main Scene's timeline.

Is anybody familiar with this problem? Maybe I need more action script than

on(rollOver){
gotoAndPlay(23);
}



Thank you in advanced radical people!

View Replies !    View Related
Loading Buttons VS Buttons In The Main Movie
Hi!
I want to ask if it's faster to have the buttons in the main movie itself and these buttons loads other external SWFs into the container?
What about if the buttons themselvs are loaded SWFs?
Do these two different solutions have anything with smoothness and playback speed of the movie?

mx-guest2004

View Replies !    View Related
Differing Mc Buttons That Work Like Radio Buttons
Ok I posted this in the newbie forum but thought I'd reword it here for clarity.

Basically, I have a row of buttons that are all different since they will be thumbs with different images for each.

Now they should have rollover states as well as on/off states, meaning I would like to have them jump to certain frames on rollOver, rollOut, and release events.

The way in which they work like radio buttons, is that when one is 'turned on', it turns off the one that was last 'on'.

I've tried everything but it seems that the rollOut deactivates the 'on' state.

Here's what I have that works navigationally. This script is attached to an mc with an instance name 'thumb_mc1' embedded within a parent clip.

on (release) {
_root.holder_mc.loadMovie("image1.swf", 0);
this.gotoAndPlay(2);
}

You can see it's targeting placeholder clip, which is now working fine. Frame 2 is the 'on' state and I want it to remain there regardless of the rollOver or rollOut. Then when 'thumb_mc2' is clicked, I want 'thumb_mc1' to return to frame 1.

Eventually, the rollOver and rollOut animations will be more complex, but for now, I just want to do basic timeline control in a way that mimics radio buttons.

Please help!! This seems like it should be built into Flash somehow, but I can't find anything on solving the problem!!

View Replies !    View Related
Replacing UI-component Buttons With Custom Buttons
Hi all!
I don't have that Flash or AS skills, so i'm using the Quiz-Template to build a little test.
However, i woluld like to use my own custom buttons, instead of the provided "reset" and "control" buttons.
Could anybody kindly help me out and give me a hint, how to aplly the (for example "reset"-)functions to them?

For example: This is the Reset-function AS-Code from the Drag&Drop Quiz-Template (right?!):
// 1-2: Handles reset button clicks

function onDDReset(){

var router = _parent.SessionArray[_parent.session];
var len = router.drag_objects.length;


for(var i=0; i < len; i++){
if (_parent[router.drag_objects] != undefined){
with(_parent[router.drag_objects]){
swapDepths(startDepth);
_x = startX;
_y = startY;
dropValue = undefined;
dropZone = false;
finished = false;
}
}
}

router.resetFlag = false;
router.setFeedback(0);
router.setComponentLabel(router.Assets.ControlButton, router.label_state);
router.setComponentState(router.Assets.ControlButton, false);
//router.setComponentState(router.Assets.ResetButton, false);
}

Now, how can i apply the reset-function to my custom button??

Thanks a lot for any kind of help! :-)

View Replies !    View Related
More Questions
Thanks for the latest reply I guess what I really need is the actual code, I kind of understand what needs to happen but have no clue how to actually write the code and where to put it. So I wondered if there is anyone willing to let to write it??? but maybe explain it too, anyway asking for a lot thanks in advance!

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