Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: RE: [flasher] Variable help needed: URGENTLY
From: Paul Willoughby
Date: Mon, 26 Feb 2001 13:02:20 -0000

How do you capture the variables over scenes? In my experience, people have
had problems maintaining the value of variables over scenes. For example, if
in scene 1 you have a text field called 'input1' and the user enters
something then clicks to advance to the next scene the value of 'input1'
will be lost, *unless* you have another text field in the next scene called
'input1' and when the user clicks on the advance button you do something
like...

tempNumber = input1;

and then on the first frame of the next scene you have a frame action
with...

input1 = tempNumber;

OR you could try converting each one to a global variable every time you
advance a scene...

_root.a1 = input1;

So the point is that even if the above isn't quite your problem, scenes can
turn your movie into a real mess and should be avoided at all costs! You
could trace your variables so you can see where problems are occurring and
if variable values are being lost.
Why don't you post an example of the code you are using for the calculation,
it might help people see what the problem is.

paul

> -----Original Message-----
> From: Ian Richardson [irattheconsultancy [dot] co [dot] uk (mailto:irattheconsultancy [dot] co [dot] uk)]
> Sent: 26 February 2001 12:34
> Sorry to resend but can someone help....Please can someone help
>
> I am creating a calcualtor style programme
>
> i have three sets of varibales a1 to a7, b1 to b7 and s1 to s7
>
>
> The user inputs the variable a1 to a7 over 7 scencs (each
> variable is a
> numberic)
>
>
> The variable b1-b7 and s1-s7 are entered into the swf
> programme before the
> user gets it. The idea is that user enters his info. then these are
> calculated as follows
>
>
> a1*b1
> a2*b2 etc
>
> the sum of these are then all added together to give a figure
>
>
> at the same time
>
> b1*s1 etc
>
> so we come out with two figures
>
> at the present time i cannot get the variables to work /
> calculate against
> one another..



[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]