Text Fader...
I'm trying to make a flash site, and I want to fade text. Well, not like that. I put a shadow under it, and I want the shadow to fade. So far, it doesn't do it at all. It just sits there. Can anyone help?
Christopher William Coddington (Xzandar / cwcandromeda)
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 04-12-2003, 11:36 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Help With Ext Image / Text Fader
I am new to MX and have very basic concepts.
I have a very general requirement that seemed very simple:
Step 1:
Load a new external JPEG image into a MC with a string var encoding a string caption in the URL link (VALUE="../fadeTest.swf?someTextVar=TestCaption") within the EMBED / OBJECT sections.
I know how to do this and it semed to work fine.
STEP2:
When the JPEG is loaded I would like the substituted Text to Fade In over the JPEG. The JPEG should also fade in before the Text. The fade rate should be programmable.
STEP3:
After a programmable period of time say 5 seconds, the process is repeated with a new external JPEG and Text Captions
until the loop iterations is complete. The loop iteration is also programmable.
Seemed like a very normal MX functionality.
Now where do I start? Any help is truly appreciated
Thank you
Chris
Make A Text News Fader Using Actionscript
I want to put a text news fader for my website! How do I make the text fade in and then fade out and then a diffrent text to fade in...etc. OR make the text move on the bottom of the screen from right to left BUT only in a certain area because I tried making it go from 1 side to the other but the text didn't disapear it wen't through(across my whole "stage") and I don't want that I just want a small box where it's only visible there...If anyone can help thanx!
A.s. Fader Funkshun
when i call this funkshun i want the mc named 'static' to fade in or out (depending on what the status is)
Code:
function staticFade () {
_root.static.gotoAndPlay(2);
if (_root.static._alpha > 0){
_root.static._alpha -= 10;
}else if (_root.static._alpha < 100){
_root.static._alpha += 10;
}
}
unfortunately, the mc just sits there and and does nothing!
please help
Actionscript Fader
Can anybody tell me where i can get a script or a tutorial for an object fade?
Help With A Quote Fader
Hello all~
My boss wants me to create a flash movie that will fade in a quote, then fade it back out and fade in a new quote. That part I have no problems with. The problems come in with the other requirements.
He also wants it to get the quotes from a text file so as to be easily editable, pull them randomly and stop the fade in/out when moused over.
The only area I don't know how to do is the pulling from a text file and random order. Any help would be appreciated.
Thanks in advance.
Thumbnail Fader...?
Hey,
I'm looking for a good tutorial (or movie) for a small "Thumbnail Fader". Like the one at Papa Murphy's website. I've found a couple tutorials that are pretty good but they are only set up for imported jpg's. I was hopeing to find one to load external thumbnails (jpg). Thanks for any pointers. Peace.
Little Fader Problem
Hi guys,
I've got this (attached) file. Really basic, with three states fading in and out on button clicks. My problem is that it's fading very slowly!!
Anyone know how I can speed it up?
Thanx guys
Custom Fader
Hi, I am working on a knob for setting various values (n1 - n2).
I want the fader/knob to be able to take the following parameters: Name, currentValue, MinValue and maxValue and subsequently present a knob (dragable) that is initiated on the right value and may be dragged right and left to set other values within the boundaries.
I need a more customizable one than what resides in the Flash MX library.
Anyone has an example on this I can look at? Or any ideas on how to approach this?
Marius
Actionscript Fader
Hey!
I have some problems with an application I am working on. I am trying to use ActionScript to fade in an out header graphics, and it doesn't work properly.
Most of the scripts I found on-line, so I don't understand exactly how they work...
I have this script in a frame:
Code:
function fadeout(target_mc:MovieClip):Void {
target_mc._alpha -= 5;
if (target_mc._alpha <= 0) {
target_mc._visible = false;
}
}
function fadein(target_mc:MovieClip):Void {
target_mc._alpha += 5;
if (target_mc._alpha <= 0) {
target_mc._visible = false;
}
}
I have three header graphics with instance names header1, header2, header3
Then on each of the buttons I have this script:
BUTTON1
Code:
on (release) {
var fade:Number = setInterval(fadein, 100, header1);
var fade:Number = setInterval(fadeout, 100, header2);
var fade:Number = setInterval(fadeout, 100, header3);
}
BUTTON2
Code:
on (release) {
var fade:Number = setInterval(fadeout, 100, header1);
var fade:Number = setInterval(fadein, 100, header2);
var fade:Number = setInterval(fadeout, 100, header3);
}
BUTTON3
Code:
on (release) {
var fade:Number = setInterval(fadeout, 100, header1);
var fade:Number = setInterval(fadeout, 100, header2);
var fade:Number = setInterval(fadein, 100, header3);
}
When I run the movie, it works like it is supposed to the very first time I click a button - for instance if I click button2, header2 will fade in and header1 will fade out. But after that it stops working completely...
Any suggestions?
I have attached a fla that shows what I have done so far. Thank you!!!
Photo Fader
Hi
Im sure this has been done a thousand times before - but I cant seem to find one.
Basically I have a load of images (imported internally into flash) that I want to cross fade between using actionscript.
Would anybody know where I could find such script? Ive found some that load in external images but not internal ones
thanks for your help!
Nick
Mp3 Fader Function
I'm sure this is a scope issue, but I can't get these functions to work together. When I bundle all the code within the fSound function and hard code a specific button name, the fader works properly. When I separate the code into functions, the fader no longer works. I need to keep them separate so I can reuse the fader across an array of buttons. Any suggestions? Thanks very much for your help.
ActionScript Code:
// STREAMING FUNCTION
function fSound():Void {
var mySound:Sound = new Sound(this);
mySound.loadSound("sample.mp3", true);
mySoundVolume = 100;
mySound.setVolume(mySoundVolume);
mySound.start(0,99);
}
//FADER FUNCTION
function fSoundFadeOut():Void {
var fadeAmount:Number = 20;
onEnterFrame = function() {
if(fadeAmount <100) {
mySound.setVolume(100-(++fadeAmount));
trace(fadeAmount);
}else{
trace(fadeAmount);
mySound.stop();
this.onEnterFrame = null;
}
}
}
//FADER BUTTON
mcBtnInfo.btnBack.onRelease = function() {
fSoundFadeOut();
}
fSound();
Help With Image Fader
hello-
I developed this site a little while back and have realized a little flash issue. The images are supposed to fade in and out of each other, but on a slow bandwidth, it just pops up when the old image fades out and is glitchy. In the header of this page:
http://www.antiqueswoodbury.com/
I made a dynamic image fader, but it isn't totally working out for me. There is no preloader, and I can't figure out how I would still preload all of the images, then fade them all in still dynamically, since each setInterval calls the "loadClip" command.(so technically it loads it each time again) I need to preload them first, then start the fading...but I don't know how to do it dynamically...?? If anyone has a better file and has done this...it would be appreciated...
Here is the code:
[a]
stop();
//initial variable declarations
var speed = 3;
var counter = 1;
var picCount = 1;
var frameCount = 8;
// destination of images to load
var Destination = "/images/flash_images/hp_img";
// load initial image on start
mc_1.loadMovie(Destination+picCount+".jpg");
// on movie load, duplicate the movie clip holder and name "mc_1" and "mc_2"
duplicateMovieClip(mc_1,"mc_2",2);
// function to count which pic to load into mc
function PicCounter(){
picCount += 1;
if(picCount > frameCount){
picCount = 1;
}
}
function Switcher(){
//run PicCounter function
PicCounter();
//establish counter from 1 to 2
counter += 1;
if(counter > 2){
counter = 1;
}
// if counter returns 1 fade in mc1 with image determined from picCount
if(counter == 1){
whichBox = "fadePic1";
//_root.mc_1.gotoAndStop(picCount);
_root.mc_1.loadMovie(Destination+picCount+".jpg");
}
// if counter returns 2, fade in mc2 with image determined from picCount
if(counter == 2){
whichBox = "fadePic2";
//_root.mc_2.gotoAndStop(picCount);
_root.mc_2.loadMovie(Destination+picCount+".jpg");
}
}
_root.onEnterFrame = function(){
switch (whichBox) {
// fade out mc_2, fade in mc_1
case "fadePic1" :
if(_root.mc_2._alpha <= 0){
_root.mc_2._alpha == 0;
}else{
_root.mc_2._alpha -= speed;
}
if(_root.mc_1._alpha >= 100){
_root.mc_1._alpha == 100;
}else{
_root.mc_1._alpha += speed;
}
//trace(_root.mc_1._alpha);
break;
// fade out mc_1, fade in mc_2
case "fadePic2" :
if(_root.mc_1._alpha <= 0){
_root.mc_1._alpha == 0;
}else{
_root.mc_1._alpha -= speed;
}
if(_root.mc_2._alpha >= 100){
_root.mc_2._alpha == 100;
}else{
_root.mc_2._alpha += speed;
}
//trace(_root.mc_2._alpha);
break;
// default when movie loads
default :
_root.mc_1._alpha = 100;
_root.mc_2._alpha = 0;
break;
}
}
// runs the Switcher function every n amount of seconds
setInterval(Switcher,4500);
[/a]
Audio Fader
Hey guys,
I having a problem setting up an audio fader, hope you guys can shed some light. I have set-up the fader interface called mySlider, seems to work well. The trouble is having it control my audio. I have a pad with 12 sounds, all of which are MP3s stored externally, they trigger using a simple:
on (release) {
w.loadSound("lab/9.mp3", true);
}
I have defined my sounds in a list on an action layer, for example :
w = new Sound();
Its basic, but so far has don what i need. If i want to control the playing sounds using this fader what would i need to do?
All advice as usual welcome.
Thanks.
About The Fader Prototype
http://www.actionscript.org/actionsc.../Sound_Object/
--> A fader prototype by Michael Tapson & J. Tomasino
Sound.prototype.fadeup = function ( fadespeed, maxLevel ) {
var SndIntervalID;
clearInterval ( SndIntervalID );
SndIntervalID = setInterval ( this, "upOne", fadespeed, maxLevel );
// BUMP VOLUME UP
Sound.prototype.upOne = function ( maxLevel ) {
varSnd = this.getVolume();
if ( varSnd < maxLevel ){
this.setVolume ( varSnd + 1 );
}else{
clearInterval ( SndIntervalID );
}
updateAfterEvent();
}
}
Sound.prototype.fadedown = function ( fadespeed, minLevel ) {
var SndIntervalID;
clearInterval ( SndIntervalID );
SndIntervalID = setInterval ( this, "downOne", fadespeed, minLevel );
// BUMP VOLUME DOWN
Sound.prototype.downOne = function ( minLevel ) {
varSnd = this.getVolume();
if (varSnd > minLevel){
this.setVolume ( varSnd - 1 );
}else{
clearInterval ( SndIntervalID );
}
updateAfterEvent();
}
}
When the fade function is called and then recalled before the fade is done, every thing go crazy. There is an jam in the "upOne" and/or "downOne" function. The "clearInterval ( SndIntervalID );" line is never called...
and I don't know what to do.
anybody got a clue?
aja
Image Fader
I've used the attached .fla to create a image fader. It loads .jpg from the filename in the .html (example: banner.swf?img1=img1.jpg&img2=img2.jpg&img3=img3.j pg and so on, this could be twinty or 3 or fourty) after that I puts the loaded images into an MC an fades them into an other image. Well just look at the .fla/.swf because this well give you more information.
But the problem is that every time that a loop I finished the .swf is blank for a second (watch the .swf and you'll see what I mean). How can I solve this?
I thought about giving an extra var in the filename called img=(number of images) and then making for each image an MC (with AS) giving it a different depth/level and fade them one by one, but does this solve the problem? And if it does how do I build that?
Note: The .jpgs and the // debug part in the AS are examples. And it shouuld be dynamic, because filenames are given with the url
Fader With A Twist
I have a fader. (slider)
1) it is on a line 100 ixels long
2) I need it to control the Alpha leval of an object.
I am asuming I need to get the percentage of the slider, to find out were the slider is on the bar, and then transform that into the percentage of the alpha fade.
Any ideas on what the coding for this would be?!
Thanks,
Prodigy
AS 1.0 Color Fader - Done.
Just though of posting this. Enjoy! See the sample FLA below. You may see this effect in some websites.
//------------------------------------------
// COLOR FADER 1.0 by blackjersey
// if (numofsleepinaweek = 0) {
// colorsbegintofade = true;
// }
// nonsense.
//------------------------------------------
// Place this function in a keyframe at the start of your movie:
function colourFade(r, g, b) {
oldColour = myColour.getRGB().toString(16);
newColour = "0x"+r+g+b;
oldR = oldColour.substr(0, 2);
oldR = "0x0000"+oldR;
oldR = parseInt(oldR);
oldG = oldColour.substr(2, 2);
oldG = "0x0000"+oldG;
oldG = parseInt(oldG);
oldB = oldColour.substr(4, 2);
oldB = "0x0000"+oldB;
oldB = parseInt(oldB);
newR = newColour.substr(2, 2);
newR = "0x0000"+newR;
newR = parseInt(newR);
newG = newColour.substr(4, 2);
newG = "0x0000"+newG;
newG = parseInt(newG);
newB = newColour.substr(6, 2);
newB = "0x0000"+newB;
newB = parseInt(newB);
i = 0;
_root.complete = false;
_root.newColourArray = new Array();
while (!_root.complete) {
if (newR>oldR) {
oldR += 1;
}
if (newR<oldR) {
oldR -= 1;
}
if (newR == oldR) {
oldR = newR;
}
if (newG>oldG) {
oldG += 1;
}
if (newG<oldG) {
oldG -= 1;
}
if (newG == oldG) {
oldG = newG;
}
if (newB>oldB) {
oldB += 1;
}
if (newB<oldB) {
oldB -= 1;
}
if (newB == oldB) {
oldB = newB;
}
hexR = (oldR).toString(16);
hexG = (oldG).toString(16);
hexB = (oldB).toString(16);
_root.newColourArray[i] = "0x"+hexR+hexG+hexB;
i++;
if (newR == oldR && newG == oldG && newB == oldB) {
_root.complete = true;
_root.begin = 0;
}
}
}
// Then attach this script to the MC that you want to change colour (in my example I gave the MC an instance name "box"
onClipEvent (enterFrame) {
if (_root.complete=true) {
limit = _root.newColourArray.length;
myColour = new Color(_root.box);
if (_root.begin<limit) {
myColour.setRGB(_root.newColourArray[_root.begin]);
_root.begin += 5;
}
if (_root.begin>=(limit-1)) {
_root.complete = false;
}
}
}
// In the key frame where you placed the MC "box" put the following script:
_root.complete = false;
myColour = new Color(_root.box);
myColour.setRGB("0xebeced");
// For you to change the color of "box" call the command:
_root.colourFade("b3","d7","16");
Please take note:
_root.begin += 1;
If you change this to :
_root.begin += 2; //or higher...
color change perform the transition twice as fast.
Color Fader
Well, I was working on a game for a while. Then just kind of stopped, but now I'm starting back again. heh. But anyway, I was wondering if anyone has modified or created their own color fader. The one they give you in the Flash Tutorials is good, but I was hoping I could make it easier. In the Flash Fader Tutorial/Sample they make you have an over layer which is transparent (with details of whatever, they used a car), and an under layer which is a solid color. Move the fader and then you apply the color. Simple. But not how I have everything set up. I've got multiple movie clips that I need to change colors of, from that single fader. And also, I don't want to have to make a solid color movie clip and a transparent movie clip of each item I want to change colors of. That's just way too much. A friend of mine told me that all I have to do is make the Items I want to be able to change colors of, as white as possible (with the shades how i want them, but not too dark and not transparent), and in the action script of the color fader, change 255 to -255 and tell it to change on the actual movie clip, and not a solid layer behind it. So instead of changing the solid layer and having it show through the transparent layer, it'd just change the actual movie clip to teh color wanted from the fader. And no details are lost, since it goes to -255 instead of +255. Only problem is...he didn't use the same script as the flash sample, and he wont tell me it. I've edited the script, and it hasn't been working. I was wondering if anyone knows what I'm talking about and has done it, or can try to see if they can do it and tell me. Thanks again, Appreciate it.
Image Fader Component
I have imported a graphic, placed the image fader component over top of it and it works fine. When I rollover the image the black box slowly fads to clear, revealing the picture beneath. The question I have is that now I want to add another rollover to this particular picture. I've made the graphic a button and added a rollover script but it doesn't work. Is it possible to have a rollover on a component that is already using a rollover? Thanks
Blind Type Fader?
Hi,
I know that there are fla files you can download here. I am looking for a 'blind type fader'. Something similar to the one on this site:
http://www.8minutedating.com/
Any ideas? - I didn't exactly see anything like this here on FlashKit
Thanks In Advance!!
Vmusic
Volume Fader Gone Wrong
I'm trying to make an actionscript that will fade in a sound. I have very little experience with AC and this doesn't seem to work.
Code:
loaderSound = new Sound();
loaderSound.attachSound("Abaddon-Will_loader");
loaderSound.start(0,999);
loadersound.setVolume(0);
loaderSound.onLoad = function() {
fadeSound = setInterval (volumeUp, 20);
};
function volumeUp() {
currentVolume = loaderSound.getVolume();
loaderSound.setVolume(++currentVolume);
};
Can anyone point me in the right direction and tell me why my sound doesn't increase in volume?
Thank you.
Colour Fader Actionscript
Hi all,
can anyone help with this ...i am creating a paint game,which i have the actionscript for, but i want to add a colour fader element, which allows the user to once they have selcted a colour alter the the shade to a stronger or paler shade.....can this be done, i'm not a actionscript expert, so tutorials or source files would be brilliant ....
thanks
j
Fader Loopy Thing...
hey guys.. i downloaded this fla from...
http://www.canfieldstudios.com/flash...ict/index.html
i wanted to see if any of you people knew how to send it to a frame once it has reached the last image.
HELPHow To Use Fader Button?
hello everybady~
im a newbies of flash mx
here is an attached file content a movieclip and a fader button,
i would like to ask how to use the fader button to control the movieclip?
i.e. when the user slip the button down the movieclip will play forward, when the button slip up then the movieclip play backward.
The movieclip stop when no motion
can anyone show me how to make the actionscript?
thankyou very much.....
Use Fader To Resize Movieclip
Hi,
I wounder if someone know of a example or tutorial about using a "fader" preferly the "fader - mixer"-component that comes with flash to resize a movieclip dynamicly.
Cheers
Magnus
Fader - Standard Values?
Hi everyone,
I am using a fader with 0 to 100 values. But I want fader to stop only 0-25-50-75-100 values. For example, when the user drag it, it should stick to either 25 or 50. How can I do it? I have looked to common libraries -> faders of MX04 but they are 0-100 scale and same as I got.
Hope I explained my problem, Thank You
Ali
ali@canlidinc.net
Random Image Fader
I am looking for a Random Image Fader where a series of images could be ramdonly called and faded in and out. It would be nice to control this with an external control file as opposed to changing the FLA everytime.
Image Fader For A Newbie
Hi,
I have done some Flash in the past, simple adverts, text work, and images. I'm not bad at the graphic stuff and basic interactions.
I'm looking to build a Flash file that fades in and fades out images in a directory (fixed size for every image). Similar fluid fade system used on this site www.computerandvideogames.com
I code in CSS, PHP and MySQL but never done any coding in Flash. Some day I want to learn how to use PHP and MySQL in Flash, pulling info from a database to display on the screen. But that's another thread for another day.
PLEASE HELP!!
Matt Auckland
[CS3] Sequential Image Fader
The following script works in AS.1 but fails to export in AS.2:
Code:
setProperty ("/mc_" add movienum, _alpha, fade);
fade = fade - 5;
if(fade == 0)
{
fade = 100;
setProperty ("/mc_" add movienum, _alpha, fade);
movienum = movienum + 1;
gotoAndPlay (2);
}
if(movienum == 7)
{
fade = 100;
movienum = 1;
gotoAndPlay (1);
}
The problem seems to be:
Code:
setProperty ("/mc_" add movienum, _alpha, fade);
What do I need to change to make it work in AS.2
Thx for any help in advance.
My Fader Ain't Fading (AS Included)
Hi ya all,
I wrote this script this morning but I'm stumped as to why it isn't fading. I'm got the appropriate calls on the buttons that make the Fade state = 1 when its rolled over and 0 when it's rolled off. But I dunno what I'm doing wrong. I'm still new to this whole prototype biz so its kinda confusing. Anyone shed a bit of light on this?
This is on my main timeline in the actions layer which stretches for the whole movie.
ActionScript Code:
MovieClip.prototype.fader = function() {
var maxFade = 100;
var minFade = 25;
var FadeDwnVal = 10;
var FadeUpVal = 15;
//
this._alpha = minFade;
// number of frames to flicker
this.onEnterFrame = function() {
if (FadeState == 1) {
this._alpha += FadeUpVal;
if (this._alpha>=maxFade) {
this._alpha = maxFade;
}
}
if (FadeState == 0) {
this._alpha -= FadeDwnVal;
if (this._alpha<=minFade) {
this._alpha = minFade;
}
}
};
};
And then I've got this on my movie Clip. But I've used the #include command under my movieclip instead of copying and pasting this everytime. Figured #include fadestate.as would be easier.
ActionScript Code:
on (rollOver) {
FadeState = 1;
}
//
on (rollOut) {
FadeState = 0;
}
Image Fader Via Actionscript...
I have an old flash template where the alpha "fading" work via motion tween. Now that it need some more and I figured that instead of spending too much time with adding/configuring it which would mess up everything, I just inserted a new frame before everything else and make it a movie clip. Then copy and paste some of them into the movie clip.
Now I need to figure out to get from frame 1 and wait while the movieClip is being played once. When done then exit the timeline in the movieClip and get back to the _root and start frame 2 and play it to the end. So, how exactly can I accomplish this?
Thanks,
FletchSOD
Why Is My Volume Fader And Buttons Not Working?
I have external loops that are loaded into an MC called loopholder (created using AS). I have a fader that is linked to a variable called vol. When I trace(vol) it gives me the figures that I am looking for. The problem seems to be with the command to set the volume. Here's the code:
Code:
//volume slider link to loop volume
vol=((_root.controls.slider._y * -2) + 170);
_root.loopholder.setVolume(vol);
It is inside an onEnterFrame function.
Also, my stop and start buttons for the sound don't seem to work either. They are MC instances that fade between each other.
Here's the code for them:
Code:
//soundtrack buttons and events
_root.stbuttons.playstop.ststart._visible = false;
_root.stbuttons.playstop.ststop.onRelease = function(){
_root.loopholder.stop();
_root.stbuttons.playstop.onEnterFrame = function(){
if(_root.stbuttons.playstop.ststop._alpha > 0){
_root.stbuttons.playstop.ststop._alpha -=5;
_root.stbuttons.playstop.ststart._alpha +=5;
};
_root.stbuttons.playstop.ststop._visible = false;
_root.stbuttons.playstop.ststart._visible = true;
};
the start and stop buttons are labelled ststop and ststart. They are inside a holder called playstop, which is inside another holder called stbuttons. I have put a trace("stopped") command after the onRelease function to check that it is registering the click of the mouse and it works fine. Again, I think it has to be something to do with the _root.loopholder.stop(); command, but I don't see what can be wrong with it.
Has anyone any idea why neither of these seem to work?
Thanks for your help
Graeme
Alpha Fade With Fader Movieclip
flash mx has a movieclip in the liberies called fader.
this fadermovieclip should fade in and fade out a second movieclip's alpha properties.
How is this done?
Fader Control Apha Setting
flash mx:
how can i use a fader contol(fader movie clip in common libery)
for fade in / out an alpha property setting of a second movieclip.
Fader Loading .txt Using Mousedown Rollover
Good morning all. This may be an easy question with a much easier way to preform this task, but ive only been learning flash for less than a week. Anyway I want a fader where, when a user scrolls through the fader, for every, say, 20-30pixles another group of text appears in a text box. I figure i can achive this by putting hidden buttons along the fader at points I want the text to change. The problem i am having is getting the mousedown code to work with loading a .txt file from notepad.
On a blank movie:
onClipEvent(mouseDown){_root.mouseIsDown = true;}
onClipEvent(mouseUp)(_root.mouseIsDown = false;}
On another movie clip:
onClipEvent(enterFrame){
if(_root.mouseIsDown && _parent.hitTest(_root._xmouse, _root._ymouse)){
That all makes for a perfect trace, yet when i try to attach this I get nothing:
loadText = new loadVars();
loadText.load("TEXT1.txt");
loadText.onLoad = function(success) {
if (success) {
// trace(success);
newsBox.html = true;
newsBox.htmlText = this.myNews;
}
};
}
I believe i can keep the mousedown fx seperate from my text upload code seeing as there will be many buttons and i want 3 faders performing the same action, all with different text of course. I am sorry i dont have a URL for this yet, as it is still a work in progress, and i can post a sample if anyone needs a visual aid. Any adice is very very welcome.
Thanks,
Eric
P.S. The reason i would like the text to load this way is I will be changing the information weekly and this seems like the easiest most hassle free way of doing that. Thanx...
How To Create Image Swapper Fader?
Hi there,
Can someone point me in the direction of a tutorial on how to create an image swapper like many sport sites like ESPN use to swap images.
I dont just want to swap them, i would like to do the fade out where one image is seen at the same time as another for a brif moment. I think this is much more profesional looking.
Also is there any way to dynamically determine images to be swapped in and out so that a user could upload files to be swapped out in future rather than me having to change them for them?
Thanks a bunch
Richard
Streaming Mp3 With Sound Toggle Fader
Hi folks,
What I'm looking to do with the attached file is call up the published swf on my main page using loadMovieNum("sound.swf", 2);
What's happening is that the sound graphic appears, but the sound isn't playing?
Any ideas why this is?
P.S. Forget the mp3 that is on the file - it's the only sound I have thats small enough to ensure the fla is a reasonable size to attach!
Thanks.
Dragable Fader And Sizing As Displayed...
Hello!
We are working on an application and I need to find a way to adjust this dragable fader so that even though it is only going from values of 25 to 4 and storing that number in a variable, I need the visual representation to be larger.
Attached is the FLA file. You can notice what we are trying to do. The first of the faders I have edited to make fit. However, we want the visual fader to be able to go the full length, like the second and third faders, however since the variables are tied together and The fader knob can only move as high or low as the alloted value, I cannot figure out how to make the visual representation work.
Let me know what you think. To sum it up, we need the visual representation to look like #2 and #3, but the data representation to look like #1. Thanks again!
Fader Loading .txt Using Mousedown Rollover
Hello all. This may be an easy question with a much easier way to preform this task, but ive only been learning flash for less than a week. Anyway I want a fader where, when a user scrolls through the fader, for every, say, 20-30pixles another group of text appears in a text box. I figure i can achive this by putting hidden buttons along the fader at points I want the text to change. The problem i am having is getting the mousedown code to work with loading a .txt file from notepad.
On a blank movie:
onClipEvent(mouseDown){_root.mouseIsDown = true;}
onClipEvent(mouseUp)(_root.mouseIsDown = false;}
On another movie clip:
onClipEvent(enterFrame){
if(_root.mouseIsDown && _parent.hitTest(_root._xmouse, _root._ymouse)){
That all makes for a perfect trace, yet when i try to attach this I get nothing:
loadText = new loadVars();
loadText.load("TEXT1.txt");
loadText.onLoad = function(success) {
if (success) {
// trace(success);
newsBox.html = true;
newsBox.htmlText = this.myNews;
}
};
}
I believe i can keep the mousedown fx seperate from my text upload code seeing as there will be many buttons and i want 3 faders performing the same action, all with different text of course. I am sorry i dont have a URL for this yet, as it is still a work in progress, and i can post a sample if anyone needs a visual aid. Any advice is very very welcome.
Thanks,
Eric
P.S. The reason i would like the text to load this way is I will be changing the information weekly and this seems like the easiest most hassle free way of doing that. Thanx...
And yes the last portion is from this wonderful post:
http://www.kirupa.com/developer/mx/m...ynamictext.htm
Sound Fader Toggle Button
I followed the tutorial that was recommended on Flashkit.com for the toggle button with sound fade and it worked great. However, I have a little problem. I created a website entirely in Flash, but rather than create a single navigation with a container MC and then load mc for each page, I created one MC with scenes for each page. (I haven’t quite mastered the single nav thing yet…baby steps.) So I have my music clip loading on the intro animation and then the site loads and the music plays continually. I have placed the sound button on each page, so when you click the button, the music fades out. I altered the script so that the volume would be 100 and not 0, but that doesn’t seem to be the problem. When you click on another page, the music is playing up full again. I need the sound clip to only play (or not play) if the button is clicked. Given the way my site is built, is this possible? Perhaps there should be an If- Then code to see if the music is playing or not. Any help is appreciated. Here is the code as I have it on each page.
var s = 1;
// initiate sound
music = new Sound();
music.attachSound("firstsound");
music.start(0, 999999);
// set the volume of the sound to zero
music.setVolume(100);
// set a variable named 'vol'
vol = 100;
// set another variable named 'fade', putting a setInterval function in it
fade = setInterval(fadeIn, 100);
// set the initial fade in function
function fadeIn() {
// fade the sound in with an increment of 3 in the variable 'vol'
vol += 20;
music.setVolume(vol);
// put an if condition to restrict the increment in volume after it reaches to 100
if (vol>=100) {
clearInterval(fade);
// create the 'step' variable
step = 1;
// create the 'fade' variable
Fade = 0;
}
}
// create the fade in and out function
// function executed on onEnterFrame
_root.onEnterFrame = function() {
// set fade out
if (Fade == 1) {
vol = vol-step;
if (vol<0) {
vol = 0;
}
music.setVolume(vol);
// set fade in
} else {
vol = vol+step;
if (vol>100) {
vol = 100;
}
music.setVolume(vol);
}
};
Thanks for any help or ideas.
[FMX] Question About A Working Button Fader :)
Hey everyone. Im not the best actionscripter but i figure my way out of things.
Heres my question about oddly enough a working script. heh..
I made a button that fades up a movieclip and then the movieclip keeps fading down and up until on rollout where it fades it down. Now, i use a delete this.onEnterFrame; on the fade out button but im not sure if i should delete this.onEnterFrame in the functions where i fade up and down aswell. If so where/how?
Also, you guys probably know a better solution for this so feel free to post that aswell, but pls post answer for the first question aswell so i learn it. (Im probably doing something wrong too, as always.)
Here is the AS:
Code:
fadein = function(){
if (white_1._alpha<=100) {
white_1._alpha += 5;
} else{
this.onEnterFrame = fadeout;
}
}
fadeout = function(){
if (white_1._alpha>=0) {
white_1._alpha -= 5;
} else{
this.onEnterFrame = fadein;
}
}
fadeout2 = function(){
if (white_1._alpha>=0) {
white_1._alpha -= 5;
} else{
delete this.onEnterFrame;
}
}
And for the button:
Code:
on(rollOver){
this.onEnterFrame = function(){
fadein();
}
}
on(rollOut){
this.onEnterFrame = function(){
fadeout2();
}
}
Thanks for any help!
Sound Fader/mp3 Player Component
never even noticed this forum section before.. very nice.. anyhow thought I'd share a component I just completed. It was meant to just stream in an array or xml file with a list of mp3's and allow the user to fade the sound out (or in) by clicking on the component.. Gradually though I added enough methods to make it a decent (albeit still simple) mp3 player..
anyway, the component is here:
http://www.onebyonedesign.com/downlo...SoundFader.zip
And an example .fla using it as a player is here:
http://www.onebyonedesign.com/downloads/sf_example.zip
Only works in the flash 7 player..
Fader Loading .txt Using Mousedown Rollover
Hello all. This may be an easy question with a much easier way to preform this task, but ive only been learning flash for less than a week. Anyway I want a fader where, when a user scrolls through the fader, for every, say, 20-30pixles another group of text appears in a text box. I figure i can achive this by putting hidden buttons along the fader at points I want the text to change. The problem i am having is getting the mousedown code to work with loading a .txt file from notepad.
On a blank movie:
onClipEvent(mouseDown){_root.mouseIsDown = true;}
onClipEvent(mouseUp)(_root.mouseIsDown = false;}
On another movie clip:
onClipEvent(enterFrame){
if(_root.mouseIsDown && _parent.hitTest(_root._xmouse, _root._ymouse)){
That all makes for a perfect trace, yet when i try to attach this I get nothing:
loadText = new loadVars();
loadText.load("TEXT1.txt");
loadText.onLoad = function(success) {
if (success) {
// trace(success);
newsBox.html = true;
newsBox.htmlText = this.myNews;
}
};
}
I believe i can keep the mousedown fx seperate from my text upload code seeing as there will be many buttons and i want 3 faders performing the same action, all with different text of course. I am sorry i dont have a URL for this yet, as it is still a work in progress, and i can post a sample if anyone needs a visual aid. Any advice is very very welcome.
Thanks,
Eric
P.S. The reason i would like the text to load this way is I will be changing the information weekly and this seems like the easiest most hassle free way of doing that. Thanx...
And yes the last portion is from this wonderful post:
http://www.kirupa.com/developer/mx/m...ynamictext.htm
Sound Fader Toggle Button
I followed the tutorial that was recommended on Flashkit.com for the toggle button with sound fade and it worked great. However, I have a little problem. I created a website entirely in Flash, but rather than create a single navigation with a container MC and then load mc for each page, I created one MC with scenes for each page. (I haven’t quite mastered the single nav thing yet…baby steps.) So I have my music clip loading on the intro animation and then the site loads and the music plays continually. I have placed the sound button on each page, so when you click the button, the music fades out. I altered the script so that the volume would be 100 and not 0, but that doesn’t seem to be the problem. When you click on another page, the music is playing up full again. I need the sound clip to only play (or not play) if the button is clicked. Given the way my site is built, is this possible? Perhaps there should be an If- Then code to see if the music is playing or not. Any help is appreciated. Here is the code as I have it on each page.
var s = 1;
// initiate sound
music = new Sound();
music.attachSound("firstsound");
music.start(0, 999999);
// set the volume of the sound to zero
music.setVolume(100);
// set a variable named 'vol'
vol = 100;
// set another variable named 'fade', putting a setInterval function in it
fade = setInterval(fadeIn, 100);
// set the initial fade in function
function fadeIn() {
// fade the sound in with an increment of 3 in the variable 'vol'
vol += 20;
music.setVolume(vol);
// put an if condition to restrict the increment in volume after it reaches to 100
if (vol>=100) {
clearInterval(fade);
// create the 'step' variable
step = 1;
// create the 'fade' variable
Fade = 0;
}
}
// create the fade in and out function
// function executed on onEnterFrame
_root.onEnterFrame = function() {
// set fade out
if (Fade == 1) {
vol = vol-step;
if (vol<0) {
vol = 0;
}
music.setVolume(vol);
// set fade in
} else {
vol = vol+step;
if (vol>100) {
vol = 100;
}
music.setVolume(vol);
}
};
Thanks for any help or ideas.
[FMX] Question About A Working Button Fader :)
Hey everyone. Im not the best actionscripter but i figure my way out of things.
Heres my question about oddly enough a working script. heh..
I made a button that fades up a movieclip and then the movieclip keeps fading down and up until on rollout where it fades it down. Now, i use a delete this.onEnterFrame; on the fade out button but im not sure if i should delete this.onEnterFrame in the functions where i fade up and down aswell. If so where/how?
Also, you guys probably know a better solution for this so feel free to post that aswell, but pls post answer for the first question aswell so i learn it. (Im probably doing something wrong too, as always.)
Here is the AS:
Code:
fadein = function(){
if (white_1._alpha<=100) {
white_1._alpha += 5;
} else{
this.onEnterFrame = fadeout;
}
}
fadeout = function(){
if (white_1._alpha>=0) {
white_1._alpha -= 5;
} else{
this.onEnterFrame = fadein;
}
}
fadeout2 = function(){
if (white_1._alpha>=0) {
white_1._alpha -= 5;
} else{
delete this.onEnterFrame;
}
}
And for the button:
Code:
on(rollOver){
this.onEnterFrame = function(){
fadein();
}
}
on(rollOut){
this.onEnterFrame = function(){
fadeout2();
}
}
Thanks for any help!
Flash XML Image Fader Problems
I got the original idea from another post on this site:
Flash xml slideshow using actionscript for loading next image automatically
So... I messed around with the code, and got the images to fade with each other ... but there is a big discontinuity happening. Like the first image fades into the second, and then *BLINK* and then the second image fades into the next.... etc...
Any Ideas?
Code:
var container:MovieClip = this.createEmptyMovieClip("container", this.getNextHighestDepth());
var loader1:MovieClip = this.createEmptyMovieClip("loader1", this.getNextHighestDepth());
var loader2:MovieClip = this.createEmptyMovieClip("loader2", this.getNextHighestDepth());
container._x = 0;
container._y = 0;
function fadeImageNext() {
var fadeTween1 = new mx.transitions.Tween(loader1, "_alpha", mx.transitions.easing.Regular.easeOut, 100, 0, 2, true);
var fadeTween2 = new mx.transitions.Tween(loader2, "_alpha", mx.transitions.easing.Regular.easeIn, 0, 100, 2, true);
// Fade the one image in
loadMovie(imagePath, loader1)
// Get the next image ready to fade
nextSlideImage();
// Fade out the image
loadMovie(imagePath, loader2)
}
// Create XML Object
slideshow_xml = new XML();
// Find out what this does
slideshow_xml.onLoad = startSlideShow;
//Load XML file
slideshow_xml.load("slideshow.xml");
//Ignore Whitespace in XML Document
slideshow_xml.ignoreWhite = true;
//Create Function for Slideshow - Shows first slide and initalises variables
function startSlideShow(success) {
if (success == true) {
rootNode = slideshow_xml.firstChild;
totalSlides = rootNode.childNodes.length;
thisSlideNode = rootNode.firstChild;
nextSlideNode = thisSlideNode.nextSibling;
currentIndex = 1;
updateSlide(thisSlideNode);
fadeImageNext();
}
}
function updateSlide(newSlideNode) {
imagePath = newSlideNode.attributes.jpgURL;
slideText = newSlideNode.firstChild.nodeValue;
}
function nextSlideImage() {
nextSlideNode = thisSlideNode.nextSibling;
if (nextSlideNode == null) {
rootNode = slideshow_xml.firstChild;
totalSlides = rootNode.childNodes.length;
thisSlideNode = rootNode.firstChild;
currentIndex = 1;
updateSlide(thisSlideNode);
} else {
currentIndex++;
updateSlide(nextSlideNode);
thisSlideNode = nextSlideNode;
}
}
slideTimer = setInterval(fadeImageNext, 5000);
Volume Fader Stops My Background Loop
Hi,
I'm creating a site in which I use a background audio loop. I've created a fader to adjust the volume, which works - sort of.
I used this Kirupa tutorial to create my fader:
http://www.kirupa.com/developer/mx/volume_slider.htm
The only thing is that I need the loop to be playing from the start of the movie, and then for the user to be able to fade it in and out to his or her liking.
The loop is pulled from the library using a sound object with a linkage ID, and then told to begin playing:
bkgdmusic = new Sound();
bkgdmusic.attachSound("music");
bkgdmusic.start(0, 999);
(This is in the first frame of a MC)
What I'm finding is that the sound starts for about a second, and then stops until you move the slider. I'm guessing that this is probably something to do with the code within the fade control, which is executed when that clip loads.
It seems like a simple thing to do, but all the tutorials I find seem only to cater for music players with 'play' / 'stop' buttons, which I don't really want.
Any ideas or links to tutorials? Help is much appreciated as always..
Cheers
Having Trouble With Image Fader, Stops Working
I'm using actionscript to have a few images fade in/out at the top of my main page. I'm loading it as a separate swf because I want it to go away when other pages are accessed. The problem is, if you click on "ABOUT US" more than a few times to get back to that page, the image fader stops working. A couple times it will fade the images in but not out, and then after that it just majorly messes up. I don't understand when it works fine for a couple of loads.
Here's the page: http://crimsonmedia.com/ONTHEFLY
Click on "MENUS", the only ones working as of now are "CORPORATE LUNCHES" and "DELI ITEMS". After clicking on any of them, go back to "ABOUT US". Or just load "ABOUT US" a few times. It stops working. Ugh.
Any ideas as to why this is happening?
Also I tried to post the code but it cuts off...too long for a post I guess? Here is a text link: http://crimsonmedia.com/ONTHEFLY/ontheflycode.rtf
|