PDA

View Full Version : HELP!!!!!


adam|zeliasz
09-29-2003, 08:55 PM
This should be easy...

I have two dynamic text boxes on the main time line and a button. One text box we will call A and the other B. The main timeline has two frames, the first has the action script of:
B = 0
The second,
stop ();

I used B=0 to set box B to 0 before I hit the button.

The button on the main timeline puts in a random number into box A from 3-18.

What I would like is an actionscript that checks if box A has a number such as 16 to put a 1 into box B. For example, if A has 16, then B should have a 1. If A has 17, then B should have a 2. If A has 18, then B should have a 3.

Does anyone have a solution? I tried everything I can think of but Im not a programmer. Any help will be appreciated... also if you do have a solution can you post the action script so I can copy and paste?

Thanks.

AroundTheFur
10-06-2003, 03:53 AM
first of all you have stop on the second frame so your movie will stop after frame two. ditch your second frame and write something like this:

b = 0;
_root.onEnterFrame = function(){
if(a.output == 16){
b.output = 1;
}
}

//where output is either the varible name inside the box movie clip or the output variable name on the text box

now instead of writing a bunch of if statements so that 16->1 17->2 just do it like

if(a.output > 15){
b.output = a.output - 15;
}

hopefully you get the jist.

CGTalk Moderation
01-16-2006, 06:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.