Think of something that you wish Authorware could do but it doesn't?
Let the our good friends at Macromedia know via the wishlist.
Please let us know if you find
any of the materials on this site inappropriate or offensive. Please include
the url and why the material should be reviewed.
Comments and questions about the site are also welcome. Please no Authorware
questions, use the AWARE
list.
|
Back
B1006 - How do I make a box on the screen shrink and grow?
by - Joseph Ganci
Hi. I am pulling my hair out trying to get a function going to redraw a box on the screen at a different size. My goal is to have a box drawn initially on the screen (e.g. using "box(1,x1,y1,x2.y2)") and be able to change its size
based on user input. Basically, it is supposed to act as an efficiency meter.
I want to decrease the width of the box on the screen by x number of pixels, each
time a user does something inefficient. How do I refer to the same box later
in the program to change its x2,y2 co-ords? I have tried the call/return
thing as a way of looping to the box display but when I return, the box disappears
as I can't find a way to tell Authorware that the box I specified in the calc
icon should stay put! Thanks for any suggestions.
First, set up an Interaction icon. Attach to it a Calculation icon. For the
response type, choose Conditional. Name it "showbox" and make it perpetual,
erase After Next Entry, and Return branching. Authorware will ask you to
define the variable "showbox", so do it.
Second, in the Calculation icon place the script:
Box(1,x1,y1,x2,y2)
showbox := FALSE
Now from anywhere in your file, set up a Calculation icon that contains the
following script:
x1 := y1 := 100
x2 := 500
y2 := 200
showbox := TRUE
Every time you use the script
above (changing the x2 value to however long you want to make the box width),
and the box will appear to shrink (or grow).
There are 0 reviews
Add your review
Back
|