Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > Simple Stuff (Newbies)

Reply
 
Thread Tools Rate Thread Display Modes
Old 11-14-2007, 06:41 PM   #1
focusyou
Registered User
 
Join Date: Nov 2007
Posts: 15
Default Variables exploding my head

I can't make that paradigm shift into understanding how to gain control over a movie clip so it only plays once 'onPress'.

Basically, I have a movieclip that has an onRollover, onRollOut, and onRelease -- simple, but I want the Release to; 1) disable the RollOver and RollOut until the "release" has finished, then 2) disable the onRelease function once "release" has finished -- I have it like so, but I'm obviously doing variables incorrectly because the RollOver and RollOver don't reset after "release" finishes:

Code:
var bcB = 0;
var bcBB =0;

this.onRollOver = function (){
	if(bcBB==0){
		gotoAndPlay ("over");}
}
this.onRollOut = function (){
	if(bcBB==0){
	gotoAndPlay ("out");}
}

this.onRelease = function (){
	if(bcB==0){
		_root.bcBB=1;
	gotoAndPlay ("release");}
}

Last edited by focusyou; 11-14-2007 at 07:59 PM.
focusyou is offline   Reply With Quote
Old 11-15-2007, 12:44 AM   #2
raskolnikov
Senior Member
 
raskolnikov's Avatar
 
Join Date: Aug 2001
Location: kl, malaysia
Posts: 359
Send a message via MSN to raskolnikov Send a message via Yahoo to raskolnikov
Default

maybe u can use onEnterframe to have a constant checker for the state of your button. have 3 variables and set them in your button's action on each state. then onENterframe have a bunch of if else statemnts to control the animation?
__________________
"There is no solution because there is no problem" Marcel Duchamp
raskolnikov 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 Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make FLASH import PHP variables... unbelievable Server-Side Scripting 1 12-12-2006 07:50 AM
Dynamically Creating Variables inside a loop davydany ActionScript 2.0 11 09-06-2006 06:14 AM
dynamic text accessing variables + scope Michael Kivi ActionScript 2.0 1 08-06-2004 08:50 PM
input text boxes, variables and sendAndLoad loadvars natronp ActionScript 1.0 (and below) 1 07-28-2004 07:36 PM


All times are GMT. The time now is 12:44 AM.

///
Follow actionscriptorg on Twitter

 


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