Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > Flash General Questions > Flash 9 General Questions

Reply
 
Thread Tools Rate Thread Display Modes
Old 08-17-2007, 01:19 AM   #1
dschiltz
Registered User
 
Join Date: Mar 2007
Posts: 3
Default Cylcing movie clips

Hello, pretty quick & basic question here. I have three movie clips I want to use buttons to cycle through the clips and that have fades in between them. I think that I should be able to use an if else statement, but I think I'm goofin' it somewhere. I can't seem to get it to work so that all options are available no matter that clips the user is on. It will cycle through once and then I can't get it to remain active. The code I'm trying to work with is as follows:

Code:
prvBtn.onRelease = function() {
	if (sm03._alpha>=100) {
		sm03.onEnterFrame = function() {
			this._alpha -= speed;
			if (this._alpha<=0) {
				this._alpha = 0;
				delete this.onEnterFrame;
			} else {
				sm02.onEnterFrame = function() {
					this._alpha -= speed;
					if (this._alpha<=0) {
						this._alpha = 0;
						delete this.onEnterFrame;
					sm01.onEnterFrame = function() {
						this._alpha += speed;
						if (this._alpha>=100) {
							this._alpha = 100;
							delete this.onEnterFrame;
						}
					}
				}
			}
			}
		};
	}
};


nxtBtn.onRelease = function() {
	if (sm01._alpha>=100) {
		sm01.onEnterFrame = function() {
			this._alpha -= speed;
			if (this._alpha<=0) {
				this._alpha = 0;
				delete this.onEnterFrame;
			} else {
				sm03.onEnterFrame = function() {
					this._alpha -= speed;
					if (this._alpha<=0) {
						this._alpha = 0;
						delete this.onEnterFrame;
					sm02.onEnterFrame = function() {
						this._alpha += speed;
						if (this._alpha>=100) {
							this._alpha = 100;
							delete this.onEnterFrame;
						}
					}
				}
			}
			}
		};
	}
};
So any help would be appreciated.

THanks!
dschiltz is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Attaching several movie clips into a movie clip... wilhem ActionScript 2.0 6 06-20-2006 01:32 PM
unloading multiple movie clips asprinwizard ActionScript 2.0 2 06-08-2006 03:21 PM
Duplicating Empty Movie Clips?! gogojuice Simple Stuff (Newbies) 8 06-16-2004 09:24 AM
Frame / Timeline relative Movie Clips Axonn ActionScript 2.0 23 05-20-2004 05:52 AM
Movie Clips Order Luigi Vercotti ActionScript 1.0 (and below) 2 02-27-2004 11:32 AM


All times are GMT. The time now is 09:54 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.