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




Buttons



I am curious as to how to make button animations. An example of what I mean is http://www.arniegeddon.ch/v5/index.php . How does he do the animations underneath the buttons?

Thanks in advance for any help.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

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

[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.

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.

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

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.

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

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!

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...

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.

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.

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

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

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!!

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

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

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

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!

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

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!!

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! :-)

Emulating NEXT Buttons In AS Instead Of Scroll Buttons
Hope some one here can help more than my bosses
The guy at the top has decided that after careful consideration He doesn't want the dynamic text in the text areas of the new site to scroll _ it is confusing he says.
We should make it next buttons instead.
I don't want to have to embed all the text from the text file into the swf as the weight of the swf is already too big.

Can anyone suggest a work around for this please
Thank you in advance for your help,
Jon 8o)

Mouse Buttons To Act As NEXT/BACK Buttons
I have invisable buttons now that make my presentation move forward and backward based on Keypress. The BACKSPACE key sends the scene back, and the ENTER key sends it forward. I would like to have it so that MOUSE1 replaces BACKSPACE and MOUSE2 replaces ENTER ... is this possible? If so, could you explain how to go about it? Any help is GREATLY appreciated, as I have a client waiting Thanks again!

Expanding Buttons To Rotating Buttons
Hello, i have a script for expanding buttons, which slowly expand when you roll over, and slowly shrink when u roll off, I was hoping someone could convert so that it would slowly rotate instead of expand. It is a button inside of a movie clip.

This is the code for the movie clip

onClipEvent(load) {
____// set initial scale to 100
____newscale = 100;
}
onClipEvent(enterFrame) {
____if (this._xscale > newscale) {
_________// shrink
_________this._xscale -= 10;
_________this._yscale -= 10;
____} else if (this._xscale < newscale) {
_________// grow
_________this._xscale += 10;
_________this._yscale += 10;
____}
}

On the button inside it, is this code

on (rollOver) {
____// set up for grow
____newscale = 150;
}
on (rollOut) {
____// set up for shrink
____newscale = 100;
}
on (release) {
____// do something
____trace("Home");
}On the button inside it, you add this code
on (rollOver) {
____// set up for grow
____newscale = 150;
}
on (rollOut) {
____// set up for shrink
____newscale = 100;
}
on (release) {
____// do something
____trace("Home");
}

Variables And Buttons And Reset Buttons
i have an opening screen with six buttons on it each with this instruction on them:

button 1
on (press) {
_root.text = 1;
}

button 2
on (press) {
_root.text = 2;
}
etc.

this then tells a movie clip to load a swf file.

I also have a reset button which removes the loaded swf and takes us back to the 6 buttons, it's code is this:

on (release) {
gotoAndPlay (12);
}
on (release) {
tellTarget ("/links") {
gotoAndPlay (7);
}
}
on (release) {
unloadMovieNum (1);
}
on (release) {
_root.text = 0;
}
on (release) {
tellTarget ("_root.links.dots") {
gotoAndPlay (13);
}
}


this all works fine until I decide that after unloading the swf i want to go back to that exact same swf again by pressing the relevant button, then it wont load the swf.. if I then press another button laod a differnt movie then reset and go back to the button I wanted to work it then works.

Does anyone know what is going on here?

please help

Interacting Between Next/Previous Buttons And Other Buttons
Ok I have some action script for my NEXT button that goes like this:

var slideInfoLV:LoadVars = new LoadVars ();
slideInfoLV.load("vars/slide_info.txt");

var curFrameNum:Number = 0;

function loadFrame() {
_level0.myMCL.loadClip ("work" + curFrameNum + ".swf", this.slidesMC);
}
loadFrame();


// -----------------<next slide button>---------------- \
this.nextSlideBtn.onRelease = function() {
if (curFrameNum < Number(slideInfoLV.totalFrames) -1) {
curFrameNum++;
} else {
curFrameNum = 0;
}

loadFrame();

}

// -----------------</next slide button>---------------- \


And that loads the next movie and everything is fine. But I'v eintroduced other buttons that take you directly to one of the specific page, so say for example I have button "Newsletters" I want it to go directly to the work12.swf which contains the first example of a newsletter. (ie: work12.swf) , and then from that point play through the rest of the files in order (work14.swf, work 15.swf, etc. etc.)

Here's the code for that button:


