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




Multiple Buttons Fade



I'm pretty new to AS3. I'm writing the script... or at least trying to write the script... so when one button is rolled over, the other two on the screen fade out. At the same time I'm going to have text that corresponds to the button fade in. I would like to use an array for the buttons, if at all possible. The buttons are movieClips with actions for the fade in and fade out transitions on their own timelines. Can anyone help?current start code:
Quote:




stop();pen_mc.buttonMode = true;bulb_mc.buttonMode = true;mic_mc.buttonMode = true;var btnArray:Array = new Array(pen_mc, bulb_mc, mic_mc);function enterPage(evt:Event):void {evt.target.gotoAndPlay("enterPage");}




Thanks in advance.G



ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0
Posted on: 03-17-2008, 04:26 PM


View Complete Forum Thread with Replies

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

Multiple Buttons: Fade Out Issue
The buttons share same tween class alpha function to fade out particular instance. The function only works when mouseover any first button and then can't get the function to work again if mouseover another button afterward. Any suggestion?


Code:
import mx.transitions.Tween;
import mx.transitions.easing.*;

function box(easeType) {
var begin = 100;
var end = 0;
var time = 0.2;
var mc = _level10.box;
boxTween = new mx.transitions.Tween(mc, "_alpha", easeType, begin, end, time, true);
}

button1.hit.onRollOver = function() {
box(mx.transitions.easing.Strong.easeOut);
}

button1.hit.onRollOut = function() {
_level10.box._alpha = 100;
}
}

button2.hit.onRollOver = function() {
box(mx.transitions.easing.Strong.easeOut);
}

button2.hit.onRollOut = function() {
_level10.box._alpha = 100;
}
}

[fcs3] External Mp3s, Multiple Play Buttons,1 Stop Button With Fade Out - Please Help
Hey Guys,

I've been trying to set up an Soundboard as a personal project where I have about 30-40 buttons, which each are linked to an external mp3.

Currently I have it set up as 40 Separate Play and Stop Buttons using the code below. Now I'm not sure how to do this next part, but how can I modify this code, to have only 1 Stop Button for 40 Separate External Mp3 Files. (Please Don't Suggest stopAllsounds(); like someone did on another forum, that's not want I wanted)

I First Posted this on here on August 9th, and had no help, and I'm hoping that this time I can get some help for this.

On the Frame/Button:


Code:
Sound = new Sound(this);
theme.loadSound("song1.mp3");

on(release){
theme.stop();
theme.start(0,1);
}



On The Stop Button:

Code:
on(release){
this.onEnterFrame = function(){
so = _root.theme;
rate = 5;

newVolume = so.getVolume() - rate;
if(newVolume > 0) {
so.setVolume(newVolume);
} else {
so.setVolume(0)
so.stop();
so.setVolume(100);
this.onEnterFrame = null;
}
}
}

on(keyPress "<Space>"){
this.onEnterFrame = function(){

so = _root.theme;
rate = 5;

newVolume = so.getVolume() - rate;
if(newVolume > 0) {
so.setVolume(newVolume);
} else {
so.setVolume(0)
so.stop();
so.setVolume(100);
this.onEnterFrame = null;
}
}
}

Multiple Fade In Fade Out Events On Different Sentences From A Text File?
Hi there

i've just learned to use flash to produce a flash doc that displays the tibetan mind training slogans. they're basically 59 sentences: be a child of illusion, always maintain a joyful state of mind etc etc.

anyway, i'm wondering if anyone knows how i can make it easier to achieve this. at present i've done it by creating individual fade in fade out events along a time line. but it strikes me that it should be possible to create just one fade in, fade out event and get flash to apply this event to all subsequent sentences. even better would be if i could just get flash to pull each sentence from a plain text file. does anyone know how to do this? maybe actionscript can do this. then it would be easy to create a flash file for learning anything from vocabulary to history quotes!

you can view it here:
http://www.geocities.com/tamsin_dev...saverfinal7.swf

here's the flash file
http://www.geocities.com/tamsin_dev...saverfinal7.fla

also, how can introduce a random element into this, so that any of the 59 slogans will be picked.

