[F8] Menu Fade By Seconds
Hey There all you experts
I have a menu. I have made so it fades in - in X amount og sec. but how do I do so that if the menu is not tuched in X amount of sec. it fade out again?
The menu is triggered by a button
I use this script for the fade in
PHP Code:
onClipEvent (load) {
loadTime = getTimer();
alphaTime = 2309; // This is the time it takes to fade in
}
onClipEvent (enterFrame) {
if (this._alpha=100) {
BG_mc = (((loadTime-alphaTime)+getTimer())/alphaTime)*100;
this._alpha = BG_mc;
}
}
Please help...
FlashKit > Flash Help > Flash ActionScript
Posted on: 11-09-2007, 03:31 AM
View Complete Forum Thread with Replies
Sponsored Links:
- How Do You Fade To A New Page After X Seconds
- Fade In After A Couple Of Seconds
- Fade In After A Couple Of Seconds
- [F8] Menu Fade In, Fade Out... The Easy Way?
- Timer Seconds Aren't Seconds On Fast Connection?
- How To Start A Sound At X Seconds And Stop At X Seconds?
- Convert Seconds To Minutes:Seconds
- Fade MC Menu
- Menu Fade Out
- Fade-menu?
- My Fade Out / Fade In Script. Fade Out Works, Why Not Fade In? Any Ideas?
- My Fade Out / Fade In Script. Fade Out Works, Why Not Fade In? Any Ideas?
- Oh, For God's Sake...(fade-down Menu)
- Fade In Drop Down Menu
- Menu Buttons Fade Help
- Fade Drop Down Menu
- Fade Drop Down Menu
- Menu Description Fade In - Help Needed
- Horizontal Menu Fade In And Out On Rollover
- Funky Menu When AS Fade Applied
- Horizontal Menu Fade In And Out On Rollover
- Funky Menu When AS Fade Applied
- FLVplayer Menu Alpha Fade
- Tokion Like MENU, Help Fade Away Mouse Trailer...
- Trying To Put A Downloaded Menu After A Fade Motion Tween.
- [MX04] Alpha Fade Menu Problems
- Menu To Fade In/Out New Background Images And Text
- Menu To Fade In/Out New Background Images And Text
- XML-Driven Drop-Down Menu - Fade In Items?
- Fmx 2004 AS Alpha Fade Other Menu Items
- Fade Video Menu Similar To ITunes
- Working With Scenes - Fade Out Depending Upon Menu Option?
- Minutes And Seconds From Seconds
- Alpha Fade In, Tint Fade In And Then Fade Out
- Alpha Fade In, Tint Fade In And Then Fade Out
- Alpha Fade In, Tint Fade In And Then Fade Out
- Actionscript To Load Random External Movie, Fade In, Wait, Fade Out, Repeat
- Newbie Question - Fade In Fade Out While Trning On And Turning Off A Music Loop
- Multiple Fade In Fade Out Events On Different Sentences From A Text File?
- AS2 - Refine My Code...it Sucks : Six Clips Fade. Rollover One...other Fade Out
- Help With "mouse Over, Fade In" Menu
- Photo Slideshow - Fade Out/fade In (alpha) - Flash5
- Actionscript To Fade In/fade Out Picture Depending On Frame?
- How Do I Create A Smooth Trasition Between My Pages - Fade Out / Then Fade In
- [CS3] My Code Sucks : Six Clips Fade. Rollover One...other Fade Out
- Xml Slideshow Fade In And Fade Out Assistance (code Supplied)
- Alpha Fade Image, Wait, Fade Out, Next Frame
- Dynamic Flash Fade In Fade Out Slide Show
- Fade Out And Fade In Bteween Scenes Or Movie Clips
- Refine My Code : Six Clips Fade. Rollover One...other Fade Out
- Photo Slideshow - Fade Out/fade In (alpha) - Flash
Fade In After A Couple Of Seconds
Hey,
I've been searching around these forums for a timer script and I haven't been able to get something that is quite what I want. I am trying to create a timer to fade in a dynamic textbox that is a dfferent size depending on the button. This is kind of complicated so if you got lost I am going to say it again a bit simplerly.
I have three buttons, and when you click each a box moves to the correct size.
I am trying to get a textbox that will fade in once the box has moved, proably about 3 seconds, and have the textbox a different size depending on the button.
When another button is clicked, it should fade out, and then the box should move.
You should understand what I'm trying to do when you look at the FLA. By the way, the textbox is going to have dynamic content from either a mysql or xml database.
View Replies !
View Related
Fade In After A Couple Of Seconds
Hey,
I've been searching around these forums for a timer script and I haven't been able to get something that is quite what I want. I am trying to create a timer to fade in a dynamic textbox that is a dfferent size depending on the button. This is kind of complicated so if you got lost I am going to say it again a bit simplerly.
I have three buttons, and when you click each a box moves to the correct size.
I am trying to get a textbox that will fade in once the box has moved, proably about 3 seconds, and have the textbox a different size depending on the button.
When another button is clicked, it should fade out, and then the box should move.
You should understand what I'm trying to do when you look at the FLA. By the way, the textbox is going to have dynamic content from either a mysql or xml database.
View Replies !
View Related
[F8] Menu Fade In, Fade Out... The Easy Way?
Hi people.
Im trying to make a menu that when u click a button the content fades on.
Now when u click another button i want the content to fade out and the new stuff in.
I can do this but i think im doing it the stupidly long way by jumping around the timeline to where i've made each and every animation for every page to page combination if that makes any sence.
Is there a way say - right no rewind the fade in a go to here.
Using flash 8 by the way
hope some1 can help
Much appreciated.
Stuart.
View Replies !
View Related
Timer Seconds Aren't Seconds On Fast Connection?
On my flash site at
http://www.yogashanti.com
there is a timer which displays my random quotes for arund 20 seconds, but on fast connections woooooah!
How do i resolve this without setting the seconds to a looong length of time (which would mean on dial-up connections each quote will be there forever.
I hope i made it clear what the problem is - sorry if it seems un-clear.
Many thanks in advance
Cesca
View Replies !
View Related
How To Start A Sound At X Seconds And Stop At X Seconds?
I'm trying to figure out how I can make the sound file that I load into Flash start at x seconds and end at x+30 seconds.
So basically, I just want a 30 second sample to play starting at a specific time position. Does anyone have any advice on how to do this or have links to somewhere I can read up on it?
As always, thanks for any help
-Ind
View Replies !
View Related
Convert Seconds To Minutes:Seconds
Hey guys,
I am currently using the following code to display the secconds of a FLV being played:
ActionScript Code:
time_txt.text = Math.round(_root.video_mc.videoZ.playheadTime*100)/100;
I need to change this to display MM:SS (minutes:seconds) rather than just seconds and decimals.
Any idea how I can do this?
The javascript people here at work suggested something like this:
ActionScript Code:
function strPad(str, places, pad, side) {
while (length(str) < places) {
if (side == "left") str = pad add str;
else str = str add pad;
}
return (str);
}
time_txt.text = Math.floor(_root.video_mc.videoZ.playheadTime / 60) add ":" add strPad(_root.video_mc.videoZ.playheadTime % 60, 2, 0, 'left');
Any help would be lovely.
Thank you!
Scott
View Replies !
View Related
Fade MC Menu
Can Someone give me a script where there are five buttons controlling five one movie clip each...I want that when a user clicks on a button the Movie clip appears through alpha. When he clicks on any other button the visible movie clip should fade out and the new movie clip appears..There is just one problem that u don't know what the user is going to click..hence u need a script...I guess...
And One more thing please give me a script which can be done in Flash 4.0
thanx in Advance
View Replies !
View Related
Menu Fade Out
HI,
Can any one tell me how to do this menu fad out in this site. the Menu is on the left hand site of the flash. On mouse over the entire menu is displayed. when the mouse is over the buttons the menu fades and while the mouse moves over the buttons the fadding happens.
THanks
View Replies !
View Related
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;
}
}
}
View Replies !
View Related
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;
}
}
}
View Replies !
View Related
Oh, For God's Sake...(fade-down Menu)
I've been working on this for a couple of days now for my brother's portfolio-and I can't seem to make it work. I don't even want to go into what happens when I turn the menu items into buttons-well ok, the top button (origin) just blinks. I'm really lost on this one. If anyone can figure this out, that would be great.
-The fade-down part of the menu is in the movie clip "drop".
Thanks for everything.
Rilian
View Replies !
View Related
Fade In Drop Down Menu
Hi,
Im trying to find a half decent tutorial which describes the steps in creating the drop down menu found on the Macromedia Flash Support Centre page. (http://www.macromedia.com/support/flash/)
I have found one tutorial similar to what I would like (http://www.flashkit.com/tutorials/Ac...-541/index.php) but I find it quite hard to follow the lingo of the author cos it seems like its been translated through the steps and I have never used Flash 5 which this particular tutorial is made for, Im using MX.
Does anyone know of the whereabouts of a tutorial for MX which would give me results close to what im after?
Thank you in advance.
View Replies !
View Related
Menu Buttons Fade Help
I'm trying to do a menu, where, when you mouse over one item, the others fade out to alpha 10. The problem is, the movie seems stopped, so each time I mouse over it, it darkens a bit, but I needed it to animate while the mouse is still over it. Maybe I need to do a loop, that checks if the mouse is still over the movieclip?
I'll post the code and the file here.
MyClip.onRollOver = function() {
MyClip._alpha -= 5;
if (MyClip._alpha <= 10) {
MyClip._alpha = 10
}
};
View Replies !
View Related
Fade Drop Down Menu
I have 3 movie clips that contain my drop down menus and are ontop of each other with space in between of course. I want it such that when 1 is open the other 2 to fade and one dropdown is open and only its buttons show.The other 2 are duplicates of the firsrt menu.can it be done pls help thx.
many thx!
View Replies !
View Related
Fade Drop Down Menu
I have 3 movie clips that contain my drop down menus and are ontop of each other with space in between of course. I want it such that when 1 is open the other 2 to fade and one dropdown is open and only its buttons show.The other 2 are duplicates of the firsrt menu.can it be done pls help thx.
many thx!
View Replies !
View Related
Menu Description Fade In - Help Needed
Hi,
I'm new here, so thanks for taking the time to help. What I want is a button that has a label. When it's pressed, another box of text fades in and stays there till another button is pressed.
What I have done so far is:
Created text and inserted a timeline transistion effect.
On the transistion layer I put a stop(); action, so it would not start the fade on it's own.
I created a button on a seperate layer and gave an action of
on (release) {
this.gotoAndPlay("1"); }
OK, it works as expected up until the fade is complete. Then the text disappears. I'm assuming it's going back to the first frame. I want it to stay visible until a different button is pressed. How can I make this happen? I've been messing with this for hours and getting nowhere but frustrated.
Thanks,
Tom
View Replies !
View Related
Horizontal Menu Fade In And Out On Rollover
Guys i have this menu that gets the number of buttons and subbuttons depending on the xml file. it attaches the buttons to an empty movie click. the same's happening to the subbuttons - they get attached to a different empty mc. everything works fine there. My question is how do make the subbutons in that mc to fade in on rollOver of a button one by one and then fade out again one by one on rollOut. I will probably need to set up some sort of a loop. just having a hard time on where to start. Can somebody sort of push me in the right direction? here are the fla and the xml files. Thanks guys.
[edit]bump..why can't we upload fla's anymore?
i know this is a lot to ask but the AS is attached in a txt file for anybody who can help
[/edit]
View Replies !
View Related
Funky Menu When AS Fade Applied
To explain my problem, checkout this example
http://www.frunder.com
Mouseover the flash link that says "<fs> Frunder Repeater"
Notice the mouseover effects of the 3 buttons. They work great individually, but when they are combined (3 pixels away from each other) the mouseout effects do not work. I have 3 different buttons with the following Action Script.
Code:
on (rollOver) {
this.onEnterFrame = function() {
if (testbutton_btn._alpha<100) {
testbutton_btn._alpha += 15;
} else {
// testbutton_btn._alpha = 20; //just to be sure but maybe not necessary
this.onEnterFrame = null;
}
};
}
on (rollOut) {
this.onEnterFrame = function() {
if (testbutton_btn._alpha>0) {
testbutton_btn._alpha -= 15;
} else {
this.onEnterFrame = null;
}
};
}
It works fine by itself, but when coupled with other buttons, it does not have enough time to Mouseout before the next buttons says Mouseover.
Any help or better code samples or suggestions would be phenominal!
Thanks!
View Replies !
View Related
Horizontal Menu Fade In And Out On Rollover
Guys i have this menu that gets the number of buttons and subbuttons depending on the xml file. it attaches the buttons to an empty movie click. the same's happening to the subbuttons - they get attached to a different empty mc. everything works fine there. My question is how do make the subbutons in that mc to fade in on rollOver of a button one by one and then fade out again one by one on rollOut. I will probably need to set up some sort of a loop. just having a hard time on where to start. Can somebody sort of push me in the right direction? here are the fla and the xml files. Thanks guys.
[edit]bump..why can't we upload fla's anymore?
i know this is a lot to ask but the AS is attached in a txt file for anybody who can help
[/edit]
View Replies !
View Related
Funky Menu When AS Fade Applied
To explain my problem, checkout this example
http://www.frunder.com
Mouseover the flash link that says "<fs> Frunder Repeater"
Notice the mouseover effects of the 3 buttons. They work great individually, but when they are combined (3 pixels away from each other) the mouseout effects do not work. I have 3 different buttons with the following Action Script.
Code:
on (rollOver) {
this.onEnterFrame = function() {
if (testbutton_btn._alpha<100) {
testbutton_btn._alpha += 15;
} else {
// testbutton_btn._alpha = 20; //just to be sure but maybe not necessary
this.onEnterFrame = null;
}
};
}
on (rollOut) {
this.onEnterFrame = function() {
if (testbutton_btn._alpha>0) {
testbutton_btn._alpha -= 15;
} else {
this.onEnterFrame = null;
}
};
}
It works fine by itself, but when coupled with other buttons, it does not have enough time to Mouseout before the next buttons says Mouseover.
Any help or better code samples or suggestions would be phenominal!
Thanks!
View Replies !
View Related
FLVplayer Menu Alpha Fade
Hi i i'm a beginner when it comes to Flash, but i have managed to follow all the video tutorials.
Now my question is what is the easiest way to fade up the whole menu while hovering the video. And then fade it back out when the mousepointer is out again.
One more question how do i load the movie by FlashVars from the html?
The flashfile is build exactly as the tutorials.
Jake
View Replies !
View Related
Tokion Like MENU, Help Fade Away Mouse Trailer...
ok so i had a nice FK member help me with this file earlier, but one thing i forgot to ask was how to make this "LINE" fade away on the rollover? as seen on this site's menu http://www.tokionusa.com/site/index.html
so anyway, here is the file.
i would like to know how to make the LINE that follows your mouse fade way as you roll off of the buttons.
any help??
thanks.
View Replies !
View Related
Trying To Put A Downloaded Menu After A Fade Motion Tween.
Greetings to the Flash world.
I'm learning Frontpage and Flash MX at the same time and I'm trying to intertwine them both, since I read that making an all Flash site isn't such a good idea. (Plus I don't know how too). (I don't know how true that is though).
I downloaded a drop down menu and with the help of (iaskwhy and some others) I was taught how to go about editing the menu to reference to my site. Now what I'm trying to do is have the menu appear after my logo fades from big to small. I made a big logo and created a motion tween to make it smaller (did I do that correctly) and after that I want the menu to appear after it. I went to the menu and tried moving all the keyframes with the menu info backward and insert some keyframes in front so I could have the motion tween happen. When I did that and tested it the menu just blinks. I then tried to find a way to insert it into Frontpage but everything is on one screen.
I then tried to insert the drop down menu in a separate frame in flash, nope didn't work either. So all that leads me to nothing. So of course I have to come to the board for help. I would truly appreciate some help on this as always.
View Replies !
View Related
[MX04] Alpha Fade Menu Problems
hey flashers,
i have been trying to get my menu to fade to 25% alpha after a button is clicked. then i would like the menu to fade up to 100% when rolled back over. i have tried everyway i know, and i'm getting desparate. i am uploading my example menu without any of my junky scripts (easier for you) on it. please take a look at it and offer any suggestions you have. thanks
--DK
View Replies !
View Related
Menu To Fade In/Out New Background Images And Text
I'm trying to create a navigation menu to fade background images in and out based upon what the user clicks.
So, for example, I have:
Contact
About
Portfolio
The stage when the user clicks contact has one background, and then when they click about, I want that background to fade out while the background fades in. My problem is, you don't know which order the ppt will choose to navigate the site so you can't hardcode the background that needs to fade out.
Can anyone point me to some code for this? Or a tutorial which may be helpful?
Thanks in advance.
View Replies !
View Related
Menu To Fade In/Out New Background Images And Text
I'm trying to create a navigation menu to fade background images in and out based upon what the user clicks.
So, for example, I have:
Contact
About
Portfolio
The stage when the user clicks contact has one background, and then when they click about, I want that background to fade out while the background fades in. My problem is, you don't know which order the ppt will choose to navigate the site so you can't hardcode the background that needs to fade out.
Can anyone point me to some code for this? Or a tutorial which may be helpful?
Thanks in advance.
View Replies !
View Related
XML-Driven Drop-Down Menu - Fade In Items?
Hi Guys,
Ive used the wonderful XML-Driven Drop-Down Menu tutorial to create a menu system, but I want to take the animation a step further by having each submenu item 'fade' in one after another.
Now im confortable with creating these tween using class's or the onEnterfram method ...but, I havent got a clue about how and where to implement this within the menu's current code.
Does any one have any suggestions????
Id really appreciate some guidence on this one.
Zaid
View Replies !
View Related
Fmx 2004 AS Alpha Fade Other Menu Items
ok so this is my first attempt at action script, and have three pretty thick books (flash bibles all, because its not just actionscript im new to)
so, here goes, im trying to make a horizontal menu where the OTHER buttons fade on mouseover. i dont have tweens or anything except layers (for the bg and all buttons on individual layers)
so I searched the net, and seems everyone wants to fade the button they are over....well I had to pick something so close as to what I want yet totally not give me a clear defined way to get the opposite result, so after many hours, heres my code for button1:
PHP Code:
onClipEvent(enterFrame){ function myFadeOut (myMC,speed){ if (myMC._alpha >= 50) { myMC._alpha = myMC._alpha - speed; }}function myFadeIn (myMC, speed) { if (myMC._alpha <= 100) { myMC._alpha = myMC._alpha + speed; }} if(this.hitTest(this._xmouse,this._ymouse, true)){ myFadeOut(_root.mc_Services,10); myFadeOut(_root.mc_Gallery,10); } else { myFadeIn(_root.mc_Services,10); myFadeIn(_root.mc_Gallery,10); }} //i know its not php but it looked better, heh.
joyous to me, it looks alot like php (which looks like javascript I suppose) so its mostly all well and good there so long as I can figure out the difference between frame and object code.
so now I have three buttons, and the Services and Gallery fade out to 50%, and all is right with the world....until I take the code and put it in button2.
NOTHING happens there for some reason. but, button3 makes button 1 dissapear, and button 2 mocks me for my folly. at this point button1 makes button 2 fade, but, button 3 starts to but decides im not quite masterful enough to get it to cooperate.
I have 5 buttons total, and I dont think this approach is going to work. as much as I would enjoy an answer, I would also just as much enjoy to learn why in the name of everything good in the world does the code behave this way? I changed the targets to match what I assumed we're the other correct buttons, but no dice.
anyways, I see lots of smart answers flying around the forums, so if someone would kindly release one this way, it would be much appreciated. (if the button this and that confused you, just make three symbols and try it out, if it works for you, i'll shortly be hanging myself in the toilet)
View Replies !
View Related
Fade Video Menu Similar To ITunes
I have created a video player that has a movieclip that contains my video/sound controls such as: forward, rewind, play, pause, video slider, sound slider, timecode, etc. The majority of the controls are movieclips. I have tried multiple ways to fade this menu (movieclip) in and out when the user moves the mouse over it without success. I can get the menu to fade in and out, but the controls will not work. I have tried tween/easing class to no effect as well as the _alpha property. At this point I am at a loss as how to proceed.
View Replies !
View Related
Working With Scenes - Fade Out Depending Upon Menu Option?
I'm just starting to use multiple scenes and have a quick question.
Say for example i have menu which points to four pages/scenes - we'll call them HOME, INFO, EMAIL, ABOUT for the sake of the example. The movie loads and the menu displays and in the middle of the page there is a red square.
If i want the red square to fade out before it jumps to anyone of the four pages/scenes - how can i go about doing this? I know i can tell the INFO button to jump to a frame and play the animation and then at the end of the animation it then jumps to a scene using the following:
Code:
this.gotoAndPlay("Scene 3");
but how can i achieve the same if i wanted it to go to the ABOUT page - if this was to be on Scene 4, for example?
I can't work out how i'd be able to point the button to the same Fade out animation at the end of the scene and then forward to the corresponding page.
View Replies !
View Related
Alpha Fade In, Tint Fade In And Then Fade Out
Just wondering, do u guys usually use actionscript to do alpha and tint fade? or just use the propeties tween control?
i heard that using actionscript will be better as it will not lag if the user's computer is slow....
here is to get a better idea what i'm trying to achieve using tweening
http://h-y-p-h-e-n-s.net/main.swf
To Alpha fade in, white tint fade in and then fade out white tint to original state.
I knoww how to script the alpha fade in but i have problem with the tint fade. I also have read through every line of http://actionscript.org/tutorials/ad...de/index.shtml
but i just don't know how to go about implementing it to my case.
i will really appreciate it if u can help enlighten me
View Replies !
View Related
Alpha Fade In, Tint Fade In And Then Fade Out
Just wondering, do u guys usually use actionscript to do alpha and tint fade? or just use the propeties tween control?
i heard that using actionscript will be better as it will not lag if the user's computer is slow....
here is to get a better idea what i'm trying to achieve using tweening
http://h-y-p-h-e-n-s.net/main.swf
To Alpha fade in, white tint fade in and then fade out white tint to original state.
I knoww how to script the alpha fade in but i have problem with the tint fade. I also have read through every line of http://actionscript.org/tutorials/ad...de/index.shtml
but i just don't know how to go about implementing it to my case.
i will really appreciate it if u can help enlighten me
View Replies !
View Related
Alpha Fade In, Tint Fade In And Then Fade Out
Last edited by PixelSense : 2004-02-01 at 01:54.
Just wondering, do u guys usually use actionscript to do alpha and tint fade? or just use the propeties tween control?
i heard that using actionscript will be better as it will not lag if the user's computer is slow....
here is to get a better idea what i'm trying to achieve using tweening
http://h-y-p-h-e-n-s.net/main.swf
To Alpha fade in, white tint fade in and then fade out white tint to original state.
I knoww how to script the alpha fade in but i have problem with the tint fade. I also have read through every line of http://actionscript.org/tutorials/ad...de/index.shtml
but i just don't know how to go about implementing it to my case.
i will really appreciate it if u can help enlighten me
View Replies !
View Related
Actionscript To Load Random External Movie, Fade In, Wait, Fade Out, Repeat
Hello,
I'm trying to construct some AS3 that will load a random one of several external swf files, fade the instance in, wait 5 seconds, fade the instance out, and load a new random movie (it can be the same one; I don't want to get too complicated at this point).
I could do this with no problem using older methods, but the client insists this is written in 3.
Please help; I'm at my wits end!
View Replies !
View Related
Newbie Question - Fade In Fade Out While Trning On And Turning Off A Music Loop
Hello everyone,
This is what I want to accomplish. I want to make my music loop fade in when turning on and fade out while turning off. I'm attaching the .fla of what I have now.
Currently the music loop stops abruptly when the pause button is clicked and starts suddenly when the play button is clicked. I want to smooth this action out and make it fade in when play button clicked fade out when pause button clicked. Hope you got my point.
I have added my sample .fla to show how have I added the music loop and the buttons.
Have this chunk of action script in it to load the music loop and play it infinitely.
PHP Code:
mySound = new Sound();
mySound.attachSound("myloop");
mySound.start("0", "999");
This bit on the puse button with an instance name pauseBTN
PHP Code:
on (release) {
mySound.stop();
playing = false;
playBTN._visible = true;
pauseBTN._visible = false;
}
and this bit on to the play button with an instance name playBTN
PHP Code:
on (release) {
if (playing != true) {
mySound.start(0, 999);
playing = true;
playBTN._visible = false;
pauseBTN._visible = true;
}
}
Please find my attachment here:
Thanks in advance
View Replies !
View Related
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
View Replies !
View Related
AS2 - Refine My Code...it Sucks : Six Clips Fade. Rollover One...other Fade Out
So I have six movie clips. When you rollover one I want the other five to fade out. this code that I did works but it has a potential to break with quick strokes. Any help would be great thanks. I also have a button surrounding the six clips that fade all back up. The reason for that is while they are going from clip to clip i dont want them to fade in a out.
------Here is a link of what im trying to acheiving.------
http://www.stellamccartney.com/us/en/beauty/
Thanks alot everyone.
------And here is my code-------
import mx.transitions.Tween;
import mx.transitions.easing.*;
function fadeOut(mc) {
var begin = 100;
var end = 25;
var time = .1;
var myTween:Tween = new Tween(mc, "_alpha", Regular.easeOut, begin , end , time , true);
}
function fadeIn(mc) {
var begin = 25;
var end = 100;
var time = .1;
var myTween:Tween = new Tween(mc, "_alpha", Regular.easeIn, begin , end , time , true);
}
btnOff.onRollOver = function() {
if (by1._alpha != "100") {
fadeIn(by1);
}
if (by2._alpha != "100") {
fadeIn(by2);
}
if (by3._alpha != "100") {
fadeIn(by3);
}
if (by4._alpha != "100") {
fadeIn(by4);
}
if (by5._alpha != "100") {
fadeIn(by5);
}
if (by6._alpha != "100") {
fadeIn(by6);
}
};
by1.onRollOver = function() {
if (by1._alpha != "100") {
fadeIn(by1);
}
if (by2._alpha != "25") {
fadeOut(by2);
}
if (by3._alpha != "25") {
fadeOut(by3);
}
if (by4._alpha != "25") {
fadeOut(by4);
}
if (by5._alpha != "25") {
fadeOut(by5);
}
if (by6._alpha != "25") {
fadeOut(by6);
}
};
by2.onRollOver = function() {
if (by2._alpha != "100") {
fadeIn(by2);
}
if (by1._alpha != "25") {
fadeOut(by1);
}
if (by3._alpha != "25") {
fadeOut(by3);
}
if (by4._alpha != "25") {
fadeOut(by4);
}
if (by5._alpha != "25") {
fadeOut(by5);
}
if (by6._alpha != "25") {
fadeOut(by6);
}
};
by3.onRollOver = function() {
if (by3._alpha != "100") {
fadeIn(by3);
}
if (by1._alpha != "25") {
fadeOut(by1);
}
if (by2._alpha != "25") {
fadeOut(by2);
}
if (by4._alpha != "25") {
fadeOut(by4);
}
if (by5._alpha != "25") {
fadeOut(by5);
}
if (by6._alpha != "25") {
fadeOut(by6);
}
};
by4.onRollOver = function() {
if (by4._alpha != "100") {
fadeIn(by4);
}
if (by1._alpha != "25") {
fadeOut(by1);
}
if (by2._alpha != "25") {
fadeOut(by2);
}
if (by3._alpha != "25") {
fadeOut(by3);
}
if (by5._alpha != "25") {
fadeOut(by5);
}
if (by6._alpha != "25") {
fadeOut(by6);
}
};
by5.onRollOver = function() {
if (by5._alpha != "100") {
fadeIn(by5);
}
if (by1._alpha != "25") {
fadeOut(by1);
}
if (by2._alpha != "25") {
fadeOut(by2);
}
if (by3._alpha != "25") {
fadeOut(by3);
}
if (by4._alpha != "25") {
fadeOut(by4);
}
if (by6._alpha != "25") {
fadeOut(by6);
}
};
by6.onRollOver = function() {
if (by6._alpha != "100") {
fadeIn(by6);
}
if (by1._alpha != "25") {
fadeOut(by1);
}
if (by2._alpha != "25") {
fadeOut(by2);
}
if (by3._alpha != "25") {
fadeOut(by3);
}
if (by4._alpha != "25") {
fadeOut(by4);
}
if (by5._alpha != "25") {
fadeOut(by5);
}
};
View Replies !
View Related
Help With "mouse Over, Fade In" Menu
Hey.
I have 3 layers
[actions]
[menu]
[title]
The menu is a rectangle in the center with butons using geturl. The title layer has a logo and it fills up the whole work space. (it's only 470X70)
I am trying to make it so when you mouseover the movie, the title fades out to about 40% (from 100%) and the menu fades into 100% (from 0%).. and then vise versa for the mouseout of the movie
I have tryed multiple things but nothing changes anything. I have seen it done before so I know it is possible..
If someone would make a FLA of something like this that I can break down it would be apreciated.
View Replies !
View Related
Photo Slideshow - Fade Out/fade In (alpha) - Flash5
Hi all & merry Christmas
For a Photographers portfolio I want to create a fade-out/in effect for when people select one of the photos. All the photos are stored within one SWF.
So OnRelease the selected photo loads and a Var is set. The current photo is being set graduately to alpha 0% and the loaded new photo (which is a MC) is moved to the highest level while this one is being set immediately to alpha 100%.
If I think about it, what I need to code is...
- a var in which the current image is set
- a function which checks what image/mc is in the var
- a function which says something like this:
on release move new image to layer/level below current image (which is on toplevel) and set to 100% ;
set the current image (as set in var) gradually to 0% alpha
and as last move new loaded image to toplevel...
(all images would be put in an SWF which would be loaded into the main SWF)
unfortunately my AS knowledge is fairly limited, so I have no clue how to script this???
anyone an idea or possibly a tutorial which could sort me out???
thanks so much
View Replies !
View Related
Actionscript To Fade In/fade Out Picture Depending On Frame?
I've searched the board but I can't figure out the answer to my question. I just want to fade in/out a movieclip. I can do this with tweens, but I'm really interested in how this would be done with actionscript.
How could I make it so that the fade in occurs with frames 1-15, stops, and then starting with 16 fades out?
I do have some code that will import a picture into a movieclip and fade it in, but I'm not sure how to alter the code so that the pic fades out on frame 16. The code below is fairly detailed... I would not mind a basic solution!!
Thanks for your help!
PHP Code:
init = function () {
this.myContainer = this.createEmptyMovieClip("cont", 1);
cont._x = 0;
cont._y = 130;
this.myContainer._alpha = 0;
this.myContainer.loadMovie("picture.jpg");
this.preloadJpg();
};
preloadJpg = function() {
this.onEnterFrame = function() {
if (this.myContainer.getBytesLoaded()>100 && this.myContainer.getBytesLoaded()>=this.myContainer.getBytesTotal()) {
this.fadePicIn();
}
};
};
fadePicIn = function() {
if(this.myContainer._alpha < 100){
this.myContainer._alpha += 10;
} else {
this.onEnterFrame = undefined;
}
}
this.init();
View Replies !
View Related
How Do I Create A Smooth Trasition Between My Pages - Fade Out / Then Fade In
Hi
I'm trying to make a mask reveal content1 on my Flash site
Then when i press a button i want the maske to play in reverse, so it hides the content1 before revealing content2.
I have seen lots of templates do this but havent been able to figure out how it is done in a simple fashion.
i guess it would be something like using the IF statement and the <>
but could someone write the FULL script to my button.
Lets say i have a MC that has 4 labels.... label1, label2, label3, label4.
I'm in the label1 frame
and when i press the label4
i want label1 to mask out (hide content of label1)
and once that is done i want a mask to reveale the content of label4.
If someone has a small .fla that does this in a simple way please email it to me.
THANKS
Mirrorman
Jimmy
View Replies !
View Related
[CS3] My Code Sucks : Six Clips Fade. Rollover One...other Fade Out
So I have six movie clips. When you rollover one I want the other five to fade out. this code that I did works but it has a potential to break with quick strokes. Any help would be great thanks. I also have a button surrounding the six clips that fade all back up. The reason for that is while they are going from clip to clip i dont want them to fade in a out.
------Here is a link of what im trying to acheiving.------
http://www.stellamccartney.com/us/en/beauty/
Thanks alot everyone.
------And here is my code-------
import mx.transitions.Tween;
import mx.transitions.easing.*;
function fadeOut(mc) {
var begin = 100;
var end = 25;
var time = .1;
var myTween:Tween = new Tween(mc, "_alpha", Regular.easeOut, begin , end , time , true);
}
function fadeIn(mc) {
var begin = 25;
var end = 100;
var time = .1;
var myTween:Tween = new Tween(mc, "_alpha", Regular.easeIn, begin , end , time , true);
}
btnOff.onRollOver = function() {
if (by1._alpha != "100") {
fadeIn(by1);
}
if (by2._alpha != "100") {
fadeIn(by2);
}
if (by3._alpha != "100") {
fadeIn(by3);
}
if (by4._alpha != "100") {
fadeIn(by4);
}
if (by5._alpha != "100") {
fadeIn(by5);
}
if (by6._alpha != "100") {
fadeIn(by6);
}
};
by1.onRollOver = function() {
if (by1._alpha != "100") {
fadeIn(by1);
}
if (by2._alpha != "25") {
fadeOut(by2);
}
if (by3._alpha != "25") {
fadeOut(by3);
}
if (by4._alpha != "25") {
fadeOut(by4);
}
if (by5._alpha != "25") {
fadeOut(by5);
}
if (by6._alpha != "25") {
fadeOut(by6);
}
};
by2.onRollOver = function() {
if (by2._alpha != "100") {
fadeIn(by2);
}
if (by1._alpha != "25") {
fadeOut(by1);
}
if (by3._alpha != "25") {
fadeOut(by3);
}
if (by4._alpha != "25") {
fadeOut(by4);
}
if (by5._alpha != "25") {
fadeOut(by5);
}
if (by6._alpha != "25") {
fadeOut(by6);
}
};
by3.onRollOver = function() {
if (by3._alpha != "100") {
fadeIn(by3);
}
if (by1._alpha != "25") {
fadeOut(by1);
}
if (by2._alpha != "25") {
fadeOut(by2);
}
if (by4._alpha != "25") {
fadeOut(by4);
}
if (by5._alpha != "25") {
fadeOut(by5);
}
if (by6._alpha != "25") {
fadeOut(by6);
}
};
by4.onRollOver = function() {
if (by4._alpha != "100") {
fadeIn(by4);
}
if (by1._alpha != "25") {
fadeOut(by1);
}
if (by2._alpha != "25") {
fadeOut(by2);
}
if (by3._alpha != "25") {
fadeOut(by3);
}
if (by5._alpha != "25") {
fadeOut(by5);
}
if (by6._alpha != "25") {
fadeOut(by6);
}
};
by5.onRollOver = function() {
if (by5._alpha != "100") {
fadeIn(by5);
}
if (by1._alpha != "25") {
fadeOut(by1);
}
if (by2._alpha != "25") {
fadeOut(by2);
}
if (by3._alpha != "25") {
fadeOut(by3);
}
if (by4._alpha != "25") {
fadeOut(by4);
}
if (by6._alpha != "25") {
fadeOut(by6);
}
};
by6.onRollOver = function() {
if (by6._alpha != "100") {
fadeIn(by6);
}
if (by1._alpha != "25") {
fadeOut(by1);
}
if (by2._alpha != "25") {
fadeOut(by2);
}
if (by3._alpha != "25") {
fadeOut(by3);
}
if (by4._alpha != "25") {
fadeOut(by4);
}
if (by5._alpha != "25") {
fadeOut(by5);
}
};
View Replies !
View Related
Xml Slideshow Fade In And Fade Out Assistance (code Supplied)
Hi all,
Can someone help me out here - needing someone to point out (or offer!) the solution. I'm working with the following code, and want to have my slideshow images fade into each other. At the moment, the picture before, after it's reached its delay setting, just switches off and the next one fades in, meaning the background displays (which isn't desirable)
CODE BEGINS ------------------------------------------------------
delay = 4000;
//-----------------------
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
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;
}
firstImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images.xml");
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();
};
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
prevImage();
} else if (Key.getCode() == Key.RIGHT) {
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;
} 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();
slideshow();
}
}
}
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();
slideshow();
}
}
function picture_num() {
current_pos = p+1;
pos_txt.text = current_pos+" / "+total;
}
function slideshow() {
myInterval = setInterval(pause_slideshow, delay);
function pause_slideshow() {
clearInterval(myInterval);
if (p == (total-1)) {
p = 0;
firstImage();
} else {
nextImage();
}
function moveSlide() {
current_mc = _root.myClips_array[_root.target_mc];
new Tween(current_mc, "_alpha", Strong.easeOut, 100, 0, 1, true);
_root.target_mc++;
if (_root.target_mc>=_root.myImagesNo) {
_root.target_mc = 0;
}
_root.myText_txt.text = _root.myImages[target_mc].attributes.title;
next_mc = _root.myClips_array[_root.target_mc];
new Tween(next_mc, "_alpha", Strong.easeOut, 0, 100, 1, true);
}
}
}
CODE ENDS ------------------------------------------------------
Any help, HUGELY appreciated
Thanks in advance
View Replies !
View Related
Alpha Fade Image, Wait, Fade Out, Next Frame
Greeting,
After three hous of review I have now looked at so many scripts (here and elsewhere) of fading in/out that I am more confused instead of less confused, which seems odd I know.
Here is what I have and what I want to do. I am using MX.
I have twenty images, one one each frame of a movie clip, placed around the stage. I want the imges placed instead of loaded so that I can control where they appear on the stage. I would like each image to fade in, stay on the stage for 4 seconds, fade out, and then go to the next frame (and repeat with the image located on that frame). Does anybody have any scripts that already do this. I am a beginner and I am not that famaliar with action scripting. I think what I need to do is use an onEnterFrame, with an alpha fade in, some type of delay/counting script, and then a fade-out, and go to the next frame.
I know that you all have thousands of things you could be doing instead of helping me, so please know that I appreciate it.
View Replies !
View Related
Refine My Code : Six Clips Fade. Rollover One...other Fade Out
So I have six movie clips. When you rollover one I want the other five to fade out. this code that I did works but it has a potential to break with quick strokes. Any help would be great thanks. I also have a button surrounding the six clips that fade all back up. The reason for that is while they are going from clip to clip i dont want them to fade in a out.
------Here is a link of what im trying to acheiving.------
http://www.stellamccartney.com/us/en/beauty/
Thanks alot everyone.
------And here is my code-------
import mx.transitions.Tween;
import mx.transitions.easing.*;
function fadeOut(mc) {
var begin = 100;
var end = 25;
var time = .1;
var myTween:Tween = new Tween(mc, "_alpha", Regular.easeOut, begin , end , time , true);
}
function fadeIn(mc) {
var begin = 25;
var end = 100;
var time = .1;
var myTween:Tween = new Tween(mc, "_alpha", Regular.easeIn, begin , end , time , true);
}
btnOff.onRollOver = function() {
if (by1._alpha != "100") {
fadeIn(by1);
}
if (by2._alpha != "100") {
fadeIn(by2);
}
if (by3._alpha != "100") {
fadeIn(by3);
}
if (by4._alpha != "100") {
fadeIn(by4);
}
if (by5._alpha != "100") {
fadeIn(by5);
}
if (by6._alpha != "100") {
fadeIn(by6);
}
};
by1.onRollOver = function() {
if (by1._alpha != "100") {
fadeIn(by1);
}
if (by2._alpha != "25") {
fadeOut(by2);
}
if (by3._alpha != "25") {
fadeOut(by3);
}
if (by4._alpha != "25") {
fadeOut(by4);
}
if (by5._alpha != "25") {
fadeOut(by5);
}
if (by6._alpha != "25") {
fadeOut(by6);
}
};
by2.onRollOver = function() {
if (by2._alpha != "100") {
fadeIn(by2);
}
if (by1._alpha != "25") {
fadeOut(by1);
}
if (by3._alpha != "25") {
fadeOut(by3);
}
if (by4._alpha != "25") {
fadeOut(by4);
}
if (by5._alpha != "25") {
fadeOut(by5);
}
if (by6._alpha != "25") {
fadeOut(by6);
}
};
by3.onRollOver = function() {
if (by3._alpha != "100") {
fadeIn(by3);
}
if (by1._alpha != "25") {
fadeOut(by1);
}
if (by2._alpha != "25") {
fadeOut(by2);
}
if (by4._alpha != "25") {
fadeOut(by4);
}
if (by5._alpha != "25") {
fadeOut(by5);
}
if (by6._alpha != "25") {
fadeOut(by6);
}
};
by4.onRollOver = function() {
if (by4._alpha != "100") {
fadeIn(by4);
}
if (by1._alpha != "25") {
fadeOut(by1);
}
if (by2._alpha != "25") {
fadeOut(by2);
}
if (by3._alpha != "25") {
fadeOut(by3);
}
if (by5._alpha != "25") {
fadeOut(by5);
}
if (by6._alpha != "25") {
fadeOut(by6);
}
};
by5.onRollOver = function() {
if (by5._alpha != "100") {
fadeIn(by5);
}
if (by1._alpha != "25") {
fadeOut(by1);
}
if (by2._alpha != "25") {
fadeOut(by2);
}
if (by3._alpha != "25") {
fadeOut(by3);
}
if (by4._alpha != "25") {
fadeOut(by4);
}
if (by6._alpha != "25") {
fadeOut(by6);
}
};
by6.onRollOver = function() {
if (by6._alpha != "100") {
fadeIn(by6);
}
if (by1._alpha != "25") {
fadeOut(by1);
}
if (by2._alpha != "25") {
fadeOut(by2);
}
if (by3._alpha != "25") {
fadeOut(by3);
}
if (by4._alpha != "25") {
fadeOut(by4);
}
if (by5._alpha != "25") {
fadeOut(by5);
}
};
View Replies !
View Related
Photo Slideshow - Fade Out/fade In (alpha) - Flash
Hi all & merry Christmas
For a Photographers portfolio I want to create a fade-out/in effect for when people select one of the photos. All the photos are stored within one SWF.
So OnRelease the selected photo loads and a Var is set. The current photo is being set graduately to alpha 0% and the loaded new photo (which is a MC) is moved to the highest level while this one is being set immediately to alpha 100%.
If I think about it, what I need to code is...
- a var in which the current image is set
- a function which checks what image/mc is in the var
- a function which says something like this:
on release move new image to layer/level below current image (which is on toplevel) and set to 100% ;
set the current image (as set in var) gradually to 0% alpha
and as last move new loaded image to toplevel...
(all images would be put in an SWF which would be loaded into the main SWF)
unfortunately my AS knowledge is fairly limited, so I have no clue how to script this???
anyone an idea or possibly a tutorial which could sort me out???
thanks so much
View Replies !
View Related
|