on (release) {
//load Movie Behavior
if(this._parent.slidesMC == Number(this._parent.slidesMC)){
loadMovieNum("work18.swf",this._parent.slidesMC);
} else {
this._parent.slidesMC.loadMovie("work18.swf");
}
//End Behavior

}

BUT what's happening is when I click the NEXT button it loads the work1.swf. Is there a way to make it go in order from where the user clicks onto one of the buttons... I'm sure there is I'm just not a programmer. http://www.rdesigncreative.com/test/...flash/work.htm

You can see the fla files in that directory.

Thanks for any help/

[F8]pls Help:buttons And Buttonlike-mc´s Inside Other Buttons/mc´s
i´m trying to make an interactive map, got these problems i just can´t solve:

on the map i have buildings that can be clicked on and a small text box appears with info about the building. with a click on the close button inside the box you should be able to close the box again. also, in some textboxes there´s a second button that takes you to another swf.

now here´s how i set it up:
the building is a mc(usi_mc), inside the mc i have a textbox which pops up.
then there´s the close button and the other mc(test_mc) which takes you to the other swf.

my problems:
-the close button doesn´t work (doesn´t even change color on "over" and "press"), have no idea why.
-the test_mc button doesn´t work
-when i click anywhere on the building or the textbox after it popped up, it goes away again, again no idea why(it should be going away when i click the close button).
-on the very first click nothing happens(which isn´t that big a deal though).

any help, explanations etc. would be very appreciated!

Using _btn As Buttons Versus Using _mc As Buttons
What are the pros and cons?


I'm a novice, and have only been working with AS3 for a few days, and I only have 2 1/2 months experience w/ flash (AS2) period. Please tell if my observations are accurate.

Use _mc if you are a programer doing things primarily with code.

Use _btn if you arent efficient w/coding, and need to do most things visually.


I know this is probably wrong, but please help me out, if you can?

I don't want to continue working in AS2 since by the time I learn it fully it will probably be outdated. So I'm making the leap.

Thanks for your time

Buttons: Same Instance Name...multiple Buttons
For a secondary navigation, I've created a frame based rotating object with different set of hotspots on each frame that link to the pages of the site.

What I'd like to do is give the same instance name to a set of buttons and then write a myInstance.getURL script that will apply to all these buttons.

The other option I've thought of is to copy the link code into my 190 individual buttons.

Any thoughts?

Still Buttons To Work Like The Carousel Buttons
i have this code for a carousel but i want to and still buttons on the top and when i click on then i want it to do the same thing as the carousel button is doing. is there away where i could add code in to link to make this work?

can anyone help me?


ActionScript Code:
import mx.utils.Delegate;
import mx.transitions.Tween;
import mx.transitions.easing.*;
var scope = this;
var numOfItems:Number;
var radiusX:Number = 300;
var radiusY:Number = 85;
var centerX:Number = Stage.width / 2;
var centerY:Number = Stage.height / 2;
var speed:Number = 0.05;
var perspective:Number = 130;
var home:MovieClip = this;
theText._alpha = 0;


var tooltip:MovieClip = this.attachMovie("toolTip", "toolTip", 10000);
tooltip._alpha = 0;
home.attachMovie("experiments","exp",this.getNextHighestDepth(),{_visible:false, _alpha:0});
home.attachMovie("about","about",this.getNextHighestDepth(),{_visible:false, _alpha:0});
home.attachMovie("dr","dr",this.getNextHighestDepth(),{_visible:false, _alpha:0});
home.attachMovie("photogallery","photogallery",this.getNextHighestDepth(),{_visible:false, _alpha:0});
home.attachMovie("banners","banners",this.getNextHighestDepth(),{_visible:false, _alpha:0});
home.attachMovie("think","think",this.getNextHighestDepth(),{_visible:false, _alpha:0});

var toolTipArray:Array = ["Banners", "Photo Gallery", "Think Tank", "About Me", "Demo Reel", "Experiments"];
var idNames:Array = ["banner", "cam", "light", "me", "reel", "science"];
var moviesToShow:Array = [home.banners, home.photogallery, home.think, home.about, home.dr, home.exp];
//trace(moviesToShow);
//positioning the content
exp._x = 430;
exp._y = 250;
about._x = 430;
about._y = 250;
dr._x = 430;
dr._y = 250;
photogallery._x = 430;
photogallery._y = 250;
banners._x = 430;
banners._y = 250;
think._x = 430;
think._y = 250;

