Onenter Frame Alpha Fade
Hi FlashKit'ers, i have a quick question that seems very easy ,even for me. But i just can't seem to get it down.
My scenario:
I'm trying to make a transition effect here. a'la this tutorial Now, when the closing animation ends, i need the "container" movie clip to alpha fade so that the other movie can load into it. So basically, i just need to know how to have an emptymovieclip alpha fade when the movie enters a frame (say23).
This is what i have so far.
Code:
onClipEvent(enterFrame){
_root.content._alpha -= 1;
}
[EDIT]
Alright, i made a huge mistake that i just caught, i shouldn't even be using the onClipEvent, right?[/EDIT]
But, it isn't working for some reason. Any help? Thanks, take care.
FlashKit > Flash Help > Flash ActionScript
Posted on: 06-05-2004, 01:27 AM
View Complete Forum Thread with Replies
Sponsored Links:
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
OnEnter Frame-or Omething Like It?
Hi,
Im trying to control the loading of an exrenal swf into my main movie. I dont want to rely on a mouse click to load the movie. Back in the day, in Director, I cold have used 'onEnterFrame'. Is there anything like onEnter frame in flash? or any other way to load a movie without having to click anywahere. Maybe a frame script of sorts?
Thanks!
Nyxtrance
View Replies !
View Related
OnEnter/Exit Frame?
Hi there!
I want to be able to set the visiblilty of a movie clip true/false from one frame.
I was given this code, but it doesn't seem to work...
this.onEnterFrame=function() {
if (this._currentframe==1) {
_root.window_mc.something.._visible=true;
} else {
_root.window_mc.something.._visible=false;
}
}
.. that kind of thing.
Anybody?
Cheers!
View Replies !
View Related
Alpha Fade Through One Frame
The code below is used to show bigger images of a thumbnail gallery. What I'm trying to do now is preload all of the images into containers, then fade them in when they're called. So this code is on the frame where this is supposed to happen, but for "sheart" it only barely fades in (gets to the first step) before stopping, and "gzilla" of course just pops in at full alpha. What I want is a smooth transition. Is this possible??
Thanks for any help.
Code:
if (art == "sheart"){
if (_root.container1._alpha < 100) {
_root.container1._alpha += 5;
}
} else if (art == "gzilla"){
_root.container2._alpha = 100;
}
View Replies !
View Related
Fade MC Alpha With Frame Script
I have an mc named 'loading' on my main movie timeline.
Through a framescript I'd like to fade the mc's alpha to 0 and then once it's at zero, move to the next frame. Can someone send me an actionscript example of this please?
Thanks
-Foochuck
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
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
Calling Alpha Value To Start Another Alpha Fade?
hey all!
okay so here's the deal I'm on a mission to make these buttons fade in one after another using a.s
and I'd like all my code to be in one frame [don't we all though ]
so far i have one fading in using
Code:
this.onEnterFrame = function() {
if(btn1._alpha < 100) {
btn1._alpha += 10;
}
}
now when i said i wanted the buttons to fade in one after another i was kinda fibbing ... what i really want is when btn1 reaches an alpha of 40 i want btn2 to start this same fade in process, then when btn2 reaches 40 i want btn3 to do the same and so on...
see the effect here [you have to enter the site] when you click on work, troops & contact
now i have also been searching for a easy to understand tutorial on how to make your own functions [that's the one where you can write a whole bunch of code stuff then call it later using only a little code, right?
well obviously i want to use this idea so i don't have to write out [okay lets be real here - copy and paste] the fade in code each time.
that way i figure i can say
if(btn1._alpha = 40)
do the function thingy to btn2
i tried this a.s, it only results in btn2 fading in as asked but btn1 stops fading at 40
Code:
if(btn1._alpha = 40) {
this.onEnterFrame = function() {
if(btn2._alpha < 100) {
btn2._alpha += 10;
}
}
}
any ideas would be the shizzel bo dizzel nizzel!
cheers fo' all the help so far!
-demian
View Replies !
View Related
Calling Alpha Value To Start Another Alpha Fade?
hey all!
okay so here's the deal I'm on a mission to make these buttons fade in one after another using a.s
and I'd like all my code to be in one frame [don't we all though ]
so far i have one fading in using
Code:
this.onEnterFrame = function() {
if(btn1._alpha < 100) {
btn1._alpha += 10;
}
}
now when i said i wanted the buttons to fade in one after another i was kinda fibbing ... what i really want is when btn1 reaches an alpha of 40 i want btn2 to start this same fade in process, then when btn2 reaches 40 i want btn3 to do the same and so on...
see the effect here [you have to enter the site] when you click on work, troops & contact
now i have also been searching for a easy to understand tutorial on how to make your own functions [that's the one where you can write a whole bunch of code stuff then call it later using only a little code, right?
well obviously i want to use this idea so i don't have to write out [okay lets be real here - copy and paste] the fade in code each time.
that way i figure i can say
if(btn1._alpha = 40)
do the function thingy to btn2
i tried this a.s, it only results in btn2 fading in as asked but btn1 stops fading at 40
Code:
if(btn1._alpha = 40) {
this.onEnterFrame = function() {
if(btn2._alpha < 100) {
btn2._alpha += 10;
}
}
}
any ideas would be the shizzel bo dizzel nizzel!
cheers fo' all the help so far!
-demian
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
Fade Out, Fade In Alpha Efect
fade out, fade in alpha efect
i 'm a jpg file, who make it movie clip, with alpha = 50 %.
on mouse over action i wanna set alpha on this picture = 0, but i wanna make this with little transition. i try this, but i don't make it, because i need set pu some variables, but i don't know how.
please help me. best regards for all who help me. sorry for my english, i don't speek english verry well.
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
MyButton OnEnter
Hello. I have a question dealing with a form in flash. I have a function called checkInput that i am able to call when I press myButton. I want to call that funtion as well when the button has focus and you press enter. Right now I have a
myButton.onSetFocus = function() {
followed by
if(Key.isDown(13))
or
if (Key.getCode() == Key.ENTER)
and then {checkInput();}
I tried some other things to but I cant seem to get this. Can anyone heklp me? Thanks.
View Replies !
View Related
Slow Down --cant Remove OnEnter Function
Hi,
I have a fla associated with a document class, called Main.as--In the fla's library I have a movieclip associated with another class, called TVNoise--this code is used to create noise or tv like static during the transitions when a swf is being loaded--the problem is I cant seem to be able to remove the event listener in the TVNoise class from code within the Main class--
After much trial and error I successfully(I think)removed the TVNoise from the main movie by removing its container from the display list. However, doing this doesnt seem to remove the event listener--I dont even know if the TVNoise is being removed or only the container,as from the Main.as I cant even reference it in the display list--However, there is a significant performance issue, so Im almost certain that its still running--How can I turn off the TVNoise from the Main class?
Here is the complete code for the TVNoise class, which is linked to a clip in the fla library entitled noise2 which in and off itself contains another instance of a movie clip in the library:
Code:
package {
import flash.display.MovieClip;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.BitmapDataChannel;
import flash.events.Event;
import flash.geom.Point;
import flash.filters.BlurFilter;
public class TVNoisebk extends MovieClip {
private var bitmap2:BitmapData;
private var _seed2:Number;
private var image2:Bitmap;
public function TVNoisebk() {
bitmap2=new BitmapData(800, 400,true,0xff000000);
bitmap2.noise(_seed2,0,25,BitmapDataChannel.RED,true);
bitmap2.applyFilter(bitmap2,bitmap2.rect,new Point(), new BlurFilter(3,1,3));
var image2:Bitmap = new Bitmap(bitmap2);
image2.x=20;
image2.y=60;
addChild(image2);
_seed2 = Math.random() * 100000;
addEventListener(Event.ENTER_FRAME, onEnterFrame2,false,0, true);
}
public function onEnterFrame2(event:Event):void {
_seed2 = Math.random() * 100000;
bitmap2.noise(_seed2,100,255,BitmapDataChannel.RED,true);
}
}
}
Here is the code from the Main.as class where I add and try to remove the tvnoise transition effect:
Code:
var swfHolder = new Loader();
function loadSwf(target:String) {
mainImage.addChild(swfHolder);
swfHolder.load(new URLRequest(target));
}
function removeSwf() {
swfHolder.unload();
}
function addtrans() {
var transmc:MovieClip =new TVNoisebk;
transmc.alpha=.8;
transmc.x=-20;
transmc.y=-100;
transition.addChild(transmc);
//transition is just a blank movieclip
/*var dob:DisplayObject=getChildByName("transmc");
var dobIndex:int =getChildIndex(dob);
trace(dobIndex);*/
}
//Here is where I try to remove the TVNoise by removing its holder, "transition"--I couldnt remove it directly so this was the only solution I could find......
function removetrans() {
trace("swf loaded");
/*var transmc:MovieClip =new TVNoisebk;*/
/*transmc.alpha=0;*/
removeChild(transition);
transmc=null;
transition=null;
}
function clickOne(Event:MouseEvent):void {
remspin();
transition.play();
select=1;
if (caro==false) {
addtrans();
loadSwf("finished.swf");
}
}
Thanks,
---Yvette
View Replies !
View Related
Alpha Fade
Hi
I have a graphic that I want to give the appearance of it being solid at one side gradually become more transparent then become solid again.
Its hard to explain. check out http://www.northwave.com/snow.asp in the mens boots section the boot selector at the top. At the edges the boots are only just visible. It just occured to me that its probably the boots that are changing not something over them.
Would I have to change the Alpha of the stuff thats moving,
or can i set up some kind of gradient aplha ?
Thanks in advance.
View Replies !
View Related
Alpha Fade
Hello!
Is there any way of fadeing alpha on a external swf (i dont mean the setproprety, but something with timer or anything else that will do the trick)
Ty in advance
View Replies !
View Related
Alpha Fade
I am stuck on a piece of pretty basic scripting. I have two two movie clips on the screen. clip #1 has the following scipt attached to it:
on (rollOut) {
with (_root.Ssuccess) {
var myClip = _root.Ssuccess;}
myClip._alpha = myClip._alpha + (random(20)-4);
}
the clip "Ssuccess" has alpha property set to zero.
What I want to happen: When someone rolls out of clip#1, the clip "Ssuccess" will appear and then slowly fade out. What does happen: on the roll out "Ssuccess" appears just fine, it appear lighter or darker depending on the random function, but it doesn't fade out. It stay just as it first appeared.
Can anyone help me with this? What am I doing wrong?
Thanks: jmmdmt
View Replies !
View Related
Swf Alpha Fade
3 menu buttons & 3 external swf's
click button 01 > 01.swf fades in
click button 02 > 01.swf fades out & 02.swf fades in
click button 03 > 02.swf fades out & 03.swf fades in
click button 02 > 03.swf fades out & 02.swf fades in
etc.
how is it possible to tell each button of the menu, that it should fade out every movie on the stage onmouse(release) whether it is swf.1, swf.2 or swf.3
please help anyone, need to finish a project and only need the AS for this -to finish it.
I don't know how to make the buttons work independently and not only covering only one swf.file.
Thanks for your help in advance !
View Replies !
View Related
Fade In/Out Alpha
I've finally graduated to MX, but the one thing I cannot find it where to set the Alpha for fading in and out.
I've checked throughout the board and checked thoughout Mac's Help pages, and everything indicates that my Properties will drop down a color option that allows Alpha, etc.
The Properties on my MX only has Tween and Sound options.
Uhm... help?
View Replies !
View Related
Alpha And AS Fade In And Out
can someone tell me how to go back on an AS Alpha fade out. I am really stuck here and have been up all night.
the pages have 4 images to alpa out together and back upon return. having trouble on the return side. I am using
onClipEvent(enterFrame){
if(_alpha < 100){
_alpha += 10;
}
}
and -=10 on the other side
View Replies !
View Related
Alpha Fade In And Out
I need a quick fix here kind of. Ive been trying to figure out a quick way of how to fade images in and out. This is what i have so far...
onClipEvent (load) {
this._alpha = 0;
}
onClipEvent (enterFrame) {
this._alpha += 2;
}
well that gets the image to fade in...but i dont know how to get it to fade back out.
If you look at my image that i have attached...basicaly i am wanting each one of the small images to fade in then out...and they would not show up in the same place, the layout of where the pictures are would vary, and i want to pull the pictures from a directory...so to make changes i just upload new images. If someone can give me an outline so to speak of how to do this that would be great. I really want to try and accomplish this with as much actionscript as i can though...i want to stay away from motion tweening.
If anyone can help that would be great, thanks
View Replies !
View Related
Alpha Fade
Im tring to get a movie Instance(wigpic) to fad in. How do I set up a length of time code. I think its running my whole loop then showing the picture.
This is what I have
wigpic._alpha = 0;
for (var a=0; a<20; a++){
wigpic._alpha += 5;
}
View Replies !
View Related
Fade In/out With Alpha
I know that alpha is used for fading. I want to fade some text in and out. I select the text and set alpha to 0%. I then add some key frames and add a motion tween. I then go to the last frame and set the aplha back up to 100%. But It doesnt recognize it as a motion. Also somethimes it will show the object but alpha will be at 0% or nothing will show and it will be at 100%. What am I doing wrong here. I just want to fade some text in and out. How do I do it?
View Replies !
View Related
Need Some Help Please - With Alpha Fade..
I havn't used flash since flash 3 and am now using flash mx. I began to make a very simple fla with 1 movie object, that has 10 frames. The frames are not tweened, well you can see at http://www.debt-management-usa.com/sample.fla .. For some unknown reason, the alpha does not show up. The increase in the size of the graphic works, but the alpha does not. Can anyone please look at this and tell me what I am doing wrong.
When explorting or testing scene, the alpha does not work..Baffles me.
Thank you,
Nick
View Replies !
View Related
Fade - Alpha
does anyone know a way that I can tell movieclip to fade by placing the code in a frame. I've seen ways of doing it using buttons but when I try to redo the code it doesn't work.
basically I have 4 frames with 4 different movies in them. When you go to, lets say, frame 2 movieclip 2 fades. When you go to frame 3 movieclip 3 fades and etc.
Any ideas or tutorials. Never used alpha before.
View Replies !
View Related
Alpha Fade
Hello:
I have seen it on this forum...a way to make something fade with as.
I have this (to set the alpha to zero...)
setProperty("/ab", _alpha, "0");
}
but what would it be to go from 100 to 0...???
Thanks,
Bluej2
View Replies !
View Related
Alpha Fade
I have this code for thumbnails, and it all works except for one thing.
I want them to load at _alpha = 50;
I don't know how to make it happen.
Any suggestions?
Thanks!
thn1 = this.createEmptyMovieClip("t1", this.getNextHighestDepth());
thn1.createEmptyMovieClip("h", 1);
_root.mcl.loadClip(_root.basepath + "thumbnails/" + myFile, thn1.h);
thnMask = this.attachMovie("thumbMask", "thumbMask", this.getNextHighestDepth());
thn1.setMask(thnMask);
thn1.maskref = thnMask;
onRelease = function() {
_alpha = 100;
if(!isLit && enableActions) {
path = String(_root.basepath) + String(myFile);
_root.myPicLoader.contentPath = path;
_root.currentPic = myNumber;
_parent["x"+_root.currentNumber].swapDepths(_parent["z"+_root.currentNumber]);
_parent["x"+_root.currentNumber].isLit = false;
this.swapDepths(_parent["z"+myNumber]);
_root.currentNumber = myNumber;
_root.currentCaption = myCaption;
isLit = true;
}
}
onRollOver = function() {
_alpha = 50;
}
onRollOut = function() {
_alpha = 100;
}
View Replies !
View Related
Fade Alpha Value
I am trying to fade in and out a sprite with no success. I am porting this functionality from as2 but it does not seem to work. What am I doing wrong?
ActionScript Code:
package
{
import flash.display.*;
import flash.events.*;
public class Fader extends Sprite
{
private var _mc:Sprite;
private var _fadeSpeed:Number;
private var _fadeOutValue:Number;
private var load_track:Sprite;
private var b1:Sprite;
public function Fader()
{
b1 = new Sprite();
b1.graphics.beginFill(0x333333, 1);
b1.graphics.drawRect(5, 5, 20, 20);
b1.graphics.endFill();
addChild(b1);
b1.addEventListener(MouseEvent.MOUSE_DOWN, fade_02);
load_track = new Sprite();
load_track.graphics.beginFill(0x333333, 1);
load_track.graphics.drawRect(100, 100, 100, 100);
load_track.graphics.endFill();
load_track.alpha = 0;
addChild(load_track)
fade_01(load_track, "in", .1);
}
private function fade_02():void
{
_mc = load_track;
_fadeSpeed = 0.1;
_fadeOutValue = 0;
addEventListener(Event.ENTER_FRAME, fadeOut);
}
private function fade_01(mc:Sprite, type:String, fadeSpeed:Number = 0, fadeOutValue:Number = 0):void
{
_mc = mc;
_fadeSpeed = fadeSpeed;
_fadeOutValue = fadeOutValue;
if (type == "in") {
addEventListener(Event.ENTER_FRAME, fadeIn);
} else if (type == "out") {
addEventListener(Event.ENTER_FRAME, fadeOut);
}
}
private function fadeIn():void
{
if (_mc.alpha < 1) {
_mc.alpha += _fadeSpeed;
} else {
removeEventListener(Event.ENTER_FRAME, fadeIn);
}
}
private function fadeOut():void
{
if (_mc.alpha > 0) {
_mc.alpha -= _fadeSpeed;
} else {
removeEventListener(Event.ENTER_FRAME, fadeOut);
}
}
}
}
View Replies !
View Related
Help With Alpha Fade
I have a button that effects the alpha of an MC on mouseover. I can't figure out how to create a fade with the alpha shift.
This is what I'm using right now. AS is placed on button that controls the MC.
on (rollOver){
_root.background.frame_2._alpha = 25;
_root.background.frame_3._alpha = 25;
_root.background.frame_4._alpha = 25;
_root.background.frame_5._alpha = 25;
_root.background.frame_6._alpha = 25;
}
on (rollOut){
_root.background.frame_2._alpha = 100;
_root.background.frame_3._alpha = 100;
_root.background.frame_4._alpha = 100;
_root.background.frame_5._alpha = 100;
_root.background.frame_6._alpha = 100;
}
Thanks for any assistance.
View Replies !
View Related
Fade Alpha?
i am trying to have a list of sponsors for a band page and i want to make the list of sponsors fade in when your mouse gets close to the MC. I am trying to learn AS so i tried to think of a way to do it and i'm close but i can figure out how to get the fade right...it just goes to exact points. 10% to 100% but no fade? does that make any sense.
Code:
onClipEvent (load){
_root.sponsors._alpha = 10
}
on (rollOver) {
_root.sponsors._alpha = 100;
}
on (rollOut) {
_root.sponsors._alpha = 10;
}
View Replies !
View Related
Alpha Fade
http://www.kirupa.com/developer/mx/alpha_fade.htm
I was interested in doing something like that, but it says your image must be 400x400. The spot I want to do this in can only fit 528x162, what do I have to change in the action script to make it work for the smaller image size?
View Replies !
View Related
Fade/Alpha Help
I am trying to split my site into three sections, and I am trying to do this by having the home page contain a flash animation that would work like this:
Begining:
[Pic1a] [Pic2b] [Pic3c]
(assuming you have a pic a,b,c for each number)
Hover over Pic2:
[Pic2a] [Pic2b] [Pic2c]
I hope you got that diagram. Anyway, I want it to crossfade into the different images. And if you hover on another picture it fades seemlessly without jumping back to no fade at all.
Does anyone know where there is a tutorial that can help, or is there anyone who just knows?
Thank you,
GOLDfish!
View Replies !
View Related
Alpha Fade AS 2.0
Code:
MovieClip.prototype.fadeIn = function(speed){
this.onEnterFrame = function(){
this._alpha+=speed;
if(this._alpha >= 100) delete this.onEnterFrame;
}
}
MovieClip.prototype.fadeOut = function(speed){
this.onEnterFrame = function(){
this._alpha-=speed;
if(this._alpha <= 0) delete this.onEnterFrame;
}
}
var pic_arr:Array = new Array("images/goldstein.png", "images/kyle.png", "images/timmy.png");
pic_arr.sort(function () {
return random(2) ? true : false;
});
trace(pic_arr);
display();
function display() {
player_mc.loadMovie(pic_arr[1]);
player_mc.fadeIn(3);
player_mc2.loadMovie(pic_arr[2]);
player_mc2.fadeIn(3);
}
stop();
This code isnt working to fade in my loaded images. am i missing something?
View Replies !
View Related
Alpha Fade Of 0 In 16-Bit Is Not Possible
It is not possible to have anything at 0 transparency in 16 bit colour mode using an Alpha Effect.
I have tried a flash symbol, text, object in fact everything.
And you can never get the object to be 100% transparent on a coloured background. There is no work around, nothing can be done to correct this. I give up!
View Replies !
View Related
Help With Alpha Fade
I have a button that effects the alpha of an MC on mouseover. I can't figure out how to create a fade with the alpha shift.
This is what I'm using right now. AS is placed on button that controls the MC.
on (rollOver){
_root.background.frame_2._alpha = 25;
_root.background.frame_3._alpha = 25;
_root.background.frame_4._alpha = 25;
_root.background.frame_5._alpha = 25;
_root.background.frame_6._alpha = 25;
}
on (rollOut){
_root.background.frame_2._alpha = 100;
_root.background.frame_3._alpha = 100;
_root.background.frame_4._alpha = 100;
_root.background.frame_5._alpha = 100;
_root.background.frame_6._alpha = 100;
}
Thanks for any assistance.
View Replies !
View Related
Fade Alpha?
i am trying to have a list of sponsors for a band page and i want to make the list of sponsors fade in when your mouse gets close to the MC. I am trying to learn AS so i tried to think of a way to do it and i'm close but i can figure out how to get the fade right...it just goes to exact points. 10% to 100% but no fade? does that make any sense.
Code:
onClipEvent (load){
_root.sponsors._alpha = 10
}
on (rollOver) {
_root.sponsors._alpha = 100;
}
on (rollOut) {
_root.sponsors._alpha = 10;
}
View Replies !
View Related
How Do You AS An Alpha Fade?
How can I use ASv2 to script a nice slow alpha fade of a MC? Understandably, something like
for (x=1; x<100; x++){
my_mc._alpha = x;
}
Does it way too fast. I've been trying different methods of "intervals" and "timers", but so far, they usually just cause script aborts.
View Replies !
View Related
Alpha Fade In & Fade Out
Ok I am making a tutorial in flash & for that I am having information boxes converted to movieclips that will fade in as & when required for a specific time & then fade away after that time period.
I want a frame code that does the following to the movieclip.
1)fade in from 0 - 100
2)appear for x seconds
3)fade out from 100-0
So far I have managed to get the first 2 working fine, I just cant get it to fade out.
Heres the code :
code:
stop();
box1._alpha = 0;
fadeI = setInterval(fadeF, 100, box1, 1);
// fades up to 100
// fadeI=setInterval(fadeF,100,yourtextfield,-1); // fades to zero
function fadeF(box1, dir) {
box1._alpha += dir*5;
// determines fade speed along with the call interval
if (dir>0 && box1._alpha>=100) {
clearInterval(fadeI);
}
if (dir<0 && box1._alpha<=0) {
clearInterval(fadeI);
}
}
intID = setInterval(delay, 6000);
function delay() {
clearInterval(intID);
fadeA = setInterval(fadeF, 100, box1, -1);
play();
}
I am relatively new to scripting, so please tell me what am I doing wrong here? Thanks for any help
View Replies !
View Related
Alpha Fade In With AS, Can't Get Fade Out
I have 3 jpegs which are loading into a main movie with and alpha fade in using actionscript. I thought this was all I was looking for with these (because someone helped me get through that) but it turns out that once they are fulled faded in, I would like them to fade back out slowly. Here is the original code:
Code:
_root.createEmptyMovieClip("holder2", 17);
holder2._x = 555;
holder2._y = 112;
function loadIn(movie) {
clearInterval(loadInterval);
holder2.loadMovie(movie);
holder2._alpha = 0;
var temp = _root.createEmptyMovieClip("tmp", 18);
temp.onEnterFrame = function() {
var a = holder2.getBytesLoaded();
var b = holder2.getBytesTotal();
if (b == a && b>4) {
holder2._alpha += 4;
if (holder2._alpha>100) {
holder2._alpha = 100;
delete this.onEnterFrame;
}
}
};
}
loadInterval = setInterval(loadIn, 1050, "intro1.jpg");
_root.createEmptyMovieClip("holder3", 19);
holder3._x = 191;
holder3._y = 112;
function loadIn2(movie) {
clearInterval(load2Interval);
holder3.loadMovie(movie);
holder3._alpha = 0;
var temp2 = _root.createEmptyMovieClip("tmp2", 20);
temp2.onEnterFrame = function() {
var c = holder3.getBytesLoaded();
var d = holder3.getBytesTotal();
if (d == c && d>4) {
holder3._alpha += 4;
if (holder3._alpha>100) {
holder3._alpha = 100;
delete this.onEnterFrame;
}
}
};
}
load2Interval = setInterval(loadIn2, 2050, "intro2.jpg");
_root.createEmptyMovieClip("holder4", 21);
holder4._x = 0;
holder4._y = 112;
function loadIn3(movie) {
clearInterval(load3Interval);
holder4.loadMovie(movie);
holder4._alpha = 0;
var temp3 = _root.createEmptyMovieClip("tmp3", 22);
temp3.onEnterFrame = function() {
var e = holder4.getBytesLoaded();
var f = holder4.getBytesTotal();
if (f == e && f>4) {
holder4._alpha += 4;
if (holder4._alpha>100) {
holder4._alpha = 100;
delete this.onEnterFrame;
}
}
};
}
load3Interval = setInterval(loadIn3, 3050, "intro3.jpg");
I have been trying on my own (and with any info I have found on forums) to modify this code so that once it reaches full alpha (100%) it will fade back out to zero. I was only using the last function which loads intro3.jpeg and this is what I have as of right now:
Code:
_root.createEmptyMovieClip("holder4", 21);
holder4._x = 0;
holder4._y = 112;
function loadIn3(movie) {
clearInterval(load3Interval);
holder4.loadMovie(movie);
holder4._alpha = 0;
var temp3 = _root.createEmptyMovieClip("tmp3", 22);
temp3.onEnterFrame = function() {
var e = holder4.getBytesLoaded();
var f = holder4.getBytesTotal();
if (f == e && f>4) {
holder4._alpha += 4;
if (holder4._alpha>100) {
var g = holder4.getBytesLoaded();
var h = holder4.getBytesTotal();
if (g == h && g<4) {
holder4._alpha -= 4;
if(holder4._alpha=0){
delete this.onEnterFrame;
}
}
}
}
};
}
load3Interval = setInterval(loadIn3, 3050, "intro3.jpg");
But this does not create a slow fade it simply goes to zero alpha once alpha reaches 100%. Any suggestions as to the steps am I missing?
View Replies !
View Related
Alpha Fade In With AS, Can't Get Fade Out
I have 3 jpegs which are loading into a main movie with and alpha fade in using actionscript. I thought this was all I was looking for with these (because someone helped me get through that) but it turns out that once they are fulled faded in, I would like them to fade back out slowly. Here is the original code:
Code:
_root.createEmptyMovieClip("holder2", 17);
holder2._x = 555;
holder2._y = 112;
function loadIn(movie) {
clearInterval(loadInterval);
holder2.loadMovie(movie);
holder2._alpha = 0;
var temp = _root.createEmptyMovieClip("tmp", 18);
temp.onEnterFrame = function() {
var a = holder2.getBytesLoaded();
var b = holder2.getBytesTotal();
if (b == a && b>4) {
holder2._alpha += 4;
if (holder2._alpha>100) {
holder2._alpha = 100;
delete this.onEnterFrame;
}
}
};
}
loadInterval = setInterval(loadIn, 1050, "intro1.jpg");
_root.createEmptyMovieClip("holder3", 19);
holder3._x = 191;
holder3._y = 112;
function loadIn2(movie) {
clearInterval(load2Interval);
holder3.loadMovie(movie);
holder3._alpha = 0;
var temp2 = _root.createEmptyMovieClip("tmp2", 20);
temp2.onEnterFrame = function() {
var c = holder3.getBytesLoaded();
var d = holder3.getBytesTotal();
if (d == c && d>4) {
holder3._alpha += 4;
if (holder3._alpha>100) {
holder3._alpha = 100;
delete this.onEnterFrame;
}
}
};
}
load2Interval = setInterval(loadIn2, 2050, "intro2.jpg");
_root.createEmptyMovieClip("holder4", 21);
holder4._x = 0;
holder4._y = 112;
function loadIn3(movie) {
clearInterval(load3Interval);
holder4.loadMovie(movie);
holder4._alpha = 0;
var temp3 = _root.createEmptyMovieClip("tmp3", 22);
temp3.onEnterFrame = function() {
var e = holder4.getBytesLoaded();
var f = holder4.getBytesTotal();
if (f == e && f>4) {
holder4._alpha += 4;
if (holder4._alpha>100) {
holder4._alpha = 100;
delete this.onEnterFrame;
}
}
};
}
load3Interval = setInterval(loadIn3, 3050, "intro3.jpg");
I have been trying on my own (and with any info I have found on forums) to modify this code so that once it reaches full alpha (100%) it will fade back out to zero. I was only using the last function which loads intro3.jpeg and this is what I have as of right now:
Code:
_root.createEmptyMovieClip("holder4", 21);
holder4._x = 0;
holder4._y = 112;
function loadIn3(movie) {
clearInterval(load3Interval);
holder4.loadMovie(movie);
holder4._alpha = 0;
var temp3 = _root.createEmptyMovieClip("tmp3", 22);
temp3.onEnterFrame = function() {
var e = holder4.getBytesLoaded();
var f = holder4.getBytesTotal();
if (f == e && f>4) {
holder4._alpha += 4;
if (holder4._alpha>100) {
var g = holder4.getBytesLoaded();
var h = holder4.getBytesTotal();
if (g == h && g<4) {
holder4._alpha -= 4;
if(holder4._alpha=0){
delete this.onEnterFrame;
}
}
}
}
};
}
load3Interval = setInterval(loadIn3, 3050, "intro3.jpg");
But this does not create a slow fade it simply goes to zero alpha once alpha reaches 100%. Any suggestions as to the steps am I missing?
View Replies !
View Related
Alpha/fade-in Problem..
Using this code to fade-in a MC:
onClipEvent (load) {
busy = 1
addv = 30
_alpha = 0;
}
onClipEvent (enterframe) {
if (busy) {
if (_alpha >= 100);
busy = 0;
}
_alpha += addv;
}
This works but after a couple minutes, the MC disappears. How can I keep the MC visable indefinitely? Fairly new to actionscripting so any input or sample code would be appreciated.
View Replies !
View Related
Alpha Fade How Do You Time It?
got this script on my time line on an invisable moive clip so everything loads in together
Code:
onClipEvent (load) {
_root._alpha = 0;
}
onClipEvent (enterFrame) {
if (_root._alpha<=100) {
_root._alpha = _root._alpha+5;
}
}
but i would like to take it a step futher
i have three moive clips which fade in and out of each other , at the moment im using tweening but would like to it via action script, any ideas anyone?
View Replies !
View Related
Actionscript Alpha Fade
I have 4 navigation buttons.
When each of the buttons is rolled over an mc with text in fades up. When the user rolls out the mc fades down.
For various reasons I want to be able to use actionscript for this fade rather than target labels on a timeline at different points of an animated timeline fade.
I've had a look around for some script I may be able to modify but have had no luck and need a little help.
Many Thanks in advance
View Replies !
View Related
FADE - TWEEN TO ALPHA 0
I was following the the:
tutorial "Dissolving Words"
by "Derek Boge"
at "http://www.flashkit.com/tutorials/Text_Effects/Dissolvi-Derek_Bo-647/more4.shtml"
which suggests "change the Alpha to 0%".
It seems to work for him but when I go to the mixer and try this one of two things happens:
1) I make the stroke alpha 0, from black and go to the fill alpha to make it 0 and then check the stroke alpha to find it back at 100
2) I can make both alphas 0 (by accident!) but then rgb values go to 1 and will only go back to 1 if I make them all 0.
All that is needed is to fade, from black to nothing, from the first frame of the tween to the last.
It shouldnt be hard, so Im surely missing something basic!
Can someone help out please?!
View Replies !
View Related
|