Adobe 62000112DM Animations - Page 6
Use the Select Text tool to copy this code., Note: °is is also attached to this document as
UPC - 883919019833
View all Adobe 62000112DM manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 6 highlights
Adobe®Acr®obat 3D Javascript Tutorial Animation Control Updated: 3/26/2008 I 1.5 9. (continued) Use the "Select Text" tool to copy this code. Note: This is also attached to this document as "DocumentJavascripts.js.txt" 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); }