var numOfItems:Number = idNames.length;
var t;
var icn;
for (var i = 0; i < numOfItems; i++) {
    t = home.attachMovie("item", "item" + i, i + 1);
    t.angle = i * ((Math.PI * 2) / numOfItems);
    t.onEnterFrame = mover;
    t.toolText = toolTipArray[i];
    icn = t.icon;
    icn.attachMovie(idNames[i],idNames[i],t.icon.getNextHighestDepth());
    icn.onRollOver = over;
    icn.onRollOut = out;
    // save an index of button
    icn.i = i;
    // scope released to the button
    icn.released = released;
    icn.onRelease = function() {
        this.released();
    };
}

function over() {
    home.tooltip.tipText.text = this._parent.toolText;
    home.toolTip._x = this._parent._x;
    home.toolTip._y = this._parent._y - this._parent._height / 4;
    home.toolTip.onEnterFrame = Delegate.create(this, moveTip);
    home.toolTip._alpha = 100;
}

function out() {
    delete home.toolTip.onEnterFrame;
    home.toolTip._alpha = 0;
}

function released() {
    home.toolTip._alpha = 0;
    var mc = moviesToShow[this.i];
    trace(mc);
    if (mc != null) {
        mc._visible = true;
        //tween in?
        mc._alpha = 100;
        mc.x = stage.stageWidth / 2;
        mc.y = stage.stageHeight / 1;
    }
    for (var i = 0; i < numOfItems; i++) {
        var t:MovieClip = home["item" + i];
        t.xPos = t._x;
        t.yPos = t._y;
        t.theScale = t._xscale;
        delete t.icon.onRollOver;
        delete t.icon.onRollOut;
        delete t.icon.onRelease;
        delete t.onEnterFrame;
        if (t != this._parent) {
            var tw:Tween = new Tween(t, "_xscale", Strong.easeOut, t._xscale, 0, 1, true);
            var tw2:Tween = new Tween(t, "_yscale", Strong.easeOut, t._yscale, 0, 1, true);
            var tw3:Tween = new Tween(t, "_alpha", Strong.easeOut, 100, 0, 1, true);
        } else {
            var tw:Tween = new Tween(t, "_xscale", Strong.easeOut, t._xscale, 100, 1, true);
            var tw2:Tween = new Tween(t, "_yscale", Strong.easeOut, t._yscale, 100, 1, true);
            var tw3:Tween = new Tween(t, "_x", Strong.easeOut, t._x, 200, 1, true);
            var tw4:Tween = new Tween(t, "_y", Strong.easeOut, t._y, 320, 1, true);
            var tw5:Tween = new Tween(theText, "_alpha", Strong.easeOut, 0, 100, 1, true);
            theText.text = t.content;
            var s:Object = this;
            tw.onMotionStopped = function() {
                s.onRelease = unReleased;
            };
        }
    }
}

function unReleased() {
    var mc;
    for (var all in moviesToShow) {
        mc = moviesToShow[this.i];
        if (mc != null) {
            mc._visible = false;
            //tween in?
            mc._alpha = 0;

        }
    }
    delete this.onRelease;
    var tw:Tween = new Tween(theText, "_alpha", Strong.easeOut, 100, 0, 0.5, true);
    for (var i = 0; i < numOfItems; i++) {
        var t:MovieClip = home["item" + i];
        if (t != this._parent) {
            var tw:Tween = new Tween(t, "_xscale", Strong.easeOut, 0, t.theScale, 1, true);
            var tw2:Tween = new Tween(t, "_yscale", Strong.easeOut, 0, t.theScale, 1, true);
            var tw3:Tween = new Tween(t, "_alpha", Strong.easeOut, 0, 100, 1, true);
        } else {
            var tw:Tween = new Tween(t, "_xscale", Strong.easeOut, 100, t.theScale, 1, true);
            var tw2:Tween = new Tween(t, "_yscale", Strong.easeOut, 100, t.theScale, 1, true);
            var tw3:Tween = new Tween(t, "_x", Strong.easeOut, t._x, t.xPos, 1, true);
            var tw4:Tween = new Tween(t, "_y", Strong.easeOut, t._y, t.yPos, 1, true);
        }
        tw.onMotionStopped = function() {
            for (var j = 0; j < numOfItems; j++) {
                var t:MovieClip = home["item" + j];
                t.icon.onRollOver = Delegate.create(t.icon, over);
                t.icon.onRollOut = Delegate.create(t.icon, out);
                t.icon.onRelease = Delegate.create(t.icon, released);
                t.onEnterFrame = mover;
            }
        };
    }
}