if you need any further info please contact me at tamsin_devas@yahoo.co.uk i can send you the slogan source files as well if you want.

eventually i want to create a screen saver.

thanks for any help you can provide. i'll write your name in tibetan if you want.

tamsin

Fade In / Fade Out Multiple Movie Clips - Help Me
I have a flash website that is setup linearly into different sections. Lets call them Section 1 through 5. The page is divided in two. On the left side is my navigation. On the right side is my content. On the left side behind my buttons is a picture. I have 5 different pictures, 1 for each section. So, what i want to do is when you click on a button and go to a new section I want it to fade-out the bottom picture and fade-in the new picture and take you to the new content section.

Anyone know how to do this? I don't know much actionscript, but I'd like to do this w/o having to make a ton of movie clips.

I've been messing with this all day...Please help.

Thanks
IJoeR

Fade In Fade Out On Multiple Sentences
Hi there

i've just learned to use flash to produce a flash doc that displays the tibetan mind training slogans. they're basically 59 sentences: be a child of illusion, always maintain a joyful state of mind etc etc.

anyway, i'm wondering if anyone knows how i can make it easier to achieve this. at present i've done it by creating individual fade in fade out events along a time line. but it strikes me that it should be possible to create just one fade in, fade out event and get flash to apply this event to all subsequent sentences. even better would be if i could just get flash to pull each sentence from a plain text file. does anyone know how to do this? maybe actionscript can do this. then it would be easy to create a flash file for learning anything from vocabulary to history quotes!

you can view it here:
http://www.geocities.com/tamsin_deva...averfinal7.swf

here's the flash file
http://www.geocities.com/tamsin_deva...averfinal7.fla

also, how can introduce a random element into this, so that any of the 59 slogans will be picked.

if you need any further info please contact me at tamsin_devas@yahoo.co.uk i can send you the slogan source files as well if you want.

eventually i want to create a screen saver.

thanks for any help you can provide. i'll write your name in tibetan if you want.

tamsin

How To Fade In/Fade Out Multiple Pictures ?
I got a major problem here.Pls help. First I would like to fade in/out pictures everytime I press on different button. These button will determine which picture I will see. Secondly, I can click on any of these button and yet be able to see the fadein/out effect no matter which picture I am in. Thirdly,If I have another set of picture and if I decided to go to another set of pictures, I should be able to keep the same view that I previouly have but this time round with the new set of picture.

MULTIPLE SOUND (fade-in/fade-out)
Hi guys,

I have this problem. I would like to have background track playing on a flash-site. And when you click to load in en external page I would like another track to fade-in to "join" or "add" to the previously existing track with, lets say a little guitar flicks. And of course, fade-out when you change page...

How would I go about to do this?? Anyone??

/Dexner

MULTIPLE SOUND (fade-in/fade-out)
Hi guys,

I have this problem. I would like to have background track playing on a flash-site. And when you click to load in en external page I would like another track to fade-in to "join" or "add" to the previously existing track with, lets say a little guitar flicks. And of course, fade-out when you change page...

How would I go about to do this?? Anyone??

/Dexner

Fade In/Fade Out Of A Movie Clip Of Buttons.
I have a movie clip that contains 6 buttons. I've put that clip on a layer and wish for the entire button wheel of buttons to fade in when it's moused over.

I put the buttons into a movie clip hoping that I could fade it in and out based on a mouse over, however when I do that with actionscript (using the movie clip name and things like onRollOver and onEnterFrame) I end up losing the functionality of the buttons.

I'm calling my movie clip that holds the buttons _buttonWheel

I'm using ActionScript 2.0 in Flash 8.

Is there a way to fade a movie clip of buttons without losing the functionality of the buttons contained inside the movie clip? I'm fairly new to advanced actionscripting. So I could use some pointers.

I can send the clip if needed.

Thanks,

Jody

Buttons To Fade In And Fade Out Movie Clips
Sorry if this seems rudimentary to everybody, but I’m trying to write a script for a web page (possibly tween?) that uses several different buttons to control movie clips that fade in and fade out. All the movie clips are in the same location on the stage. so the clip that is present needs to fade out when another button is pushed and a new clip fades in. This website has a great example of what I’m looking to do.

