| Page 2 of 7 - Project 11
The script sets the current product to FlashPack 1, loads the corresponding
product text into the text area, and scrolls it to the top. The .scroll property
of the text field named Text enables your text scroller, but more on that later.
The script also sets the x-position of the text scroll handle to 0. This is necessary
because the product text might have changed and therefore is scrolled to the top
for convenience. Finally, the button calls the LoadView function, which
loads the current product 's picture into the main viewer. 4.
Double-click the FlashPack 2 Button to open the Instance Properties dialog box
and, on the Actions tab, assign the ActionScript.
On (Release)
Set Variable:"Product "="flashpack2" Set
Variable:"Text "=FlashPack2Text Set Variable:"Text.scroll
"=1 Set Property ("/TextScroll/ScrollHandle
",X Position)=0 Call ("/Library/:LoadView ")
End On | | 5.
Double-click the FlashPack 3 Button symbol to open the Properties dialog box and,
on the Actions tab, assign the ActionScript. You 'll notice that each script is
identical except for the Product and Text values.
| On (Release) Set
Variable:"Product "="flashpack3" Set Variable:"Text
"=FlashPack3Text Set Variable:"Text.scroll
"=1 Set Property ("/TextScroll/ScrollHandle
",X Position)=0 Call ("/Library/:LoadView ")
End On | | 6.
Exit symbol-editing mode and return to Scene 1. Setting
Up The Feature Buttons Each product has three different features:interfaces,
sliding panels, and props. In turn, each feature has three variations to give
the user a good idea of what each product includes. As with the Product Buttons
graphic symbol, the Feature Buttons graphic symbol contains nested buttons to
make positioning the buttons easier. This time around, you set the value of the
currently selected Feature and then call the LoadView function to display
the appropriate image. 1. Select
the Buttons layer, drag an instance of the Feature Buttons graphic symbol from
the Vector Graphics folder onto the Stage, and use the Object Inspector to position
the instance at x:20.0 , y:100.0.
 |
| Use the Object Inspector to position the Feature Buttons
graphic symbol. | | 2.
Open the Instance Properties dialog box of the Interfaces Button and, on the Actions
tab, assign the ActionScript.
| On (Release) Set
Variable:"Feature "="interface" Call ("/Library/:LoadView
") End On | | 3.
Open the Instance Properties dialog box of the Sliding Panels Button symbol, and,
on the Actions tab, assign the ActionScript.
| On (Release) Set
Variable:"Feature "="slidingpanel" Call ("/Library/:LoadView
") End On | | 4.
Open the Instance Properties dialog boy of the Sliding Props Button symbol, and,
on the Actions tab, assign the ActionScript. 5.
Exit symbol-editing mode and return to Scene 1.
| On (Release)
Set Variable:"Feature "="props" Call ("/Library/:LoadView
") End On | | |