Archive for the ‘Events’ Category
Many components allow the definition of an Event Handling function that is called when the component changes state.
The CheckBox_neutral uses an OnClick parameter, whereas the Button_silver component uses the EventFunction parameter. Many components make use of a Event Handling function. Read the component specific documentation to see what the exact parameter is called.
In general, these functions must reside at the same level as the component and support two parameters: name and state.
Example
function Events(name,state)
{
trace(name add “,” add state);
}
When the component Checkbox has its checkbox toggled, the following appears in the debug panel:
Checkbox,false
Checkbox,true
Checkbox,false
Checkbox,true
Checkbox,false
Checkbox,true
The first parameter (name) is the name of the component where the event occurred. The second parameter (state) is the current state of the component. In this case it is true or false depending on the state of the checkbox.
As the name of the calling component is passed in the first parameter, it is possible to have a common event function for all of the components. A different Event function for each component is also a possible method of implementation.
This is a new panorama Scroller from Swishzone.com.
Many modern digital cameras come with software that allows you to “stitch” multiple photos together. This can be used to create a spectacular panoramic image. With the addition of a scroll bar, you can add some intrigue to your website by allowing a user to scroll the panorama within a 4:3 aspect ratio window.
This article will show you how to add a scrollbar and a preloader to your movie to scroll wide images.
Step 1. Adjust the size of your movie. Select Scene_1 in the Outline panel, then in the Properties panel press the Movie Properties button. Adjust the size of the movie to be 400×300.
Step 2. Adjust your image. Use a image editing tool such as MS Paint to resize your image so that it is 300 pixels high. Lock the aspect ratio when you re size the image so that the width is adjusted correspondingly.
Step 3. Import the image.
Use Menu | Insert | Import Image to import an image into your movie. Press the O=X button in the transform panel and set the reference and transform points to be the top left hand corner. Set the _x and _y position to be 0, 0.
Note the width of the image. In the example it is 1377 pixels. This number will be used later.
Step 4.
Rename the image to be “image” and set the target checkbox in the Properties panel.
Step 5. From the Components Panel select Controls | Scrollers | Scroll_silver and drag that component onto the stage. If the Parameters panel is not visible, make it visible using Menu | Window and enable the Parameters panel.
Step 6.
Adjust the parameters for the scroll bar as shown in the image to the right:
Note that the following parameters have been altered from their default value.Scroll bar Length: 400
Direction: Horizontal
Window Size: 400
Document Size: 1377
Reverse Output?: true
Event Function: blank.
Event Variable: _parent.image._xThe Window Size, 400, is set based on the size of the viewable area. The Document size, 1377 is set based on the width of the image.
Once the parameters have been altered, drag the scrollbar to the bottom left hand corner of your movie.
If you press the play button to preview your movie you should see that the scrolling is now working. If it does not scroll see the trouble shooting section below.
At this stage, the movie is pretty much complete. However there are a few optional extras that can make the movie better.
Download
Download: Download Panorama Scroller Swishmax 2 Freeware (145.64 kB - 405 x herunter geladen)
On Swishzone.com is a new Tutorial for a Magnifying Glass released.
Download see below….
This SWiSH Max2 project demonstrates how to make a magnifying glass effect that allows a section of an image (or movie clip) to be shown in ‘magnified’ detail. Try it by dragging the “magnifying glass” to the area that you wish to view in more detail.
The project demonstrates a number of useful concepts including:
- use of a pre-loader
- startDrag and stopDrag
- masking
- use of the library (sorry, the content library is not available in SWiSH miniMax2)
- The magnify movie clip has its Transform and Reference points set to center and its initial positon is 0,0.
- The magnify movie clip has the property ‘Use bottom object as mask’ checked.
Download
Download: Lupe mit Swishmax 2 - Magnifying Glass (377.67 kB - 392 x herunter geladen)
Description
An example of a Mirror effect
This component allows the user to easily reflect or mirror objects that they have created.
Simply remove the objects that exist within the Mirror movie clip
and replace with the objects that you wish to reflect or mirror.
Once the object(s) have been placed into the Mirror movie clip, select either Reflect or Mirror in the Mode parameter and the desired action will be applied to the object. To reapply the action repeat the process. The Mode will return to Normal after each application of a Mirror or Reflect effect.
Requirements
| Flash Export version | SWF 6 or later |
| SWiSH Max version | v2.0, build 20080131 or later |
Parameters
| Parameter name | Description |
| Mode | Defines if the objects within the Mirror movie clip are to be Mirrored, Reflected or have no change (Normal). |
Properties
There are no user accessible properties.
Methods
There are no user accessible methods.
History
| v1.1 | 20080411 | First release |