http://jchawaii.com/v6/boards.php

Help Fade In And Fade Out Movie Clip With Buttons
I’m trying to write a script for a web page. Probably using tween classes that uses several different buttons to control movie clips that fade in and fade out. All the movie clips are in the same location on the stage so the clip that is present needs to fade out when the next button is pushed.

This website has a great example of what I’m looking to do.

http://jchawaii.com/v6/boards.php

How To Make Buttons Fade On Fade Out?
Hello all, been reading posts on here for a while, but decided to sign up as I need a bit of help.

Somebody has asked me to replicate the navigation found on this site:


Nowadays I tend to use photoshop and dreamweaver more than flash. Can someone give me a rough guide on how to do it? I can make the fading out movie clip, but it's just a case of telling the button to do that on release of it!

Uploaded the file here for anyone who can help


password: actionscript


Thanks

Thumbnail Buttons: Fade In, Fade Out
I tried searching for a topic similar to this. Hope I'm not repeating. I'm trying to find a way in Flash 8 to make an image fade in when its thumbnail counterpart is clicked, then fade out and get replaced by a different image when another thumbnail is clicked. The fade in-fade out part is no problem. The problem is how to get these linked to specific thumbnails/buttons using action script. I'm not versed in action script, but wouldn't it be something like "load movie clip on release" "unload movie clip on ?". Tried looking in tutorials, in the book, nada. I'm able to load the movie clip, but it simply keeps looping once loaded. Hopefully someone can help an action script doofus. I've included an image of how I'd like it work.

Multiple Fade In
please check this site: www.tizianodestefano.com,

once the flash player start two images are faded in in a way that I wish to reproduce on my site, anyone knows how that works?

Thanks,

Dario

Oop - Fade Color - Multiple
so i have developed some simple objects with simple methods to help my flash development.
one of the things my objects can do is change colors dynamically.
i tested it and it does work, until...

i used these things to create buttons, and then on roll over i say goToColor over or on roll out goToColor out.

the problem i am having is when i quickly go from one button to another, they fade a little and then stop and keep looping, cause the fading is done through the onEnterFrame event.

if it didnt change at all, i would think one thing, but it changes a little, and then doesnt complete.

can give code samples if needed, dont know what to think about why it would stop.

i have trace statements all around it and it says its applying the change, but it doesnt.

i dont know

Fade In/out Multiple Pictures
I would to fade in /out different picture in different sequence. For example, when I click on a button called Pic 2, Pictures 1 will fade out and pictures 2 will fade in and when I clcik another button called picture 3, picture 2 should fade out and picture 3 will fade in.The big problem that I have is that will happen if I am viewing pictures 3 and decide to go back to picture 1 ??.....picture 3 should fade out and picture 1 should fade in. How should I do all these....and tips.....Thanbks a million. !

[F8] Multiple Image Fade In-out
Hi,
I have used flash from time to tme in the past but never used actionscript.
I am now trying something with it. (Using Flash CS3 but ActionScript 2)

A banner with 4 image sets across it. A border around each one.
Each of them Image sets will have 3 images in it which i have held in an array.

I want each of the image sets to go through the 3 images with each image fading in/out with each images staying on the screen for 5/10 seconds.

The image change for the first set then .5 seconds later the 2nd set and so on.

So far I have the borders all drawn, I have created 4 movie clips which load the first image of each in the correct place.

I am having trouble with the fade in/out.
Could a function be created which coule be called from each instance to control the fade in/out of each image set.
Not sure how to do the time delay across the sets or to hold the image for the 10 seconds.

Any help/links to appropriate tutorials/code much appreciated.

Multiple MC Fade In Problem
I have a swf that contains 20 movieClips. Im loading this swf into a holder clip on the main movie. each MC has the code below. Each movieclip is set to a differant speed to fade in.

onClipEvent (load) {
_root.btn18._alpha = 0;
}
onClipEvent (enterFrame) {
_root.btn18._alpha+=10;
}

