Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 7th, 2004, 06:54 AM
cwin cwin is offline
ObJeCT D!$orieNTeD!?
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Jersey UK
Posts: 29 cwin User rank is Private First Class (20 - 50 Reputation Level)cwin User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Listener for variables.

Is there any way to make a function that will go on x==4 for example.

I mean, so if x is changed to 4, the function will be called. A little like the onMouseOver type things.

Reply With Quote
  #2  
Old February 7th, 2004, 02:34 PM
jmichels's Avatar
jmichels jmichels is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Orlando, FL
Posts: 177 jmichels User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 18 m 12 sec
Reputation Power: 6
You can use conditional statements within onEnterFrame to react when either an instance name or variable of x has changed to 4. The example below checks an instance name of x within the first keyframe. When x is changed to 4 via a button release, the movie reacts by going to another keyframe. You can configure it to do pretty much anything.

Code:
_root.createTextField("x", 1, 0, 0, 0, 0);
x._visible = 0;
this.onEnterFrame = function() {
	if (x.text == 4) {
		_root.gotoAndStop("2");
	}
};
stop();


Put this inside your button:

Code:
on (release) {
	x.text = 4;
}

Last edited by jmichels : February 7th, 2004 at 02:37 PM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > Listener for variables.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway