Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 03-22-2006, 06:34 PM   #1
Registered User
Join Date: Jan 2006
Posts: 22
Default "If" Statement


I am trying to write a simple If statement...

I have on my stage a dynamic text box which shows the results score...
It's Var is named: Track.percent_format

I have another movie clip on my stage with an Instance named "A"

I am trying to write a statement that if the value of the textbox variable equals 100, the movie clip "A" will have an alpha of 100%. On the stage I set
the "A" clip to 0%.

My code on the timeline:

if (Track.percent_format == 100){
setProperty("_level0.A", _alpha, 100);

This is not working... If I just use the setProperty line by itself, my movie clip changes, but I cannot seem to get the if statement to work...

Many thanks for any help
missworld52 is offline   Reply With Quote
Old 03-22-2006, 07:00 PM   #2
Super Moderator
Cota's Avatar
Join Date: Jul 2001
Location: NYC
Posts: 10,314

ActionScript Code:
if (Track.percent_format.text == 100){ setProperty("_level0.A", _alpha, 100); }
Color Wars™ | (kul′ər wôrs) n. - Open conflict between factions. www.theColorWars.com

cota - www.chadworkman.com | http://shavedplatypus.com
occupation: designer | flash developer | server-side developer (php, asp, mssql, mysql)
Cota is offline   Reply With Quote

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
"if" "&&" "||" statement problem downer ActionScript 1.0 (and below) 2 03-19-2006 11:27 PM
"if" statement ryuukosan138 ActionScript 2.0 9 08-10-2004 09:20 PM
"IF" statement vazbo ActionScript 1.0 (and below) 1 05-06-2004 01:45 AM
set of numbers in an "if" statement Sir Patroclo Other Flash General Questions 3 06-26-2003 05:12 PM
How to use an "if" statement properly Afterwork ActionScript 1.0 (and below) 16 01-30-2002 09:07 PM

All times are GMT. The time now is 12:21 PM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2015, 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.