My problem: the swf in previewed works great with fade ins, but when I load it into another MC it just pops up. I want random fade in speeds for each thumbnail clip. Does this make sense? How might I make this work?

thanks
J

How To Fade Multiple Images In And Out One After The Other?
Hi,

I'm trying to do something very simple here, and I need to get it done really quickly, so I don't have time to go through the usual learning curve / trial and error.

We're accredited with many large organisations, and I need to make their logos fade in and out on our home page - fade in logo 1, fade it out again, fade in logo 2, fade it out again, etc.

I've imported 2 of the logos, and I managed to get the first one to fade in, then back out again, but I've NO idea how I actually did this, and can't for the life of me recreate it to make the 2nd logo do the same thing.

Please help!

TIA,
Jennie.


Fade Color To Multiple Clips
Hi! Im try to fade color to multiple clips with this famous code...
Ive tried with array but no result...any way or i duplicate the code for any clips?


Code:
var myCO = new Color(lollo);
myCO.setRGB(defaultHex);
function fadeToHex(goalHex, steps) {
var nowHex = myCO.getRGB();
var nowRGB = hex2rgb(nowHex);
var goalRGB = hex2rgb(goalHex);
var stepRGB = {};...
Thanks and sorry for the lang!

sMAd

Fade Transition For Multiple Mc's Via TransitionManager
I have placed each of these mc's on their own layer and placed them in the first frame of their layers. I used the _visible = true/false property to show them when needed.

I want a Fade transition to occur when the next mc is visible. So from mc1 to mc13 they will play in a linear fashion and Fade in-between visibility.

I cannot find how to have multiple mc's use the Fade transition and I can only get the transition to work with Fading IN or OUT not both. I would like to have the mc Fade IN then when the sound is complete, it would Fade OUT and the next mc would Fade IN and so on through out all 13 mc's.

Any help would be greatly appreciated.

Multiple Buttons Multiple Popup Windows?
I have several buttons on one page. I would like each button to access a new popup window with different window sizing. All the tutorials I've seen here only show the ability to open one popup window. Can this be done?

Digiblu

Multiple Buttons Multiple Movie Clips - PLEASE HELP ME
Hello -

QUICK BACKGROUND: I am working in Flash MX. I have used Flash for over 3 years, however, I am still struggling with Action Scripting. I plan to take some advanced courses this Autumn.

THE PROJECT AND PROBLEM: I am working on a large Flash site for a cosmetic dentist. I have multiple buttons and when you rollover the button, it will play a movie clip. I got this to work okay.

EXCEPT, I want the movie clip to stay in place and then go away when you click on the next button. Currently, I do not really have any Action Scripting involved except for a few STOP actions. The movie clip is attached to the "OVER" state for each button.

I have attached the .fla file for anyone who can take a few moments to review it. I am really at a stand-still and ready to have a nervous breakdown trying to figure this out. I have been up until 3am every night for the last 4 nights researching this and I have come close but still have not figured it out.

Any help is GREATLY APPRECIATED!!

Denise

Issues With Multiple Possiblities With Multiple Buttons
here's what I've got:

three buttons (oneBtn, twoBtn, threeBtn). Click a given button, and onRelease a movie clip (noOne, noTwo, noThree) slides from x position 150 to x position 450.

here's what I want to happen:

say movie clip noTwo is already at position 450. When you click oneBtn, clip noTwo slides left to position 150, while clip noOne slides right to 450. And so on, ad nauseum.

I've tried a number of different ways to attack it as an if/else, and/or, etc. Nothing works right.

I'm attaching a . zip with the .fla. I'm using MX 2004, AS 2.

thanks!

Multiple Radio Buttons/Multiple Choices
I want to create a screen that has 4 radio button groups. Once choices have been made for each group, I need to store those choices somewhere so that when a submit button is selected, it will run a specific movie clip based on the choices made. The choices can be any combination of the buttons (I have already created the movie clips that will run).

This is to run scenarios based on data already collected. The button groups include: Pump Operation (1, 5 or 6 pumps), Tide Cycle Type (typical, wet year or dry year), Debris Load (high, mid or low), and Fisheries Criteria (salmon or other). The choices run a simple animation through a complete tide cycle, and once the animation has been run, the user can select any portion of the tide cycle to see specific information (changing data is displayed for each portion of the tide cycle).

I'm sure I'm overlooking something really simple, help is greatly appreciated!

Issues With Multiple Possiblities With Multiple Buttons
here's what I've got:

three buttons (oneBtn, twoBtn, threeBtn). Click a given button, and onRelease a movie clip (noOne, noTwo, noThree) slides from x position 150 to x position 450.

here's what I want to happen:

say movie clip noTwo is already at position 450. When you click oneBtn, clip noTwo slides left to position 150, while clip noOne slides right to 450. And so on, ad nauseum.

I've tried a number of different ways to attack it as an if/else, and/or, etc. Nothing works right.

I'm attaching a . zip with the .fla. I'm using MX 2004, AS 2.

thanks!

HELP Multiple Buttons Controlling Multiple Movies
I hope someone can either help, or point me in the right direction!

I am trying to do a little program for kids, where there make their own plants. They are to pick from several buttons; the petal, leaf size and stem size. Once they have done that, they have to then click sun and water. Only then does flash fetch the correct movie case that matches with the buttons pressed, and plays it.

My problem is this...i am a total newbie, and have no idea where to start! Any tips would be very appreciated, or if anyone has stumbled across any tutorials that might help, i would be very grateful!

thanks

Controlling Multiple Movies With Multiple Buttons
I am trying to use variables to control mulitple movies with multiple buttons (I think). I can get one button to control all the movies the way i want, but not ALL the buttons to control ALL the movies.

Take a look at the main menu on exopolis.com and you'll see the effect I'm going for

http://www.exopolis.com


I am also using the code from joshua davis' flash to the core (tutorial #8). I'm try to apply this same concept, but with mulitple movies and mulitple buttons.

http://flashtothecore.praystation.com


I have four movies named:

home_mc
work_mc
play_mc
contact_mc

Each movie has a button within them that declares a variable that will be true or false depending on the rollver state. (fade01,fade02,etc.)


In the root, first frame I have the following:


//handle the onEnterFrame event
_root.bt_home_mc.onEnterFrame=function(){
if(_root.fade01){
_root.bt_work_mc.nextFrame();
_root.bt_play_mc.nextFrame();
_root.bt_contact_mc.nextFrame();
}else{
_root.bt_work_mc.prevFrame();
_root.bt_play_mc.prevFrame();
_root.bt_contact_mc.prevFrame();
}
};

//handle the onEnterFrame event
_root.bt_work_mc.onEnterFrame=function(){
if(_root.fade02){
_root.bt_home_mc.nextFrame();
_root.bt_play_mc.nextFrame();
_root.bt_contact_mc.nextFrame();
}else{
_root.bt_home_mc.prevFrame();
_root.bt_play_mc.prevFrame();
_root.bt_contact_mc.prevFrame();
}
};


//handle the onEnterFrame event
_root.bt_play_mc.onEnterFrame=function(){
if(_root.nav_mc.fade03_mc.fade03){
_root.bt_home_mc.nextFrame();
_root.bt_work_mc.nextFrame();
_root.bt_contact_mc.nextFrame();
}else{
_root.bt_home_mc.prevFrame();
_root.bt_work_mc.prevFrame();
_root.bt_contact_mc.prevFrame();
}
};


//handle the onEnterFrame event
_root.bt_contact_mc.onEnterFrame=function(){
if(fade04){
_root.bt_home_mc.nextFrame();
_root.bt_work_mc.nextFrame();
_root.bt_play_mc.nextFrame();
}else{
_root.bt_home_mc.prevFrame();
_root.bt_work_mc.prevFrame();
_root.bt_play_mc.prevFrame();
}
};



On each button I have the following (except the variable is unique....fade01, fade02, etc)


on(rollOver){
_root.fade01=true;
}
on(rollOut, dragOut){
_root.fade01=false;
}




Please help. This is for a personal project. If you need my fla file, i can send it to you. Thanks

Fade In Fade Off Buttons
Hi,

I am working on my portfolio site. I have a probelm with my navigation.
I have 3 buttons profile, about and contact.
what I am doing is when I click on profile all the buttons should fade off first and then only the about and contact button should appear on the scene.

please see my code.


ActionScript Code:
bt_1.onRelease = function(){
 
 this.onEnterFrame = function(){
 if(bt_1 >= 0){
 bt_1._alpha -= 10;
 }

 if(bt_2 >= 0){
 bt_2._alpha -= 10;
 }
 if(bt_3 >= 0){
 bt_3._alpha -= 10;
 }


}

This is the code for fade off all the buttons. Now I want to fade in only the bt_2 and bt_3 buttons. Is it possible

Fade In Fade Off Buttons
Hi,

I am working on my portfolio site. I have a probelm with my navigation.

I have 3 buttons profile, about and contact.
what I am doing is when I click on profile all the buttons should fade off first and then only the about and contact button should appear on the scene.

please see my code.


bt_1.onRelease = function(){

this.onEnterFrame = function(){
if(bt_1 >= 0){
bt_1._alpha -= 10;
}
if(bt_2 >= 0){
bt_2._alpha -= 10;
}
if(bt_3 >= 0){
bt_3._alpha -= 10;
}

}


This is the code for fade off all the buttons. Now I want to fade in only the bt_2 and bt_3 buttons. Is it possible

Button Function To Fade Multiple Movieclips
At the moment I am fading out a movieclip on button press,
however I want to fade out multiple movieclips, not just the one.
I've tried using an array for the movieclips I want to fade, without success.

So if I were to fade m1_bg, m2_bg, m3_bg and so on... how would I need
to change the code?

Here's what I have working with one movieclip:

import mx.transitions.Tween;
function setUpButtons():Void {
main.m1.m1_bg.l1.onPress = function() {
if(main.m1.m1_bg._alpha ==100){
fadeMovieClip(100,0);

}
}
}


function fadeMovieClip(startAt:Number, endAt:Number):Void{
var myTween:Tween = new Tween(main.m1.m1_bg, "_alpha", mx.transitions.easing.None.easeNone, startAt, endAt, 2, true);
}

setUpButtons();

Using One Method To Fade In Multiple Movieclips Simultaneously?
why is it that when i use the MovieClipLoader class to load multiple objects simulataneously, i cannot fade them in using a method (which i call fadeIn which basically invokes an onEnterFrame method)? like, when they're done loading they're supposed to fade in, but they don't, except for the first thing i load. it doesnt work at all for anything else that loads. is there some alternate solution or am i just missing something?

How Do I Make Multiple Lines Of Text Fade In And Out?
I have been pulling my hair out about this. What I want to do is make several lines of text fade in like this:

1. sample text 1 (this should appear as nothing in the first frame and then gradually fade in to show the text by let say frame 5)

2. Keeping sample text 1 in place underneath that comes sample text 2 but in frame 5 it is the same thing. You shouldn't see sample text 2 until frame 10

3. same thing with the third and fourth lines of text all of them easing in gradually so by the end of the 4 line of text (I am guessing by frame 20 or so) the full message should appear.

Did I make any sense?

Actionscript Cross Fade Multiple Pictures
hi all well I am creating a movie and in the backround I want to have a series of 16 images crossfade between eachother showing one at a time for at least 2 to 3 seconds each I want to do this in actionscript though coz if I use a regular tween the rest of my movie slows down, I can put the pics directly into the library or load them dynamically it doesnt really matter for me can someone please help me??

WiKfx

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

Need Sound Fade Function To Work With On/Off, MULTIPLE TRACKS
Alright, I'm not a coder, I do graphic design. Recently at work where I do graphics I got stuck with a project that involves intermediate or above coding skill, I spent 3-6 hours just getting as much together as I did to SORTA make this work, just the sound portion, but now when I'm trying to finish it up I can't.

In this file, I would like it to start with the main song, which is linked as scrape1 I believe. When a user hits MODELS and one of the 5, scrape2 or scrape3 play for each, fading in and fading out, major help from this forum for that code, of course I can't do it I've only taken website and graphics classes. The sounds work just fine, only problem now is the ON/OFF button. The Off fades out (I made a blank sound so it fades to scrape60 or something which is 1 second of empty repeated). What happens though is when you hti another model it fades back into the sound, and I want it to stay silent until they hit "ON". I really need a reply by Friday because my boss is a little upset with me over this. The client needs it by Friday and I'm having a hard time doing this being a newb at coding.

I am sorry for the major file size, I have to clean up the unused things. THANK YOU SO MUCH FOR YOUR HELP!

index-kris (20 megs)

Applying A SetInterval Fade Function To Multiple Duplicated Movieclips
After duplicating a movieclip and positioning them on the stage, I would like to have them all individually fade in, stay for a period of time, then fade out. I have a fade function that uses setInterval and works perfectly for one movieclip, but I can't get it to work for each in a series of duplicated movieclips.

I tried to do this using a for loop that references the unique ID of each movieclip (see commented out code), but it didn't seem to work. Perhaps there is a way to use a for loop to pass the movieclip ID into the fade function?

Following is the code I used (which applies the fade, as I intended only to qDup0, because I commented out the loop that calls all movieclip IDs):

CODE:

Code:
//variable declaration
var fadeOutSpeed = 12;//speed of q movieclip fade out
var fadeInSpeed = 12;//speed of q movieclip fade in
var xPos = 0;//initial x Position of q movieclip
var yPos = 100;//initial y Position of q movieclip
var qAlpha = 20;//initial alpha of q movieclip
var displayTime = 1000;//duration in ms that q remains before fade out
var quantityQ = 5;//total number of q to render onto the stage
var maxQalpha = 60;//sets maximum alpha that q gets to

//duplicate and position movie clips
dupQ = function () {
for (i=0; i<quantityQ; i++) {
qDup.duplicateMovieClip("qDup"+i, i,
//set position, alpha, and size/scale of q movieclips
{_x:xPos+(i*50),
_y:yPos,
_alpha:qAlpha});
with (eval("qDup"+i+".qShape")) {
//set size/scale of each movieclip
_xscale = 20;
_yscale= 100;
}
}
};
dupQ();

//code to fade q and keep it on the stage for a certain length of time (thanks kglad!)
function fadeF(dir) {
//for (i=0; i<quantityQ; i++) {
//qDupID = "qDup"+i;
if (dir>0) {
qDup0._alpha += dir*fadeInSpeed;
if (qDup0._alpha>=maxQalpha) {
clearInterval(fadeI);
startFOutI = setInterval(startFOutF, displayTime);
}
} else {
qDup0._alpha += dir*fadeOutSpeed;
if (qDup0._alpha<=0) {
clearInterval(fadeI);
}

}
//}
}
function startFOutF() {
clearInterval(startFOutI);
fadeI = setInterval(fadeF, 50, -1);//initiates fade out
}
fadeI = setInterval(fadeF, 50, 1);//initiates fading functions

My Fade Out / Fade In Script. Fade Out Works, Why Not Fade In? Any Ideas?
Hello all,
Hopefully this is just a simple problem with my code.

I have a container on the stage. When the loaded clip gets to the last frame it triggers the decreaseAlpha() function on the root level. This fades the current container out and works fine.

However I also want it to load the next clip(which it does) and fade that clip in. This doesn't work. It doesnt' fade in, can anyone point me in the right direction?

Thanks!!



Code:
function decreaseAlpha(boxName, clipName){
boxName.onEnterFrame = function(){
if(boxName._alpha > 0){
boxName._alpha -= 15;
}if(boxName._alpha < 5){
delete boxName.onEnterFrame;
increaseAlpha(boxName, clipName);
}
}
}
function increaseAlpha(boxName, clipName){
loadMovie(clipName, boxName);
boxName._alpha = 0;
boxName.onEnterFrame = function(){
if(boxName._alpha < 100){
boxName._alpha += 15;
}if(boxName._alpha == 100){
delete subboxName.onEnterFrame;
}
}
}

My Fade Out / Fade In Script. Fade Out Works, Why Not Fade In? Any Ideas?
Hello all,
Hopefully this is just a simple problem with my code.

I have a container on the stage. When the loaded clip gets to the last frame it triggers the decreaseAlpha() function on the root level. This fades the current container out and works fine.

However I also want it to load the next clip(which it does) and fade that clip in. This doesn't work. It doesnt' fade in, can anyone point me in the right direction?

Thanks!!


Code:
function decreaseAlpha(boxName, clipName){
boxName.onEnterFrame = function(){
if(boxName._alpha > 0){
boxName._alpha -= 15;
}if(boxName._alpha < 5){
delete boxName.onEnterFrame;
increaseAlpha(boxName, clipName);
}
}
}
function increaseAlpha(boxName, clipName){
loadMovie(clipName, boxName);
boxName._alpha = 0;
boxName.onEnterFrame = function(){
if(boxName._alpha < 100){
boxName._alpha += 15;
}if(boxName._alpha == 100){
delete subboxName.onEnterFrame;
}
}
}

Fade Up Buttons
Hello, I'm wondering if anyone can help me out there. I'm creating a rollover button that has an alpha effect of 70% laid over a bitmap image to give the effect; which when rolled over will fade to an alpha of zero in turn revealing the bitmap below. My problem is that I can't get the rollover right. I have tried creating a movie clip of the fade and drop it into the over state of the button but it doesn't work. I have also tried to create a basic script action to do this but that has also failed.....can anybody help me??????

Thanks

Buttons That Fade Out
how do i make those cool buttons that fade out after you roll off of them?

Fade In Buttons
Greetings!
I'm trying to fade in a button that has this behavior:

on (release) {

//Movieclip GotoAndPlay Behavior
gotoAndPlay("scn2_frm1");
//End Behavior

}

My main timeline only has one frame, lot's of layers.
The problem is, when I convert the button to a movie symbol,
and edit off the main timeline to fade in at the right spot
by adding lot's of blank frames,
The behavior doesn't work anymore.
It stops loading scene 2.
I had put a stop action on a second layer of the button movie clip.
Could that be affecting it? It needs to be there so the button is visible. Any advice or help?
Thanks so much.
J

How To Do Fade-Away Buttons
How did they do this, I know you put a movie clip as the over state, but how do tou get it to fade out?

http://www.tta.it/tta.htm

[f8] Fade Buttons In And Out
Hey guys,

I was just wondering how to make a button that both fades in and out. Now, I know you can create a movie clip symbol with the fade/effect on the Over state frame if it's a button symbol, but how do I make it do the opposite when the mouse is moved off the button area.

I'm guessing you can also make a movie clip with animation tweens and keyframes, stop();, gotoAndPlay etc. but then I can't attach the gotoAndPlay("framelabel") code required to make the button functional...

Kind of like the navigation buttons here or here

Thanks guys.

Fade Away Buttons
Hey there. I'm not quite sure where to post this, so I thought I couldn't go wrong asking here.

I'm using Adobe Flash CS4.

I want to create a button that instantly changes color when you hover over it (simple) but then when you hover back off of it, it fades back to it's original color slowly. I heard that this requires actionscript. I googled around but all I found was some outdated guides on how to do this, and I kept getting errors...

Can anyone help with this? I realize it's probably a question people ask all the time.

Thanks in advance

Buttons That Fade In
Hi. I'm trying to get buttons to fade in once a certain threshold has been met (using a button in a MC, as my main timeline is limited to 2 frames by another MC).


So, I've got a variable on the main timeline, and on the button MC, the first frame checks the variable; if it's > 3, play, else stop.

Can't figure out why this isn't working.


Sorry for the basic question. Appreciate the help.

Tom

Fade Buttons
Hey Everybody

I have a page with alot of logos (buttons) and I would want so when the mouse is over a logo all the others fade like 50% and when you move your mouse away they go back to 100%, This should be for every button on the stage. Thanks in advance

/Meatwad

Fade Buttons
Hey Everybody

I have a page with alot of logos (buttons) and I would want so when the mouse is over a logo all the others fade like 50% and when you move your mouse away they go back to 100%, This should be for every button on the stage. Thanks in advance

/Meatwad

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