function moveTip() {
    home.toolTip._x = this._parent._x;
    home.toolTip._y = this._parent._y - this._parent._height / 4;
}


function mover() {
    this._x = Math.cos(this.angle) * radiusX + centerX;
    this._y = Math.sin(this.angle) * radiusY + centerY;
    var s:Number = (this._y - perspective) / (centerY + radiusY - perspective);
    this._xscale = this._yscale = s * 100;
    this.angle += this._parent.speed;
    this.swapDepths = Math.round(this._xscale + 100);
}

this.onMouseMove = function() {
    speed = (this._xmouse - centerX) / 2800;
};
stop();

Creating Buttons, But Not Ordinary Buttons
Okay, I feel like I have really achieved something, I created my first animation project. Now that everything is completed in the animation, I would like to make the parts that are now done moving, be turned into buttons. Do I have to re-create the entire project and make each part a button? Can't I just add it to the end? Please help if anyone is able.
Thanks

Buttons Overlap Buttons Issues
I am new to Flash and I am using Flash MX. I am having difficulties setting up my page when buttons I've created for one frame label overlap buttons on another frame label. I have managed to disable the buttons on the frame label but when they overlap another button on another frame label it deadens the button I wish to use. Here is the code for a frame label as example (see below):

If I am on the "install" frame label, the fireball_btn is enabled but is covered by the MarMad_btn which is disabled. Please help.







Attach Code

install_btn.onRelease = function() {
cswcat_btn.enabled=false;
palmcat_btn.enabled=false;
MTIcat_btn.enabled=false;
warncat_btn.enabled=false;
Wintercat_btn.enabled=false;
fireball_btn.enabled=true;
install_btn.enabled=true;
trinity_btn.enabled=true;
tenant_btn.enabled=true;
HCM_btn.enabled=true;
DSG_btn.enabled=true;
customHIFI_btn.enabled=false;
MarchMad_btn.enabled=false;
GottaGo_btn.enabled=false;
Select_btn.enabled=false;
Semper_btn.enabled=false;
Model88_btn.enabled=false;
Posters_btn.enabled=false;
Booklet_btn.enabled=false;
Manuals_btn.enabled=false;
Logos_btn.enabled=false;
GLTC_btn.enabled=false;
NUCCJ_btn.enabled=false;
JHPAC_btn.enabled=false;
JHRoad_btn.enabled=false;
SndWks_Man_btn.enabled=false;
PDock_btn.enabled=false;
DT51Man_btn.enabled=false;
FPS2000_btn.enabled=false;
Kent_btn.enabled=false;
gotoAndPlay("csw_install");

Buttons Inside Buttons - My Monkey
I am creating a site for children which has flash buttons. One button is a monkey and it needs a drop down list to appear on mouse over.

Currently, the on mouse over even plays the movie clip.

Within that clip I have added a menu with 3 buttons in it but when I mouse onto the menu the monkey returns to its old state and goes crazy.

It can be found here http://www.framcottages.co.uk/monkey...uide-help.html

The FLA file is here : http://www.framcottages.co.uk/monkey...guide-help.fla

I tried calling a mc into a container but I had no luck.

I need to be able to have the monkey move and then select one of the three options on the menu.

Any help is greatly appreciated.

Ian

Active Buttons Under Invisible Buttons
i have a file that has the stage divided equally by 2 invisible buttons (left and right) a script plays different portion of cursor movieclip depending on which invisible button mouse is over.

Problem is that behind the invisible buttons is another movieclip (wider than the stage - the image movieclip pans horizontally) I want to have some easter egg rollovers and links WITHIN the image movieclip - but the invisible buttons are sitting on top so the buttons in the image don't work

Am I just outta luck? or is there a way around this?

Buttons Buttons Crazy Buttons
Hey guys ..
lots of development on the site thanks to everyone who has helped me ..
i have some simple questions though. I have some menu buttons that can appear and reappear. When clicked on say " bio" then the first set of buttons goes away and the new set of buttons appears. i have a button that toggles the menu buttons and this is my problem.
When i am in the "bio" movie clip i want the "menu" button to be disabled.
*Does any one have any clue on disabling buttons once a certain moveiclip has started?
*Does any one also know how to make a picture saveable and downloadable?
thanks
Peter

if you need to see what i am talking about email me at
peter769@hotmail.com
and i will email you my site.
thanks again

Buttons, Buttons, Buttons... And Problems.
Hey everyone,

I have a dilema. In making this really fun menu for my site I have a large button that opens and closes the menu tab, however I cant figure out a way to keep the menu tab open when choosing a section on the menu. Confusing? I know.

Lets say MenuButton is the button that opens/closes the menu:

on (rollOver) {
_root.menuMC.gotoAndPlay(2);
}
on (rollOut) {
_root.menuMC.gotoAndStop(1);
}

Well on the menu are 6 other buttons (SectionButton) that lead to various parts of the site. When you roll from the MenuButton to SectionButton (in the middle of MenuButton), the menu closes because the mouse is no longer technically on MenuButton... I need to know how to say to the MenuButton:

on (rollOut) {
_root.menuMC.gotoAndStop(1);
unless
the mouse is on SectionButton
}

And I cant. is it 'else' or something? Anyone who can solve this puzzle gets huge respect from me. Thank you!!

Copies Of Flash Buttons - Edit Each One? How To Edit Multiple Copied Buttons
I am creating a website using a flash template, my first venture into flash. The side links are all flash, where I had to add about 5 additional buttons. So I copied one of the buttons and pasted multiple copies of it. I was able to reposition each one correctly so they are move correctly. But I can't figure out how to edit each one individually? Any change I make to one, is made to all of them as well.

I am using Flash MX 2004 and any help is greatly appreciated!!

Thanks!!

Pete

Help Navigation Buttons Replay My Sound And Mess Up My Sound Buttons
Ok, let’s try this again first I have my two on/off sound buttons in a movie clip.

You open it up and you see 10 frames the first five for on, and the last five for off.

Each part contains both buttons, the first the on is highlighted and the off is coded, the second the off is highlighted and the on is coded.

In the first part my code for the “off “button is:

on (release) {

//stopAllSounds Behavior
stopAllSounds();


//Movieclip GotoAndPlay Behavior
this.gotoAndPlay("6");
//End Behavior
}

In the second part my code for the “on” button is:

on (release) {

// Play Sound Behavior
_global.Behaviors.Sound.coolsound.start(0,1);
// End Play Sound Behavior


//Movieclip GotoAndPlay Behavior
this.gotoAndPlay("1");
//End Behavior
}

I also have an action layer above each with the stop code for each part.

The music loads and plays fine when I run my movie. It stops and starts with the buttons and they seem to work fine. My problem is whenever I hit a navigation button on my main timeline it re-starts my music again, instead of it staying off.

I tried other sound button tutorials besides this one and they all end up with the same problem. Other buttons in my movie (main my main navigation buttons re-start my sound again when it goes to the next scene or page. In some cases other buttons have replayed the sound over one that’s already playing depending on which tutorial I use. So how come no matter what tutorial I use, other buttons can restart or effect my sound and its buttons?

Disabling Buttons Under Buttons?
Hello there,

I need to stop a button from being clicked when a new button ( within a movie ) appears on top of it.

The whole thing is done in levels with the first button on level3 ( an add to cart thing ) and the second button on level4 ( the actual cart being displayed ).

At the moment when the user clicks a button on the cart, any button under is also activated. I cannot just move the level3 buttons as they appear randomly and there are too many items to just have a clear area.

Any ideas?

Thanks for any help

Planethouse

Drop Down With Buttons And More Buttons
this seems very very simple as it is used everywhere, but damn if i can get it to work! i have a button on the stage that on 'over' shows a drop down list. when you roll down the list, the 'trial' new button i am using just flashes over and over like it is looping the first frame. no action...like the 2nd button never moves to 'over' etc. i remember in 5 that you couldn't put buttons in buttons...was hoping my MX would help me out with that. i'm soooo stuck and frustrated! does it need to be a movie clip with the button in the clip? i looked at some action scripts, but when i hit the 1st button, it says "Current Selection can not have actions applied to it."
Any help would be greatly appreciated...i'm up all night to try to make my 'impressive' presentation tomorrow. arrrrgh!

Thanx!

Buttons Layers And More Buttons?
I have a calander basicly a grid of buttons when you click a on a day a popup window mc apears above the grid here you can add a event for that day. the problem is that the buttons in the leyer bellow are still clickable through the popUp mc (the pop up mc is is a square with a few form fields and and a submit button ) if some clicks a little of from the text field they click the calender buttons bellow. is there a way to prevent this.

thanx dave

Help - Buttons Not Working As Buttons
Hi

I have a movie clip that I have used quite a lot through out my movie. It consists of an invisible button over content that changes depending on info loaded from a db.

If I put an instance of this clip in another movie clip that is dynamically laoded from the library at run time it is fine, when I roll over the button the mouse turns into a hand.

If however I load lots of these movie clips into the second movie clip at run time (which I want to do) the buttons do not work and the mouse does not turn into a hand on roll over.

Any ideas why? It's stumpde me for hours.

Giles

Buttons On Buttons Problem :(
im trying to create this popup nav that shows and hides - but the problem I have is that the activation button for the tab is over the buttons within in - thus cancelling them out

does anybody know how I can overcome this?

Ive attached a sample file

thanks for your help

Inserting Buttons In Buttons?
This probably sounds terrible, but I am wondering how i can make a button that in its mouse-over or down state opens a navigation menu, whose items, when on mouse over, on their turn list a number of items from which a visitor can choose. The kindof thing that you get when you go to the Windows start button of your PC.

I know a little Flash (the real basics...) and nearly no HTML and now I have been trying to figure it out in Dreamweaver, but though I learned a lot, I'm getting depressed searching, and I really want to make this work. So if anyone knows a good tute on this, I would be very gratefull,

thanks in advance,

Gayle

Nested Buttons? / Buttons Within Mc's
Hi,
Im trying to put together a simple navigation with 10 standard text buttons that change color on roll over. The only complex part is i have an arrow icon that scrolls along side as a person scrolls up and down the list of buttons. This requires i put all the buttons into a movie clip which has on (rollOver) / on (rollOut) commands on it. For some reason when i do this the individual buttons within that mc dont react, i.e. they dont change color on rollover and all act as one big button. I tried making it one big button with the individual links inside it but that worked even worse... any ideas? I can post the swf online if ya need to see it... Thanks for any help or advice!

Paul Famiglietti

Buttons Sound& Off/on Buttons
Hi

First, i have buttons but i don't know where exactly to put their sounds in case of rollover.

Second, i want to make the on/off button but i don't know how to do it and where to put the background sound coz' i have the stop action on the main time line after 5 frames, and the least sound will take around 30 frames at least.

also if you know where to get the speaker img, will be much appreciated

Thanks

Buttons Inside Buttons
How do you get the curser to see buttons inside of buttons? I have a movieclip that is setup like a button for a cool effect, but then inside of this movieclip I have buttons, and the curser only sees the movieclip and not the buttons inside of it. I am thinking that this might involve the Mouse.addlistener command or something, Any help would be appreciated. Thanks

Buttons To Activate Buttons?
Hey Gang,

Lots of great advice coming through these pages, and as a fellow Flash developer, I thank everyone for their extended knowledge!

I'm trying to avoid getting redundant in my code programming, (meaning having to change the same thing in 6 places) - so here's my question:

Can you make buttons activate OTHER buttons?

I've got 3 buttons configured (using the code button.onRelease = function() etc.) to update things individually. Now, instead of grabbing all the code and putting it into a single button, is there a way to virtually 'activate' these three buttons with the push of one?

Thanks in advance!
MrGameShow

Buttons Controlling Other Buttons
Is it possible to have buttonA control buttonB and vice versa?

For example when you scroll over buttonA, it will move to its own "over" frame, and buttonB will do the same thing at the same time.

Simplified, scroll over buttonA, and buttonB goes to its over state as well.

I hope this makes sense...

Adding Buttons Into Buttons
Hi,

I'm practicing my flash skills(which are quite limited) and i want to duplicate an effect I saw(not for commercial use) on a site.

What I have is this rollover/rollout effect that i guess is a button but i added 2-3 links within it that come up upon rollover that i want clicked on.

You can view it here on my friend's server:
www.abstround.com/tests/site.swf

The about/menu/gallery/etc... links don't work. I guess Flash doesn't know which to read since the entire circle and those links that are in the expanding circles are buttons to.

How can I get through this anyone have an idea?

Copyright © 2005-08 www.BigResource.com, All rights reserved