To achieve the unordered playback of multiple objects in Flash courseware D-Flash

by gulum2652 on 2009-11-25 18:56:40

To achieve the unordered playback of multiple objects in Flash courseware: When creating multimedia courseware using Flash, technicality is a design principle that all multimedia courseware designers are very concerned about. On the other hand, users of multimedia courseware place great emphasis on interactivity. For example, when I was making courseware on length measurement instruments, electrostatic applications, and cell division, I wanted the users to be able to play these by clicking related buttons.

The production process is as follows: Taking cell division as an example, first, basic knowledge, mitosis, meiosis, and fertilization were made into movie clips. Then, buttons were created so that users could play them by clicking the relevant buttons. The key lies in achieving the unordered playback of these objects.

Here's a specific introduction:

1. In the scene, drag four numeric buttons sequentially onto the first frame of the first layer of the timeline and add the statement "stop();".

2. Create four new layers, and in each new layer's second frame, insert blank keyframes. Then drag the four distinct movie clips into the second frames of the four new layers respectively, and name their instance names as "jczd", "ysfl", "jsfl", and "sjzy" respectively.

3. Write the following scripts on the four buttons in the first frame of the first layer:

(1)

```actionscript

on(release){

gotoAndStop(2);

_root.td1.gotoAndPlay(2);

if (_root.td2._currentframe==1) {_root.td2.gotoAndStop(1);}

else {_root.td2.gotoAndStop(15);}

if (_root.td3._currentframe==1) {_root.td3.gotoAndStop(1);}

else {_root.td3.gotoAndStop(15);}

if (_root.td4._currentframe==1) {_root.td4.gotoAndStop(1);}

else {_root.td4.gotoAndStop(15);}

}

```

(2)

```actionscript

on(release){

gotoAndStop(2);

_root.td2.gotoAndPlay(2);

if (_root.td3._currentframe==1) {_root.td3.gotoAndStop(1);}

else {_root.td3.gotoAndStop(15);}

if (_root.td1._currentframe==1) {_root.td1.gotoAndStop(1);}

else {_root.td1.gotoAndStop(15);}

if (_root.td4._currentframe==1) {_root.td4.gotoAndStop(1);}

else {_root.td4.gotoAndStop(15);}

}

```

(3)

```actionscript

on(release){

gotoAndStop(2);

_root.td3.gotoAndPlay(2);

if (_root.td2._currentframe==1) {_root.td2.gotoAndStop(1);}

else {_root.td2.gotoAndStop(15);}

if (_root.td1._currentframe==1) {_root.td1.gotoAndStop(1);}

else {_root.td1.gotoAndStop(15);}

if (_root.td4._currentframe==1) {_root.td4.gotoAndStop(1);}

else {_root.td4.gotoAndStop(15);}

}

```

(4)

```actionscript

on(release){

gotoAndStop(2);

_root.td4.gotoAndPlay(2);

if (_root.td2._currentframe==1) {_root.td2.gotoAndStop(1);}

else {_root.td2.gotoAndStop(15);}

if (_root.td1._currentframe==1) {_root.td1.gotoAndStop(1);}

else {_root.td1.gotoAndStop(15);}

if (_root.td3._currentframe==1) {_root.td3.gotoAndStop(1);}

else {_root.td3.gotoAndStop(15);}

}

```

By using this method, we can ensure that when one button is clicked, only the corresponding movie clip plays while others stop or pause at certain frames, thereby realizing the unordered playback of multiple objects.

This approach not only enhances the interactivity of the courseware but also demonstrates the technical sophistication involved in its creation. As e-learning trends continue to evolve, Flash-based courseware design and animation creation will remain significant tools for educational training and development.

For more professional support in areas such as animation design, Flash courseware creation, and commercial illustrations, companies like Uni365 - Beijing Sanliuwu Design Animation Company offer comprehensive services ranging from 2D animations to flash-based educational materials.