View
218
Download
0
Category
Preview:
Citation preview
7/30/2019 cs 5 Animations
1/12
A d b A
b t 3 D
Controlling Animations
7/30/2019 cs 5 Animations
2/12
Animation ControlUpdated: 3/26/2008 I 1.5
Tis tutorial shows how to use the provided script to easily control the playing o an animation in a 3D
Scene. See Page 12 or an example o a nished product.
With the script supplied in this tutorial, all aspects o an animation can be controlled with the
javascript code. You can use Buttons, Events, or Mouse interactions to trigger the javascript code that
controls the animation.
Play Selection
Stop
Play All
Play and Advance
Rewind All
Rewind Selection
Remove Float Bowl ScrewsRemove Float BowlRemove FloatRemove Top Cover ScrewsRemove Top Cover
Animation Sections
7/30/2019 cs 5 Animations
3/12
Animation ControlUpdated: 3/26/2008 I 1.5
How to create the example...1. Obtain a 3D model with an embedded animation or create
one by ollowing the Keyrame Animation tutorial. You cancreate animations using the Adobe 3D oolkit that comeswith Acrobat 3D. You can also create a very simple explodeanimation in the next step. I you already have a 3D model
in your PDF, jump to Step 3.
2. Drag a 3D model le directly into Acrobat 3D to create a3D Annotation object in a blank PDF.
Make sure you select Export Animation on the Enhance tab o the3D Conversion dialog that comes up. Alternatively, to create a simpleexplode animation, select Create Exploding Parts Animation.
3. Embedd the provided javascript le in the 3D Annotation.A javascript le called AnimationController.js.txt is
provided as an attachment to this document.
Save the le on your hard drive and rename it by removing the .txtat the end. Double click the created 3D Annotation to bring up theproperties dialog. Click the Edit Content button and then click theBrowse button next to the Deault Script textboxt to select the script
le.
4. Choose the Advanced Editing - Select Object ool.Select the 3D Annotation and resize it so there is someblank space on the le side or buttons. Note: this willdistort the preview image. Go back to the Edit Contentdialog (Step 3) and select the Retrieve Poster rom deault
View option and click OK.
7/30/2019 cs 5 Animations
4/12
Animation ControlUpdated: 3/26/2008 I 1.5
5. Select the Button tool rom the menu: ools -> Forms-> Button ool. Add a button to the le o the 3D
Annotation. Access its properties dialog by double-
clicking it or by Properties in its right-click menu.Under the Options tab, change the label to Play
Selection.
6. Under the Actions tab, add a Run a Javascript action.Copy the ollowing javascript into the editor.
7. Now create another button labeled Stop and paste theollowing javascript in the same manner.
PlaySelected();
Stop();
7/30/2019 cs 5 Animations
5/12
Animation ControlUpdated: 3/26/2008 I 1.5
8. Create several more buttons with the ollowing labels andjavascript actions.
Play All
Play Next
Rewind All
Rewind Last
9. Select the Menu Advanced -> Document Processing ->Document Javascripts. ype AnimationControl or any
similar name (its not important) in the Script Name
text box and click Add. Delete the empty unction that is
created by deault and paste the code on the ollowing page
into the script editor.
PlayAll();
PlayNext();
PlayAll(true);
PlaySelected(true);
7/30/2019 cs 5 Animations
6/12
Animation ControlUpdated: 3/26/2008 I 1.5
var AnimationSections = [[0,2],[2,5],[5,9]];var SectionCount = AnimationSections.length;
function Context(){
return getAnnots3D(0)[0].context3D;}
function Stop(){
Context().MyAnimation.pause();}
function GetSelectedSectionIndex(){
return getField("AnimationSections").currentValueIndices;}
function SetSelectedSectionIndex(value){
value = Math.min(SectionCount-1, value);getField("AnimationSections").currentValueIndices = value;
}
function SetPlayRange(playall){
if(playall){
Context().MyAnimation.setPlayRange(AnimationSections[0][0], AnimationSections[SectionCount-1][1]);}else{
var section = AnimationSections[GetSelectedSectionIndex()];Context().MyAnimation.setPlayRange(section[0], section[1]);
}}
function PlaySelected(DontPlay)
{SetPlayRange();Context().MyAnimation.reset();if(!DontPlay)
Context().MyAnimation.play();}
function PlayAll(DontPlay){
SetPlayRange(true);SetSelectedSectionIndex(0);Context().MyAnimation.reset();if(!DontPlay)
Context().MyAnimation.play();}
function PlayNext(DontPlay){
SetPlayRange();Context().MyAnimation.reset();if(!DontPlay)
Context().MyAnimation.play();SetSelectedSectionIndex(GetSelectedSectionIndex() + 1);
}
9. (continued) Use the Select ext tool to copy this code.Note: Tis is also attached to this document as DocumentJavascripts.js.txt
7/30/2019 cs 5 Animations
7/12
7/30/2019 cs 5 Animations
8/12
Animation ControlUpdated: 3/26/2008 I 1.5
12. Select the ools -> Forms - > ListBox ool menu and create a listbox somewhere near your buttons. TeProperties dialog should open as soon as its created. Navigate to the Options tab and add an itemor each section o the animation you decided on in step 10. Note: Make sure they are in chronologicalorder. Navigate to the General tab and change the Name to AnimationSections.
13. Your PDF should now resemble Page 2 o this document (with the exception o the section titles and 3DModel) and should unction in the same manner.
ry experimenting with more buttons using other unctions that the script contains. Te rest o this
document is a reerence or the "Animation Controller.js" javascript.
7/30/2019 cs 5 Animations
9/12
Animation ControlUpdated: 3/26/2008 I 1.5
How to use the rest o the script...
AnimationController.play()Begins playing animation from the current position in the current direction.
AnimationController.pause()Freeze the animation at the current position. Calling play() aerward will resumethe animation right where it le of.
AnimationController.reset()Stops the animation and resets the position to the beginning or the end(depending on the last call to setPlayForward()).
AnimationController.setPlayForward(forward)Sets the play direction but doesnt start playback.forward = true: Play the animation in the normal orward direction (deault)forward = false: Play the animation in the opposite direction
AnimationController.setLoop(loop)Sets the looping mode but doesnt start playback.loop = true: Play the animation in looped modeloop = false: Play the animation once and then stop (deault)
AnimationController.setPingPong(ping)urns pingpong on or of but doesnt start playback.Note: When ping = true, this will override the setPlayForward() unction.Note: Tis can be used with setLoop()ping = true: Play the animation orward once, and then backward onceping = false: Play the animation once in the direction specied with setPlayForward()
7/30/2019 cs 5 Animations
10/12
Animation ControlUpdated: 3/26/2008 I 1.5
How to use the rest o the script...
AnimationController.setPlaySpeed(speed)Sets the speed o the animation playback relative to the deault speed but doesnt start playback.Note: o play an animation in reverse, use setPlayForward(alse) instead o setPlaySpeed(-1)speed < 1: Animation is played slower than its deault speed
speed = 1: Animation is played at its deault speed (deault)speed > 1: Animation is played aster than its deault speed
AnimationController.setSmoothness(smooth)Sets how smoothly the animation will transition rom being stopped (at the beginning) to ullspeed (middle) to stopped again (at the end).Note: any value 0 and above is valid, but anything above 10 is airly similarsmooth = 0: No smoothing (linear speed)smooth = 1: Partial smoothing(hal linear, hal cosine wave) (deault)smooth = 10: Full smoothing (animation speed ollows cosine wave)
Note: Tere are get functions for most of the above parameters, i.e. getPlaySpeed(), getSmoothness(), getPingPong(), ...
AnimationController.setPlayRange(starttime, endtime)
Sets the section o the animation to play. I your animation is 10 seconds long but you only wantto play the last 4 seconds, call setPlayRange(6, 10).Note: Tese numbers always represent time in the original animations reerence rame. i.e. You donthave to change the playRange afer changing playForward or playSpeed. Endtime should always be
greater than Starttime, even i playForward is set to alse.starttime: Determines the where the animation will start playingendtime: Determines the where the animation will stop playing
7/30/2019 cs 5 Animations
11/12
Materials and/or Tutorial prepared by Daniel Beardsley (4/22/2006)
Copyright 2006 Adobe Systems Inc no full or partial reproduc tion of this document is permitted without prior written permission of Adobe Systems
Animation ControlUpdated: 3/26/2008 I 1.5
You can create multiple AnimationController objects and control multiple animations with this code.Simply create one AnimationController object for each animation present in the scene. Just modify thelast line of the provided script.
To access the animations by name, change the last lines to this:var MyFirstAnimation = new AnimationController(scene.animations.getByName(First Animations Name));var MySecondAnimation = new AnimationController(scene.animations.getByName(Second Animations Name));
How to control multiple Animations...
7/30/2019 cs 5 Animations
12/12
Owners Man
M250 Gas-powered Push Mow
ction 4. carburetor DiSaSSembly
u will need the ollowing tools:
#2 phillips screw driver
Solvent and a sot brush
A rag or wiping up possible residual gasoline
rninG:
asoline is fammable, dispose o it properly
lways wear gloves when working with gasoline or other solvents
k on the Step number using the hand tool
Carburetor Disassembly
Remove the Carburetor rom the mower (Reer to Section 3.)
2 Clean the outside o the Carburetor with
a solvent and a sot brush
Removing the Bowl
Remove the screws holding on the bot-tom o the carburetor (the bowl)
2 Remove the bowl and be careul not
to get any debris inside the carburetor.
Note: (residual gasoline may still be
inside the carburetor and will probably
spill at this point)
3 Gently pull out the foats and the pivot
bar they are attached to.
Removing the Mixing Cover
Remove the screws that hold the top
part o the carburetor on (The Mixing
Cover).
2 Remove the mixing cover itsel by slid-
ing it vertically until the assembly is
clear o the carburetor.
note: aSSemblyiSthereverSeofDiSaSSembly.
Recommended