»
Playing the RoboDemo Movie and Animation Concurrently
Published 10/2/2006
Playing the RoboDemo Movie and Animation Concurrently Having the RoboDemo movie continue playing while the interactive animation is displaying is slightly more difficult. This is because RoboDemo removes an animation after it has played once—so a five-frame animation will only display for one-quarter of a second. This is not very useful if you need your animation to display on every frame of your movie. Fortunately you can use ActionScript to get around this issue by having the animation duplicate itself to a new movie clip. Then, when the original animation is removed, the new movie clip remains. -
In Flash, open Example4_a.fla. You'll see that the animation again uses three layers: one to display the information icon, the second to display the caption, and the third to hold your ActionScript. -
Preview the movie by selecting Control > Test Movie. You'll see the information icon displayed; rolling over it displays the caption, rolling out hides the caption. Now you need to add ActionScript to duplicate the animation so it will continue to play throughout the RoboDemo movie. -
Click frame 1 of the Script layer and add the following ActionScript before the existing code: if (this._target.indexOf("rdInsert") != -1) { duplicateMovieClip(this, "myClip", 1); } It should now read: if (this._target.indexOf("rdInsert") != -1) { duplicateMovieClip(this, "myClip", 1); } Text._visible=false; stop(); The if statement at the start of the code tests the name of the movie clip to see if it's the original animation or the duplicate. If the name begins with rdInsert, it's the original and needs to be duplicated and named myClip. After the code creates myClip, the if statement runs again. However, this time the movie clip name doesn't begin with rdInsert, so the movie clip is not duplicated. You don't need to add any code to remove myClip because you want it to display on every slide of the movie. - Now you can save the file (File > Save) and export it as Example4_a.swf (File > Export Movie).
- In RoboDemo, open Example4_rd.rd.
- Double-click slide 1 to open it in the Edit window.
- Select Insert > Animation, then navigate to and open Example4_a.swf.
- Leave all options at their defaults and press OK.
- Drag the animation down to the lower right corner.
- Now save the file (File > Save) and preview it (File > Preview).
|
»
Pausing the RoboDemo Movie while Playing the Animation
Published 10/2/2006
Pausing the RoboDemo Movie while Playing the Animation Pausing the RoboDemo movie while the animation plays is easy; you simply instruct the animation to stop the RoboDemo movie when it starts playing and continue the RoboDemo movie when it finishes. In this third example, you'll add some ActionScript to a Flash SWF file so it can control a RoboDemo movie, then you'll insert the SWF into the movie as an animation: -
In Flash, open Example3_a.fla. You'll see that this is basically the same as Example1_a.fla used in the first example, but I've added two new layers: one to display the shaking arrow, the second to hold the ActionScript. -
Preview the movie by selecting Control > Test Movie. You'll see that the shaking arrow fades in after the "Welcome" message displays, then the movie stops and waits for the user to click the arrow. In its current state, if you inserted it into a RoboDemo movie, it would simply play for 5 seconds, and then disappear. You need to add some ActionScript at the start of the animation to stop the RoboDemo movie, then some at the end to restart the RoboDemo movie. -
Click frame 1 of the Script layer and add the following ActionScript: RoboDemo movie.swf consists of a collection of movie clips on _root, which contain all the elements of the movie. These movie clips include: - rdpbHost_mc contains the slides, captions, etc, that compose the actual movie.
- rdInsertmc10002_mc contains the first inserted animation.
- rdPlay bar_mc contains all elements of the play bar.
Therefore parent.stop() will stop the animation's parent movie clip, that is, the main RoboDemo movie contained in _root. This is the equivalent of _root.stop(), but as previously stated, don't use _root unless you really know what you're doing. -
Click frame 95 of the Script layer and add the following ActionScript: _parent.rdpbHost_mc.pbhForward(); This code triggers the pbhForward() function which normally executes when a user presses the forward button on the play bar. This causes the RoboDemo movie to jump to the next slide and restarts playback. You could have issued a _parent.play() command, however, in this case it would cause a short delay before moving to the next frame as the playhead waits for any remaining objects on the slide to play. Other useful play bar functions include: _parent.rdpbHost_mc.pbhForward() // Press the Forward button. _parent.rdpbHost_mc.pbhPause() // Press the Pause button. _parent.rdpbHost_mc.pbhPlay() // Press the Play button. _parent.rdpbHost_mc.pbhBack() // Press the Back button. _parent.rdpbHost_mc.pbhRewind() // Press the Rewind button. _parent.rdpbHost_mc.pbhInfo() // Press the Info button. _parent.rdpbHost_mc.pbhExit() // Press the Exit button. Note: The play bar functions are available whether the movie uses a play bar or not. Notice there is a frame 100 after our ActionScript on frame 95. This is required because RoboDemo fails to play the last frame of an inserted animation. If frame 95 were the last frame of our animation, our ActionScript would not execute, and the main RoboDemo movie would fail to restart. - Now you can save the file (File > Save) and export it as Example3_a.swf (File > Export Movie).
- In RoboDemo, open Example3_rd.rd.
- Double-click slide 3 to open it in the Edit window.
- Select Insert > Animation, then navigate to and open Example3_a.swf.
- Leave all options at their defaults and press OK.
- Drag the sizing handle at the top of the animation down slightly to resize the animation to 400 x 270 pixels. This prevents the welcome message from displaying too close to the caption "Slide 3."
-
Now you can save the file (File > Save) and preview it (File > Preview). Notice how the slider on the play bar stops moving when the animation displays, then restarts once the animation has finished. Now you'll have a look at how you can display the animation over multiple frames.
|
»
Interactive and Nonlinear Animations
Published 10/2/2006
Interactive and Nonlinear Animations Up until now the animations have been simple linear animations that play straight through from frame 1 to completion. RoboDemo can determine the duration of these animations by simply performing a frame count, and then control the playback of rest of the movie accordingly. If you build user interaction into your animations or use ActionScript to affect how long the animations will play, RoboDemo will no longer be able to automatically determine when to remove the animation. You must therefore control playback yourself using ActionScript. The first step is to decide whether you want to pause the RoboDemo movie or to continue playing it while your animation displays.
|
»
Integrating Flash Animations - Inserting Animations
Published 10/2/2006
Inserting Animations In this second example, you'll insert a Flash SWF file into a RoboDemo movie as an animation to produce this example: -
In RoboDemo, open Example2_rd.rd. You'll see that this is basically the same as the first example, but I've deleted the "Welcome" animation frame. - Double-click slide 3 to open it in the Edit window.
-
Select Insert > Animation, navigate to and open "Example1_a_complete.swf". The New Animation dialog box displays, showing a preview of the selected animation and its statistics displaying next to it. Below are the Play Options, which include: - Continue movie while playing animation plays an animation until it has finished. Objects on the current and subsequent slides display while the animation plays. This option lets you display an animation over multiple slides.
- Pause frame while playing animation stops all objects on a slide while the animation plays. No new objects are added or existing objects removed until the animation has finished.
- Stop playing when frame ends plays the animation for the duration of the current slide, objects on the slide display while the animation plays. The animation disappears at the end of the slide, even if it hasn't yet finished playing.
- Show for X seconds plays an animation for the specified number of seconds, regardless of the duration of the animation. Objects on the frame display while the animation plays.
- Appear after X seconds plays the animation after the slide displays for the specified number of seconds.
-
Select Continue movie while playing animation, leaving all other options at their defaults, and then press OK. The animation appears on the slide. While it appears opaque, it will become transparent when played back. Because the animation is the same size as the slide, the animation fills the whole slide. - Drag the sizing handle at the top of the animation down slightly to resize the animation to 400 x 270 pixels. This prevents the welcome message from displaying too close to the caption "Slide 3."
-
Now you can save the file (File > Save) and preview it (File > Preview). Notice how the animation appears on slide 3 and fades out on slide 4. Now you'll have a look at using interactive and nonlinear animations.
|
»
Integrating Flash Animations - Inserting Basic Animations
Published 10/2/2006
Inserting Basic Animations When inserting an animation into your movie, you first need to decide whether you wish to display the animation on its own slide (Animation Frame), or on top of an existing slide (Animation). - Use the Animation Frame option when you need to add stand-alone content, for example, adding an introduction or ending to your movie.
- Use the Animation option when you need to add content into slides in your movie, for example, custom-made animated captions, highlighters, and so on.
|
PSDTop offers Royalty Free files like PSDs and JPGs. PSD files are prepared for instant use in collages, banners, animations and other computer graphic related tasks - PSD files : PSD stock images & much more...!!! Files are multi layered and isolated. Just download a file, imort it to a program able to read .psd format (Adobe Photoshop, GIMP, other) and that's it - a new layer is added. PSD files are zipped to make transfer faster.
|