ActionScript 2.0 :: Function To Fade Mc And Play Timeline?
Jan 19, 2011
I've been tinkering with it for 2 days now but can't fix it! I have a button that controls a movieclip (showstations1) that fades in and out. And i have a second button (button5) that gotoandplays on the main timeline. The trick is I want the second button to fade out the movieclip if it's visible before it gotoandplays the main timeline. [code]...
View 3 Replies
Similar Posts:
Dec 25, 2010
Everything is in the title!I am making an animation, followers know that I am making a turning envelope, and I need that it returns to its initial position when the mouse rollOut but from its actual position in the animation, so an inverse timeline playing would be perfect! But does it exist?
View 2 Replies
Jun 11, 2009
how to do this effect.I have a movie instance named "sparkles_mov" as in internal movie, not loading externally.It's placed multiple times on the stage.I need an AS code for the first frame of the entire stage that makes all instances fade in at a specific frame number (5), last for XXX amount of seconds and then all of the instances to fade out at a specific frame number (70).Is this possible? I have all instances fading in using this AS code placed on the frame that they enter on but the fade out never works, the just abruptly disappear:
Code:
sparkles_mov._alpha = 0;
fadeIn();[code].....
View 2 Replies
Mar 8, 2012
I have got one movieclip in the scene. I want to play them in loop when my_mc fade-out it must starts to fade in and vice-versa. I want to play them in loop. The fade out function first works fine. But how to load fade-in after fade-out?
my_mc.addEventListener(Event.ENTER_FRAME, fadeout);
function fadeout(e:Event){
if(my_mc.alpha >=1){
this.alpha -=0.1;
[Code].....
View 2 Replies
Dec 12, 2006
this code is so not working, am i missing something very subtle?all it does is fade in and out an object when you roll over it.
_root.block2.tn.onRollOver= function(){
glow = true
}
[code]........
View 14 Replies
Sep 16, 2009
I've got a simple movie clip with text in, with tweening set on the timeline so it fades in and out.But in actionscript, when I modify its position _x or _y or even scale _xscale, then the movieclip text no longer fades with the playing of the timeline.I've tried everything but can't seem how to keep the movie clip so it continues to fade, but adjust the position.
View 0 Replies
Jul 14, 2009
so here's the function on main stage:
[Code]....
and here's the code that wants to call this function in a another movie clip. I've attached this clip dynamicaly to the main stage as well.
[Code].....
How can i acess slideImage function on the main stage. in AS2 _root.slideImage(btnNumber); would work. How Would I do this in AS3?
View 7 Replies
Feb 14, 2010
I've created three keyframes on the main timeline, the first is empty, and so is the third. In the second I have a movieclip that contains a classic tween. The movieclip has an alpha of 0 at frame 1, and 100 at frame 15, then at 45 it does the same in reverse until frame 60. On the last frame (60) of my movie clip I have the code:
ActionScript Code:
_root.gotoAndStop(3);
For some reason when I test the movie, the fade effect will not work, and the screen will just be blank. I have the
ActionScript Code:
stop();
Code on frame 2 but none on the other frames.
View 7 Replies
Feb 12, 2011
i'm trying to cobble together a working website for my photography. I would like to know if there is any actionscript that when a button is pressed on layer 1 it will fade out a movieclip on layer 2 and goto and play frame 5 i have the movieclip instance name set to "ran". This movie clip loads random pictures onto my website and here is the actionscript currently for it "_root.ran.attachMovie("img"+(random(8)+1),rand,1) ;"
View 9 Replies
Jul 14, 2009
I am creating a flash site, and inside my frame label for lets say "pageA" the movie clip begins In pageA, fades up shows the content and stops(); alowing for the page content to be read.
After reading, the viewer clicks on the button inside the nav bar, to take them to say "pageB" i now want "Page A" to fade out and then root to "pageB
my thinking is that i insert a stop on the time line of the movieclip, then when the button is pressed it plays, lets say, the remaining 10 frames in the clip (the fade out), and then roots to pageB.
i just need a simple actionscript to do that, if there is an easier way, any one who could point that out and end my misery is a god/godess respectfully!
View 2 Replies
Feb 2, 2012
I wanted to make play button. Kind of this huge one in the middle of the screen as users used to see on YouTube.Here is the code for it which seems to work:
play_btn.addEventListener(MouseEvent.CLICK, onClick_Play);function onClick_Play(event:MouseEvent) :void {
SWF_flv2.play();
[code].....
View 3 Replies
Apr 10, 2008
Here's some great code I pieced together using this forum. I would like to add Play/Pause functionality to it.
photo_gal_fade_resize.zip
Code:
delay = 6000;
p = 0;
// ///////////////////////////////////
function loadXML(loaded) {
[Code]....
View 6 Replies
Jun 30, 2009
I seem to be having trouble with TweenLite in AS2.I've created a class which I call on the main timeline. Within the class I've loaded images and once they are loaded I want to fade between them. I am calling (inside my class) the following code when the images have finished loading:
TweenLite.to(_root["loadedimg1"], 1, {_alpha: 100,
onComplete:doImageLoop, onCompleteParams:[1], onCompleteScope:this});
I then have the following function to do the fade loop:
public function doImageLoop(imageId:Number):Void
{
trace(imageId);[code].....
This function never gets hit but this first image does fade up.
View 1 Replies
Jan 9, 2012
I have this problem when I try to fade in sound with the function below. It just doesn't work and I can't figure out where the problem is.I would like to fade in a looping sound but nothing happens.this is used to play a sound via events
dispatchEvent(new CustomEventSound(CustomEventSound.PLAY_SOUND, Main.SOUND_AMBIENT, false, true, false, 999999, 0, 0, setSoundVolume));
this is the function to play a sound. the stop-function is almost identical to this one.
public function playSound(soundName:String, isSoundTrack:Boolean = false, fadeIn:Boolean = false, fadeOut:Boolean = false,
loops:int = 1, offset:Number = 0, volume:Number = 1):void {
if (fadeIn) {
tempSoundTransform.volume = 0;
[code].....
View 1 Replies
Feb 13, 2006
I am trying to use fade in function for loader.loadMovie(this.main), but if I change the code 'loader.loadMovie(this.main)' to fade_in(loader.loadMovie(this.main)', it only can running for first frame, then stuck.
this.thumbHolder.onRelease = function() {
loader.loadMovie(this.main);
title_txt.text = this.title;
};
View 14 Replies
Oct 18, 2007
function that I can re-use and pass movie clips to and cause mc's to fade in and out?...such as
Code:
function fadeMeIn(fadewhat,fadespeed) {
if (fadewhat < 100) {
[code]......
View 6 Replies
Apr 20, 2010
I have the following functions that fade a movie clip in and out
Code:
fadeAmount = 1;
function fadeIn() {
this._alpha += fadeAmount;
if (this._alpha>=100) {
this._alpha = 100;
this.onEnterFrame = null;
[Code] .....
And then I call the movie clip to start fading in and appear on stage
Code:
contentMC._alpha = 0;
contentMC.onEnterFrame = fadeIn;
What I need is some way to tell the movie "after you reach alpha 100, stay there for x seconds and then fade out" and execute this code:
Code:
contentMC._alpha = 100;
contentMC.onEnterFrame = fadeOut;Aafter it reaches alpha = 0 it should stop and stay there without looping back and starting to fade in again.
View 2 Replies
Aug 19, 2004
OK, trying to fade out a button through a function. I've done this before but I'm tired and it's just not happening. OK, there's a button named "button" and a movieclip named "fadeThis". The first frame of the root has the following code in it:
[Code]...
View 8 Replies
Jan 4, 2012
I'm a newcomer to Actionscript programming and trying to modify a Flash site template downloaded from [URL] (which is an AS2 template). I've almost succeeded at what I need to do but have run into a couple of brick walls. One is that I've added a video player to the site and need to make the background music track smoothly fade out when the video starts and fade back in when it ends (or is stopped). I set up a listener object for the video player that works. It's the smooth fade of audio levels that doesn't.
[Code]...
View 15 Replies
Nov 16, 2004
I have a function on root:
_root.fadeBox_mc.onEnterFrame = function (){
if (fade){
this.nextFrame();
} else {
this.prevFrame();
[Code]...
This causes a mc to fade in and out on rollover/rollout. But what I wanna make is a box that fades in when pressed on the button and fade out when pressed for the second time. But if I say
on (press){
_root.fade = true;
}
the mc fades in, but I cant do another on (press) to fade out. Is this too confusing?
View 2 Replies
Jan 13, 2006
I have eight images in a MC that I would like to sequentially fade in, display for a few seconds and fade out using _alpha function. So far I can fade one in with this AS:
img1._alpha=0
img1.onEnterFrame = function() {
this._alpha +=10;
}
Assuming my instances are img1, img2, img3, etc, etc... how would I go about sequentially fading each instance from 0 to 100, letting it display on the stage for a few seconds and then fade out (like a slideshow)?
View 7 Replies
May 15, 2008
I'm making a gallery using XML data and loading the information into a mc instance that are in turn being attached to the stage via linkage id. My question is this: I need to make all of those instances fade out with a function, and I have created a for loop to do this, however it is not working.. Any suggestions on how to make it work?
[Code]...
View 2 Replies
Sep 21, 2003
When you use LoadMovie to load a SWF, does that SWF stay loaded, or does it get reloaded every subsequent time you use the LoadMovie function for that same SWF? I use the LoadMovie function in several buttons to load SWFs into my movie. In those same buttons, I use a function which fades a different (already present) movieclip in. However, the LoadMovie call seems to block out the movie clip which needs to fade in; when I click the button, it loads the SWF just fine, the movieclip just doesn't fade in (or it does, but I can't see it), when I comment the LoadMovie call out, the movieclip fades in just fine (and I can see it). Also, I load the SWFs into an empty movieclip, which is beneath all other layers, so that's not the problem.
In my button:
Code:
on(release){
_root.home.fade(0,100,10);
_root.content.loadMovie("home.swf");
}
I've tried:
Code:
on(release){
_root.content.loadMovie("home.swf");
_root.content.swapDepths(1000);
_root.home.fade(0,100,10);
}
But, that doesn't get me anywhere, either.
View 4 Replies
Jun 8, 2005
How I can extend this function to fade a sequence of mCs passing a pause sec. value too?
Ex:
function fadeTo (mc, value, speed, pause)
steps:
fade mc1
when fade ends wait pause continue to next mc if exist
MY ACTUAL FUNCTION:
MovieClip.prototype.fadeTo = function(value, speed) {
this.onEnterFrame = function() {
this.aV = Math.floor(value-this._alpha);
[code]....
View 2 Replies
Feb 2, 2006
I'm looking to add an element to this function to make my text fade. On (release) of my 'biog' button this function starts. But also I need my text on the page to fade from 100 to 0 on release, before this function begins. I've tried applying code that I have but can't get it to wrk. Not sure how these functions work exactly and no matter how much reading I do I can't get this right.
scrollIt = function() {
this.onEnterFrame=function() {
if (_root.container1.SUB._x>440) {
_root.container1.SUB._x += -30;
} else if (_root.container1.SUB._x>-30) {
_root.container1.PAGE._x += (-40-_root.container1.PAGE._x)/8; _root.container1.SUB._x += (0-_root.container1.SUB._x) /2;
} else { delete this.onEnterFrame;
}}}
View 13 Replies
Apr 1, 2006
I'm trying to call a function that will slowly move/fade an object and it doesn't seem to want to work.
Here is the code
Code:
mypos = 1;
position = function () {
mypos++;
[Code].....
View 2 Replies
Sep 30, 2008
[URL]about 30 seconds into this flash, there is an FLV of a computer screen. The problem is, when I pause the swf, the flv keeps going. How do I get around this?1. Is it possible to convert the flv to swf?OR2. Is it possible to control the flv from the main timeline?
View 7 Replies
Feb 24, 2010
I'm working with AS3 and I have two questions. First, to save on having to re-do work, is there a way to simply play the timeline in reverse IE from frame 210 - 200? I've got a page set up to slide in from the right when clicked on, and if you click on the back button, I want the page to slide out to the right again. Figured the easiest way to do this would be to simply reverse the timeline. Just don't know if that's possible in flash.
Secondly I've got it set up in the timeline for a FLVPlayback component to slide in to the center of the stage from the right when its page is clicked on and though this works in the timeline, when I test the movie, it doesn't slide in and if I expand the preview to full screen, the flv and its controls are still on the right side of the stage. how to get the movie to slide in properly?
View 1 Replies
May 6, 2009
I would like to be able to skip some frames using functions. For example:
When you press a button created, the timeline jumps to (and plays) from frame 9 to 24 and then it immediately jumps to frame 110 and so on...
So. I would need a code for the "from - to" function. And the other question is about creating a function like that:
do this then do that then do that...
View 1 Replies
Jun 18, 2009
I have movie clips, animation, streaming voice over, and event music and sound fx on the timeline. I have tried the following example:
on (release) {stopAllSounds();
daveNight.stop();
stop();
[code].......
View 9 Replies