SymbolsandNumerics>(rightshift)operator,88#prefix,hexnumbers,84+=operator,28&operator(bitwiseAND),88|operator(bitwiseOR),87||operator(OR),1500xprefix,ActionScript,8424-bitcolor,84easingappliedtocolors,200getPixel/setPixelmethods,112hexadecimalcolorvalues,8432-bitcolor,85getPixel32/setPixel32methods,112numbertypeusedforstoring,86transparencyand,853Dsystemsseethree-dimensionalsystemsAacceleration,132–144,3093Dsystems,382–384accelerationononeaxis,133–135accelerationontwoaxes,135–137addingaccelerationtovelocity,145,514angularacceleration,139–140convertingtox,yacceleration,145,514ax/aynotationinthisbook,135definition,132gravityasacceleration,137–139liftforceandgravity,138proportionalaccelerationseespringingshipcontrols,spaceshipsimulation,144totalacceleration,309velocityand,132windforce,139Acceleration1documentclass,133Acceleration2documentclass,134Acceleration3documentclass,136accessmodifiers,classes,16acosfunction,61521INDEXActionScript0xprefix,84bitmaps,111–114colortransforms,105–107colorsusedin(24-and32-bit),85convertingbetweendecimalandhexcolorvalues,85drawingAPI,89–104easingtowardtarget,192embeddingexternalassets,115–116filters,107–111intnumbertype,85lawofcosinesand,369–371loadingexternalassets,114metadata,115numbertypes,85perspectiveinActionScript,379–382springing(proportionalacceleration),201–218uintnumbertype,86usingdecimalorhexcolorvaluesin,85versions,14ActionScript3.
0,settingup,21–26command-linecompiler,23–25Flash9IDE,21FlexBuilder2,22scalingthemovie,26tracing,25addChildmethod,111displayingobjects,39addEventListenermethod,33additionmatrixaddition,475adjacentside,triangles,57alphaparameter,lineStylemethod,91alphaproperty,movieclipeasingappliedtotransparency,199alphasparameteralphavelocity,131beginGradientFillmethod,102ANDbitwiseoperator(&),88angleofcollisionconservationofmomentumontwoaxis,286AngleBouncedocumentclass,259AngleBounceBoundsdocumentclass,265AngleBounceFinaldocumentclass,267AngleBounceOptdocumentclass,262AngleBounceRotatedocumentclass,263angles,52–57arccosineofangle,61arcsineofangle,61arctangentofangle,61–63bouncingoffanangle,256–271cosineofangle,59–60directionofanglemeasurements,56Flash'scoordinatesystem,54–57Flash'sdirectionofanglemeasurements,56measuringusingradiansanddegrees,53–54puttingtheangleinstandardposition,59radiansanddegrees,53–54sineofangle,57–59tangentofangle,60triangleterminology,57waveswithtwoangles,70angularacceleration,139–140convertingtox,yacceleration,145,514angularvelocity,126–130convertingtox,yvelocity,145,514mousefollower,129–130vectoraddition,128–129AnimatedFiltersdocumentclass,109animationacceleration,132–144animatingfilters,109–111animatingwithcode,27–37clipevents,31–32eventhandlers,32–33events,32–33eventsforanimation,36–37frameloops,30–31listenersandhandlers,33–36looping,27–30animationandframes,14collisiondetection,224–246description,4–5,14dynamicandstaticanimationcompared,10dynamicanimation,10,14easing(proportionalvelocity),190–200eventsandscreenrefreshes,36frame-by-frameanimation,27integratingsound,509–512interval-basedanimation,501–507kinematics,324–372forwardkinematics,325–347inversekinematics,350–372prerenderedanimation,11scriptedanimation,27springing(proportionalacceleration),201–218staticanimation,10time-basedanimation,505–507timer-basedanimation,502–505tweenedanimation,14velocity,122–132APIs,drawing,89–104arccosineofangle,61arcsineofangle,61arctangentofangle,61–63Arrowdocumentclassrotatingmovieclipstopointtomouse,63rotatingmovieclipstopointtomouse,64rotatingmovieclipstopointtomouse,65arrowsrotatingmovieclipstopointtomouse,65.
assuffixwritingandsavingclasses,16AS3ActionScriptversions,14colorsusedin(24-and32-bit),85filters,107AS3SWFseeSWFasinfunction,61assetsembeddingexternalassets,115–116loadingexternalassets,114Asteroidsgame3Dsystems,382screenwrapping,157spaceshipsimulation,140atanfunction,61–62rotatingmovieclipstopointtomouse,65atan2function,62–63mousefollower,130rotatingmovieclipstopointtomouse,65attachBitmapmethod,111attachMovieClipmethodsubclassingdisplayobjects,40axnotationinthisbook,135axesaccelerationononeaxis,133–135accelerationontwoaxes,135–137velocityononeaxis,124–125velocityontwoaxes,126xaxisvelocity,124yaxisvelocity,124aynotationinthisbook,135Bbackfaceculling,452–455isBackFacemethod,454modeling3Dspinningcube,440INDEX522Balldocumentclass,67,124attachingmultipleobjectswithsprings,215chainingsprings,209conservationofmomentumononeaxis,279distance-basedcollisiondetection,232particles,306reachingforanobject,363removingobjectsatboundaries,152springingtomultipletargets,210Ball3Ddocumentclasscreating3Dpointsandlines,422multipleobjectbouncingin3Dsystems,387z-sorting,390beginFillmethodcreating3Dfills,432creatingshapesusing,100–101beginGradientFillmethodalphasparameter,102colorsparameter,102creatinggradientfillsusing,101creatingmatrix,103–104fillTypeparameter,101matrixparameter,103parameters,101ratiosparameter,102settingfillcolors/alphas/ratios,102specifyingfilltype,101behaviors,15biaseddistribution,497–501billiardballphysics,275–302Billiard1documentclass,282Billiard2documentclass,283Billiard3documentclass,290Billiard4documentclass,295Bitmapclass,111BitmapDataclass,111addChildmethod,111attachBitmapmethod,111collisiondetection,245fillColorparameter,111transparencyandcolors,85transparentparameter,111bitmaps,111–114embeddingexternalassets,115–116loadingexternalassets,114methodsforreading/changingpixels,112performancedrawing,114bitwiseoperatorsAND(&),88combiningcolors,86–88extractingcomponentcolors,88–89leftshift(>),88blurfiltercreatingfilters,107BlurFilterclass,107Bobbingdocumentclass,67bordersseeboundariesBounce3Ddocumentclass,385bouncing3Dsystems,384–390multipleobjectbouncing,387–390singleobjectbouncing,384–387bouncefactor,164bouncingoffanangle,256–271bouncingoffmultipleangles,267"fallingofftheedge"problem,263–265makingitdynamic,263rotatingto/fromhorizontal,258–263"undertheline"problem,265–267boundaries,159–164Bouncingdocumentclass,161boundaries,148–164bouncing,159–1642Dand3Dsystems,3843Dsystems,390bouncingoffanangle"fallingofftheedge"problem,263–265"undertheline"problem,265–267real-worldscenarios,148regeneratingout-of-boundsobjects,155–156,169,515removingobjectstoosoonat,151removingobjectsbeyond,150–155,169,514screenwrapping,157–159,169,515settingboundaries,148–150stageproperty,148boundingboxprinciple,225Boxdocumentclass,228Boxesdocumentclass,228brightnessproperty,Lightclass3Dlighting,459Brown,Robert,488Brownian(random)motion,488–491Brownian1documentclass,488Brownian2documentclass,490Bubblesdocumentclass,236Bubbles2documentclass,241CcalfOffsetSlider/calfRangeSliderslidersforcontrollingwalkcycle,335ceilingsseeboundariesChaindocumentclass,207ChainArraydocumentclass,210charCodeproperty,46INDEX523checkCollisionmethodcollisionsbetweensamemassobjects,508conservationofmomentumontwoaxis,290,295,298,299particlecollisiondetection,310spritescollidingandstickingtogether,301checkFloormethodhandlingcollisionswhilewalking,339,340checkHitmethodcollisionsreachingforobjects,366checkLinemethodbouncingoffmultipleangles,271checkWallsmethodconservationofmomentumontwoaxis,290screenwrappingatboundaries,342,343Circledocumentclass,74circlesdistance-basedcollisiondetection,232trigonometricformulae,80,513circulardistribution,494–496circularmovement,73–74Classfield,Flash9,41classpath,16classes,15–21accessmodifiers,16classdefinition,16constructors,17description,15documentclass,20eventtypesasproperties,33extendingMovieCliporSpriteclasses,19importingclassesfrompackages,17inheritance,18objectsand,15overridingmethods,18packagesand,16publicaccessmodifier,16simpleclassdefinition,15writingandsaving,16subclasses,18classes,listofBitmap,111BitmapData,111BlurFilter,107Color,105ColorTransform,105–107Delegate,36DisplayObject,38DropShadowFilter,54Event,33,36GradientType,101Keyboard,46,134KeyboardEvent,45Light,458Loader,114Math,57–63Matrix,480–484MouseEvent,35,43,93,174MovieClip,19,20,38,40,90Point,298Rectangle,179,264Sound,509Sprite,19,20,34,38,40,41,64StageAlign,26StageScaleMode,26Timer,502TimerEvent,502,504Triangle,434,436,454,456,459,460,463–465,447URLRequest,510clearmethod,90clipeventsanimatingwithcode,31–32enterFrameevent,32loadevent,31clockwise/counterclockwisedirectionsdeterminingclockwise/counterclockwise,453isBackFacemethod,454code,animatingwith,27–37codesnippetsuseofinitmethodwith,20collisiondetection,224–2463Dsystems,414–417alternativeapproachesto,224basicoptionssummarized,232betweenspriteandpoint,230–231withshapeFlagparameter,231betweentwosprites,225–229accuracyofmethod,225precisionofhitTestPointmethod,232bouncingoffanangle"fallingofftheedge"problem,263–265"undertheline"problem,265–267boundingboxprinciple,225collision-basedspringing,235–238distance-basedcollisiondetection,232–238formula,245,517forirregularlyshapedsprites,232forroughlyrectangularclips,232forverysmallsprites,232getBoundsmethod,264–265hitTestmethod,224hitTestObjectmethod,225–229hitTestPointmethod,230–231withshapeFlagparameter,231multipleobjectcollisiondetection,238–244formula,245,517multipleobjectspringing,241–244othermethodsofcollisiondetection,245INDEX524particles,310–312usingmultipleBitmapDataobjects,245Collision3Ddocumentclass,414collisionsbetweensamemassobjects,507–509bouncingoffanangle,256–271conservationofmomentum,277ononeaxis,279–284conservationofmomentumontwoaxis,284–302handlingcollisionswithfloorwhilewalking,339–342kineticenergy,278reachingforanobject,365–366spritesstickingtogetherproblem,300–302Colorclass,105colorparameter,lineStylemethod,91colortransforms,105–107colors24-bitcolor,8432-bitcolor,85combiningcolors,86–88,117combiningcomponentcolors,513easingappliedtocolors,200extractingcomponentcolors,88–89,117,513getAdjustedColormethod,460getLightFactormethod,460RGBcolor,84colorsinFlash,84–8932-bitcolorandtransparency,85convertingbetweendecimalandhexcolorvalues,85hexadecimalcolorvalues,84–85storing32-bitcolor,86usingdecimalorhexcolorvaluesinActionScript,85colorsparameterbeginGradientFillmethod,102ColorTransformclasschangingcolorswith,105–107command-linecompilersettingupActionScript3.
0application,23–25conservationofmomentum,277collisionsbetweensamemassobjects,507–509formulae,302,518kineticenergyformula,278LawofConservationofMomentum,277ononeaxis,279–284ontwoaxis,284–302conservationofmomentumontwoaxisangleofcollision,286spritescollidingandstickingtogether,300,302constantsgravitationalconstant,308constructors,classes,17controlpointdrawingcurvesthrough,94–95conversionsconvertingbetweenhexanddecimal,116,513convertingbetweenradiansanddegrees,80,512coordinaterotation,250–2563Dsystems,407–414formula,418,519rotationonx-,y-,andz-axes,407advancedcoordinaterotationmethod,254bouncingoffanangle,256–271bouncingoffmultipleangles,267"fallingofftheedge"problem,263–265makingitdynamic,263rotatingto/fromhorizontal,258–263"undertheline"problem,265–267conservationofmomentumontwoaxis,284–302coordinaterotationwithmatrices,477–478formulae,251,272,517reversecoordinaterotation,261,272,518rotatingasingleobject,252–253rotatingmultipleobjects,254–256coordinatesystems2Dand3Dsystemxandycoordinates,378Flash'scoordinatesystem,54–57left-handcoordinatesystem,377right-handcoordinatesystem,376standardcoordinatesystem,55cosfunction,59–60angularacceleration,139circularmovement,73–74ellipticalmovement,74–75mousefollower,130cosineofangle,59–60basicformulae,80,512lawofcosines,inversekinematics,367–369cosinewaves,72–75circularmovement,73–74ellipticalmovement,74–75createGradientBoxmethodcreatinggradientfills,103crossproductofvectors,461Cubedocumentclassmodeling3Dspinningcube,440moving3Dsolids,448cubesmodeling3Dspinningcube,439–441backfaceculling,440cullingbackfaceculling,452–455modeling3Dspinningcube,440cursorkeysidentifyingifkeypressed,134,135curvescreatingmultiplecurves,95–100drawingcurvesthroughcontrolpoint,94–95INDEX525drawingcurvesthroughpoints,117,514drawingcurvesusingcurveTo,93–100curveTomethod,drawingAPIdrawingcurvesusingcurveTo,93–100creatingmultiplecurves,95cylindersmodeling3Dcylinder,445–447Ddampingseefrictiondecimalcolorvaluesconvertingbetweenhexanddecimal,116,513degrees,53–54conversionvaluetoradians,53convertingbetweenradiansanddegrees,80,512usingdegreeswithradians,54DelegateclassscopeandAS3SWF,36depthin3Dsystemsz-sorting,390–392depthsortingseez-sortingdirectionangularvelocity,126–130negativevelocity,124velocityand,122displaylist,37–43AS2andAS3compared,38removingobjectfrom,39reparentingobjectsin,39subclassingdisplayobjects,40–43visibilityofobjects,38displayobjectsmouseX/mouseYproperties,45subclassingdisplayobjects,40–43targetCoordinateSpaceparameter,264DisplayObjectclassAS3objects,38distance,3Dsystems3Ddistanceformula,418,519distancebetweentwoobjectsdistance-basedcollisiondetection,232–238collision-basedspringing,235–238formula,245,517distancebetweentwopoints,76–79Distancedocumentclass,77MouseDistancedocumentclass,78trigonometricformulae,81,513Distancedocumentclassdistance-basedcollisiondetection,233distancebetweentwopoints,77Distance2documentclassdistance-basedcollisiondetection,234distributionofobjectsbiaseddistribution,497–501circulardistribution,494–496randomdistributionofobjects,492–501squaredistribution,492–494dividingbyzeroinFlash,381documentclasses,20displayingobjects,39mouseposition,45mouseX/mouseYproperties,45settingupActionScript3.
0application,21settingupusingFlash9IDE,21dotproductofvectors,462dotsbiaseddistributionof,497,499,500circulardistributionof,494randomdistributionof,493squaredistributionof,494DoubleSpringdocumentclassattachingmultipleobjectswithsprings,215doVelocitymethodaddinggravitytowalkingprocess,338dragseefrictiondragfunctiondraggingwithmultiplesegments,355draggingwithtwosegments,353DragAndMove1documentclasscombiningdraggingwithmotioncode,180draggingcombiningthrowingwithdragging,182–186draggingmultipleobjects,177draggingsprites,177–182combiningdraggingwithmotioncode,179–182mouseMoveevent,177–178startDrag/stopDragmethods,178–179easingtowardmovingtarget,194dragging(inversekinematics)description,350draggingmultiplesegments,354–356draggingtwosegments,352–354draggingwithonesegment,352drawmethodspaceshipsimulation,141drawingbitmapsperformance,114drawingAPI,89–104creatinggradientfillsusingbeginGradientFill,101creatingmatrix,103–104settingcolors/alphas/ratios,102specifyingfilltype,101creatingmultiplecurves,95–100creatingshapesusingbeginFillandendFill,100–101drawingcurvesthroughcontrolpoint,94–95INDEX526drawingcurvesusingcurveTo,93–100creatingmultiplecurves,95–100drawinglinesusinglineToandmoveTo,91–93drawingwaveswith,71dynamicdrawingbeforeFlashMX,89methodsbeginFillmethod,100–101beginGradientFillmethod,101clearmethod,90curveTomethod,93–100endFillmethod,100–101lineStylemethod,91lineTomethod,91moveTomethod,92removingdrawings,90settinglineappearancewithlineStyle,91transparencyandcolors,85DrawingAppdocumentclassdrawinglinesusinglineToandmoveTo,92DrawingCurvesdocumentclassdrawingcurvesusingcurveTo,94DropShadowFilterclassusingdegreesandradians,54dynamicanimation,10,14EEaseToMousedocumentclass,198easing,3Dsystems,403–405easing(proportionalvelocity),190–200advancedeasing,200determiningvelocity,191easingappliedtocolors,200easingappliedtorotation,200easingappliedtotransparency,199easinginoreasingout,190easingtowardmovingmouseastarget,198easingtowardmovingtarget,198–199easingtowardtarget,191–195formulas,218,516propertiesusingeasing,199–200proportionalmotion,190RobertPenner'seasingformulas,200whentostopeasing,195–198Xeno'sParadox,195Easing1documentclass,193Easing2documentclass,194Easing3Ddocumentclass,404EasingOffdocumentclass,197edgesseeboundariesellipses,75ellipticalmovement,74–75trigonometricformulae,80,513Embedmetadatatag,115–116embeddingexternalassets,115–116endFillmethodcreating3Dfills,432creatingshapesusing,100–101enterFrameevent,32animatingfilters,111combiningthrowingwithdragging,183easingtowardtarget,193eventsandscreenrefreshes,36garbagecollector,151removingobjectsatboundaries,150,155rotatingmovieclipstopointtomouse,65enterFramehandlercollision-basedspringing,238multipleobjectcollisiondetection,239ENTER_FRAMEproperty,Eventclass,33environmentalboundariesseeboundariesEventclassavoidingmagicstrings,33eventsandscreenrefreshes,36properties,33eventhandlersanimatingwithcode,32–33AS3andscope,36description,33listenersandhandlers,33–36namingconventions,34removeEventListenermethod,34rotatingmovieclipstopointtomouse,65eventsaddEventListenerfunction,33animatingwithcode,32–33AS3eventarchitecture,32clipevents,31–32creatingandusingsprite,35enterFrameevent,32eventtypesasproperties,33eventsandscreenrefreshes,36eventsforanimation,36–37FlashMX,32keyboardevents,45–46keyDownevent,142keyUpevent,142loadevent,31mouseevents,43–45MouseEventclass,35onevents,31systemevents,31userevents,31extendskeywordclassinheritance,18exteriorside,polygons,453INDEX527externalassetsembedding,115–116loading,114ExtrudedAdocumentclassbackfaceculling,455finalcodefor,465–469modeling3Dletter,442z-sorting(depthsorting),457F"fallingofftheedge"problembouncingoffanangle,263–265fillColorparameter,BitmapDataclass,111FilledEdocumentclasscreating3Dfills,432fillscreating3Dfills,432–438usingtriangles,433–438creatinggradientfillsusingbeginGradientFill,101creatingmatrix,103–104settingcolors/alphas/ratios,102specifyingfilltype,101creatingshapesusingbeginFillandendFill,100,101linearfills,101radialfills,101fillTypeparameterbeginGradientFillmethod,101filters,107–111animatingfilters,109–111AS3filters,107blurfilter,107creatingfilters,107–109DropShadowFilterclass,54usingdegreesandradians,54filtersproperty,108,109Filtersdocumentclass,108fireworksgravityin3Dsystems,392Fireworksdocumentclass,392flproperty,Point3Dclasscreating3Dpointsandlines,427FLAfilecreatingandsavingclasses,16Flashacosfunction,61asinfunction,61atanfunction,61–62atan2function,62–63bitmaps,111–114colortransforms,105–107colorsseecolorsinFlashcoordinatesystem,54–57cosfunction,59–60directionofanglemeasurements,56drawingAPI,89–104dynamicandstaticanimation,10embeddingexternalassets,115–116filters,107–111innerworkingsofFlash,36loadingexternalassets,114sinfunction,58–59tanfunction,60visibilityofobjects,38Flash8drawingmethodenhancements,90transparencyandcolors,85Flash9IDEclassconstructors,17creatingandsavingclasses,16settingupActionScript3.
0application,21settingupdocumentclass,21FlashMXdrawingmethods,90eventsin,32FlashDevelopeditorsettingupActionScript3.
0application,24Flex2SDKsettingupActionScript3.
0application,24tracing,26FlexBuilder2settingupActionScript3.
0application,22tracing,26floorsseeboundariesflyingwrappingonz-axisin3Dsystems,403FollowMousedocumentclass,130FollowMouse2documentclassangularacceleration,139forloopanimationusinglooping,29removingobjectsatboundaries,154forcegravitationalforce,308–310totalforce,309formulae,trigonometry,79–81forwardkinematics,325–347description,324galloping,334movingonesegment,325–328movingtwosegments,328–330segments,325walking,330–347addinggravitytowalkingprocess,338–339automatingwalkingprocess,330–338buildingnaturalwalkcycle,332–334handlingcollisionswithfloor,339–342makingwalkcycledynamic,334–338INDEX528reducingsegmenttocreatespace,338refiningwalkingprocess,338–347screenwrapping,342–347slidersforcontrollingwalkcycle,335Fountaindocumentclassregeneratingobjects,155frameloopsanimatingwithcode,30–31framesanimationandframes,14descriptionandpurposeof,5,10enterFrameevent,32framerates,30frame-by-frameanimation,27motionandframes,5–11prerenderedanimation,11programmedframes,10renderingbeforedisplaying,27screenupdatesusinglooping,29usingrulestobuildframes,10friction,164–1693Dsystems,384applyingcorrectly,165–167,170,515applyingtheeasyway,167,170,515applyingtospaceshipsimulation,168–169one-dimensionalspringing,203Friction1documentclassapplyingfrictioncorrectly,166functionsmethodscompared,15functions,listofseealsomethods,listofacos,61asin,61atan,61–62atan2,62–63cos,59–60sin,57–59tan,60trace,85Ggabocorp.
comintro,10gallopingforwardkinematics,334garbagecollectorremovingobjectsatboundaries,151getAdjustedColormethod3Dlighting,460getBoundsmethodcollisiondetection,264–265handlingcollisionswithfloorwhilewalking,340getLightFactormethod3Dlighting,460getPinmethodbuildingnaturalwalkcycle,333forwardkinematics,movingonesegment,327forwardkinematics,movingtwosegments,329handlingcollisionswithfloorwhilewalking,341getPixel/getPixel32methods,112getTimermethodtime-basedanimation,507gradientfillscreatingusingbeginGradientFill,101GradientFilldocumentclass,103GradientTypeclassspecifyingfilltypeforbeginGradientFill,101graphicspropertyspritesandmovieclips,90gravitatefunction,308gravity,307–3133Dsystems,392–395addinggravitytowalkingprocess,338–339addingtospringingball,205formula,320,518gravitationalconstant,308gravitationalforce,308–310gravityasacceleration,137–139orbitingparticles/planets,312–313particleattraction,307particlecollisiondetection,310–312regeneratingobjects,156slingshoteffect,310springscompared,314Gravitydocumentclass,138,310GravityBouncedocumentclass,311GravityRandomdocumentclass,311Hhandlersseeeventhandlershex(hexadecimal)numbersconvertingbetweenhexanddecimal,513indicatinguseof,84hexadecimalcolorvalues,84–8524-bitcolor,84convertingbetweenhexanddecimal,85,116usingdecimalorhexinActionScript,85hittestingseecollisiondetectionhitTestmethod,224hitTestObjectmethodboundingboxprinciple,225,227collisiondetectionbetweentwosprites,225–229getBoundsmethod,264usingrectangles,228INDEX529hitTestPointmethodcollisiondetectionbetweenspriteandpoint,230–231withshapeFlagparameter,231collisiondetectionbetweentwosprites,232getBoundsmethod,264HTMLusinghexnumberin,84hypotenuseterminologyrelatingtotriangles,57IIdentifierfield,Flash9,41illusionofmotion,5,10importsimportingMovieClipclass,20importingSpriteclass,20importskeywordimportingclassesfrompackages,17inertia,acceleration,148inheritance,classes,18initmethodusewithcodesnippetswith,20instances,classesandobjects,15intnumbertypeActionScript,85storing32-bitcolor,86internalaccessmodifiers,16internalkeyword,16interval-basedanimation,501–507time-basedanimation,505–507timer-basedanimation,502–505inversekinematics,350–372description,324dragging,350draggingmultiplesegments,354–356draggingtwosegments,352–354draggingwithonesegment,352lawofcosines,367–369ActionScriptand,369–371mathematicalapproach,366–371reaching,350reachingforanobject,363–365collisionswhen,365–366reachingforthemouse,357–362reachingwithmultiplesegments,357–366reachingwithonesegment,350–351invisiblepoints3Dlineswithinvisiblepoints,425isBackFacemethoddeterminingclockwise/counterclockwise,454isDownmethod,403JJavacommand-linecompiler,24Kkeycodes,46–48Keyboardclass,46accelerationononeaxis,134keyboardevents,45–46accelerationononeaxis,134creatingandusingsprites,35shipcontrols,spaceshipsimulation,144KeyboardEventclassproperties,45keyCodeproperty,46accelerationononeaxis,134keyDowneventshipcontrols,spaceshipsimulation,142keyUpeventshipcontrols,spaceshipsimulation,142keywordsextends,18imports,17internal,16override,18package,16private,16protected,16public,16kinematics,324–372forwardkinematics,325–347automatingwalkingprocess,330–338buildingnaturalwalkcycle,332–334description,324makingwalkcycledynamic,334–338movingonesegment,325–328movingtwosegments,328–330refiningwalkingprocess,338–347inversekinematics,350–372dragging,350dragging,352–356draggingmultiplesegments,354–356draggingtwosegments,352–354draggingwithonesegment,352reaching,350–351,357–366reachingforanobject,363–365reachingforthemouse,357–362reachingwithmultiplesegments,357–366reachingwithonesegment,350–351kineticenergyformula,278INDEX530LLawofConservationofMomentum,277lawofcosinesformulae,372,519inversekinematics,367–369ActionScriptandlawofcosines,369–371leftcursorkeyidentifyingifkeypressed,134,135leftshiftbitwiseoperator(attachMovieClip,40beginFill,100–101beginGradientFill,101–104checkCollision,290checkFloor,339checkHit,366checkLine,271checkWalls,290clear,90createGradientBox,103curveTo,93–100doVelocity,338drag,353draw,141endFill,100–101getAdjustedColor,460getBounds,264–265getLightFactor,460getPin,327getPixel/getPixel32,112getTimer,507gravitate,308hitTest,224hitTestObject,225–229hitTestPoint,230–231init,20isBackFace,454isDown,403lineStyle,91lineTo,91matrixMultiply,479moveBall,209moveTo,92onChange,328–329onClipEvent,31onEnterFrame,111onKeyUp,144onMouseDown,93onMouseMove,93onMouseUp,93onPress,212onRelease,212onTimer,502position,359reach,359removeChild,39removeEventListener,34repeatCount,503rotate,298rotateX,411rotateY,411screenX,427screenY,Point3Dclass,427setCenter,427setChildIndex,391setPixel/setPixel32,112setTransform,105setVanishingPoint,427splice,150,154spring,316springTo,215startDrag/stopDrags,178–179swapChildren,391swapChildrenAt,391swapDepths,391trace,85trackVelocity,183walk,333modelingvisualmodeling,436modeling3Dsolids,438–4473Dlighting,458–469backfaceculling,452–455cylinder,445–447letters,442–445pyramid,441–442spinningcube,439–441z-sorting(depthsorting),455–458momentumcollisionsbetweensamemassobjects,507–509conservationofmomentumononeaxis,279–284conservationofmomentumontwoaxis,284–302LawofConservationofMomentum,277motionseealsowavesacceleration,132–144Brownian(random)motion,488–491circularmovement,73–74combiningdraggingwithmotioncode,179–182combiningthrowingwithdragging,182–186easing(proportionalvelocity),190–200easingtowardmovingtarget,198–199ellipticalmovement,74–75framesandmotion,5–11illusionofmotion,5,10kinematics,324–372forwardkinematics,325–347inversekinematics,350–372linearverticalmotion,69movinggraduallyclosertotarget,191proportionalmotion,190pulsingmotion,70smoothupanddownmotion,67–69INDEX532spaceshipsimulation,140–144springing(proportionalacceleration),201–218springingtowardamovingtarget,205springingtomultipletargets,210–213velocity,122–132mousedescription,174easingtowardmovingmouseastarget,198reachingforthemouse,357–362rotatingmovieclipstopointtomouse,63–66springingtowardamovingmouse,205mouseevents,43creatingandusingsprite,35,36definingmouseeventnames,43descriptionofmainevents,174draggingsprites,177–182pressingandreleasingsprites,174–177propertiesofMouseEventclass,43registeringeventregardlessofpointerposition,175sprites/movieclips/objectsreceiving,174userinteraction,45mousefollowerangularacceleration,139angularvelocity,129–130mouseposition,documentclass,45MouseDistancedocumentclassdistancebetweentwopoints,78mouseDownevent,175draggingwithmouseMoveevent,177,178draggingwithstartDragmethod,179settinguphandlersfor,176mouseDownlistenerdraggingwithmouseMoveevent,177MouseEventclasscreatingandusingsprite,35drawinglinesusinglineToandmoveTo,93properties,43,174MouseEventsdocumentclass,175mouseMoveevent,175draggingsprites,177–178draggingwithmouseMoveevent,178drawinglinesusinglineToandmoveTo,93settinguphandlersfor,176whenitoccurs,176MouseMoveDragdocumentclassdraggingwithmouseMoveevent,177mouseUpevent,175draggingwithmouseMoveevent,177,178draggingwithstopDragmethod,179easingtowardmovingtarget,194receivingmouseevents,174relationshipwithmouseDownevent,176settinguphandlersfor,176mouseX/mouseYproperties,45moveBallmethodchainingsprings,209reachingforanobject,364moveTomethoddrawinglinesusing,92movieclipscollisiondetectionforrectangularclips,232hitTestmethod,224documentclassextending,20draggingwithstartDrag/stopDragmethods,178easingtowardanothermovieclipastarget,199embeddingexternalassets,115–116graphicsproperty,90loadingexternalassets,114receivingmouseevents,174rotatingtopointtomouse,63–66MovieClipclass,19classesextending,19creatingmovieclip,38earlierversionsofFlash,90importing,20subclassingdisplayobjects,40MultiAngleBouncedocumentclassbouncingoffmultipleangles,268MultiBilliarddocumentclassconservationofmomentumontwoaxis,299MultiBilliard2documentclassspritescollidingandstickingtogether,302MultiBounce3Ddocumentclassmultipleobjectbouncingin3Dsystems,387MultiCurve1documentclass,95MultiCurve2documentclass,97MultiCurve3documentclass,98multipleobjectcollisiondetection,238–244formula,245,517multiplicationmatrixmultiplication,476–480MultiSegmentDragdocumentclassdraggingwithmultiplesegments,354MultiSegmentReachdocumentclassreachingforthemouse,361MultiSpringdocumentclassspringingtomultipletargets,210Muybridge,Eadweard,10mxmlc/mxmlc.
exe/mxmlc.
jarcommand-linecompilers,24Nnamingconventionseventhandlers,34nestedobjectsreceivingmouseevents,174INDEX533nodegarden,313JaredTarbell'snodegarden,313springynodegarden,314–316NodeGardendocumentclass,314NodeGardenLinesdocumentclass,318nodesnodeswithconnections,317–318nodeswithmass,318–320springynodegarden,314–316NodesMassdocumentclass,318normaloftrianglesvectorsand3Dlighting,461Numbertype,ActionScript,85numbertypes,ActionScriptint,85uint,86OobjectorientedprogrammingseeOOPObjectHitTestdocumentclassboundingboxprincipleforcollisiondetection,226objectsbiaseddistributionof,497–501bouncing,159–164boundariesfor,148–164regeneratingobjects,155–156,169,515removingobjectsatboundaries,150–155,169,514screenwrapping,157–159,169,515circulardistributionof,494–496classesand,15collisiondetection,224–246multipleobjectcollisiondetection,238–244conservationofmomentum,277differencesbetweenobjectsinAS3,38displaylist,37–43DisplayObjectclass,38draggingmultipleobjects,177friction,164–169applyingcorrectly,165–167,170,515applyingtheeasyway,167,170,515applyingtospaceshipsimulation,168–169garbagecollector,151randomdistributionofobjects,492–501reachingforanobject,363–365receivingmouseevents,174squaredistributionof,492–494subclassingdisplayobjects,40–43visibilityofobjects,38OffsetSpringdocumentclass,214"on"events,31eventhandlernaming,34onChangemethodforwardkinematics,movingonesegment,328forwardkinematics,movingtwosegments,329onClipEvent,31onEnterFramemethodanimatingfilters,111applyingfrictioncorrectly,167applyingfrictiontheeasyway,167applyingfrictiontospaceshipsimulation,168chainingsprings,209combiningthrowingwithdragging,183creating,36distance-basedcollisiondetection,233,234handlernaminginAS3,34regeneratingobjects,156removingobjectsatboundaries,154shipcontrols,spaceshipsimulation,144smoothupanddownmotion,68springingtomultipletargets,212OneSegmentdocumentclassreachingforthemouse,357reachingwithonesegment,350OneSegmentDragdocumentclassreachingwithonesegment,352onKeyUpmethodshipcontrols,spaceshipsimulation,144onMouseDownmethodcombiningdraggingwithmotioncode,181,182combiningthrowingwithdragging,183draggingwithmouseMoveevent,178drawinglinesusinglineToandmoveTo,93onMouseMoveeventseemouseMoveeventonMouseMovemethoddraggingwithmouseMoveevent,178drawinglinesusinglineToandmoveTo,93onMouseUpmethodcombiningdraggingwithmotioncode,181,182draggingwithmouseMoveevent,178drawinglinesusinglineToandmoveTo,93onPresseventseemouseDowneventonPressmethod,212onReleaseeventseemouseUpeventonReleasemethod,212onReleaseOutsideevent,174onTimerevent,504onTimermethod,502OOPclasses,15–21makingpublicproperties,153particlesandobjects,306operators+=operator,28ANDbitwise(&),88INDEX534leftshift(>),88oppositesideterminologyrelatingtotriangles,57ORbitwiseoperator(|),87ORoperator(||)removingobjectsatboundaries,150Orbitdocumentclass,312OrbitDrawdocumentclass,313orbitingparticles/planets,312–313oscillationcosinewaves,73smoothupanddownmotion,67–69outofboundsseeboundariesoutputseetracingOvaldocumentclassellipticalmovement,74ovalsseeellipsesoverridekeyword,18overridingmethods,18Ppackages,16classesand,16importingclasses,17packagekeyword,16parentobjectsreparentingobjectsindisplaylist,39ParentBoxdocumentclasssubclassingdisplayobjects,41particles,306–307Brownian(random)motion,488–491collisiondetection,310–312description,306gravityandparticleattraction,307nodegarden,313nodeswithconnections,317–318nodeswithmass,318–320orbiting,312–313slingshoteffect,310springynodegarden,314–316Penner,Robert,200performancebitmapsdrawing,114perspective3Dlighting,458–4693Dsystemsand,376–382backfaceculling,452–455determiningclockwise/counterclockwise,453perspectiveformula,378–379,417,519perspectiveinActionScript,379–382vanishingpoint,380z-sorting(depthsorting),455–458Perspective1documentclass,379Perspective2documentclass,381pidegreesandradians,54pixelsmethodsforreading/changing,112pixelsperframe,122twips,196planetsorbiting,312–313PlayBalldocumentclasscollisionswhenreachingforanobject,366Pointclass,298,341,359Point3Ddocumentclasscreating3Dpointsandlines,425moving3Dsolids,447z-sorting(depthsorting),456PointHitTestdocumentclasscollisiondetectionbetweenspriteandpoint,230points3Dlineswithinvisiblepoints,425collisiondetectionbetweenspriteandpoint,230–231withshapeFlagparameter,231coordinaterotation,250–256creating3Dpointsandlines,422–428distancebetweentwopoints,76–79,81,513drawingcurvesthroughcontrolpoint,94–95drawingcurvesthroughpoints,117,514drawingmultiplecurveswithmidpoints,97matrixaddition,475modeling3Dspinningcube,439rotationformulas,80,512polygons,433backfaceculling,452creating3Dfillsusingtriangles,433–438determiningclockwise/counterclockwise,454exteriorside,453z-sorting(depthsorting),456positionaddingvelocitytoposition,145,514positionmethodreachingforthemouse,359prerenderedanimation,11privateaccessmodifiers,16privatekeyword,16programmedframes,10propertiesaccessmodifiers,16changingpropertiesusingvelocity,131classinheritance,18description,15INDEX535internalandprotectedaccessmodifiers,16makingpublicproperties,153MovieClipclassastemplate,19propertiesusingeasing,199–200simpleclassdefinition,16properties,listofalpha,199brightness,459charCode,46ENTER_FRAME,33filters,108,109fl,427graphics,90keyCode,46light,459lightMag,462mass,279mouseX/mouseY,45radius,152rotation,54stage,148–150stageHeight,340transform,105vx/vy,152proportionalaccelerationseespringingproportionalvelocityseeeasingprotectedaccessmodifiers,16protectedkeyword,16publicaccessmodifiers,16publickeyword,16Pulsedocumentclass,70pulsingmotion,70Pyramiddocumentclass,441pyramidsmodeling3Dpyramid,441–442PythagoreanTheorem,75–76distancebetweentwopoints,76–79Rradialfills,101radians,53–54conversionvaluetodegrees,53convertingbetweenradiansanddegrees,80,512usingdegreeswithradians,54radiuspropertyremovingobjectstoosoonatboundaries,152randomdistributionofobjects,492–501biaseddistribution,497–501circulardistribution,494–496squaredistribution,492–494randommotion,488–491randomnumbers,488Randomdocumentclasswaveswithtwoangles,70Random1documentclasssquaredistributionofdots,492Random2documentclass,493Random3documentclasscirculardistributionofdots,494Random4documentclass,496Random5documentclassbiaseddistributionofdots,497Random6documentclass,499Random7documentclass,500ratiosparameterbeginGradientFillmethod,102rayoflight.
comintro,10reachfunctionreachingforthemouse,359reaching(inversekinematics)description,350reachingforanobject,363–365collisionswhen,365–366reachingforthemouse,357–362reachingwithmultiplesegments,357–366reachingwithonesegment,350–351RealWalkdocumentclassrefiningwalkingprocess,338screenwrappingatboundaries,343Rectangleclasscheckingboundaries,264draggingwithstartDrag/stopDragmethods,179rectanglescollisiondetectionforboxes,228Removaldocumentclassremovingobjectsatboundaries,153removeChildmethodremovingobjectfromdisplaylist,39removingobjectsatboundaries,150removeEventListenermethod,34removingobjectsatboundaries,150renderingtechniques,83–117backfaceculling,452–455bitmaps,111–114colortransforms,105–107drawingAPI,89–104embeddingexternalassets,115–116filters,107–111loadingexternalassets,114renderingbeforedisplayingframes,27z-sorting(depthsorting),455–458reparentingobjectsindisplaylist,39repeatCountmethodtimer-basedanimation,503INDEX536resistanceseefrictionreversecoordinaterotation,261,272,518RGBcolor,84rightcursorkeyidentifyingifkeypressed,134,135rightshiftbitwiseoperator(>>)extractingcomponentcolorsusing,88righttriangledescription,52distancebetweentwopoints,77PythagoreanTheorem,76right-handcoordinatesystem,3Dsystems,376rotatefunctionconservationofmomentumontwoaxis,298Rotate1documentclass,250Rotate2documentclass,252Rotate3documentclass,254RotateToMousedocumentclassrotatingmovieclipstopointtomouse,63,65rotateXmethodcodingwithmatrices,478coordinaterotationin3Dsystems,411RotateXYdocumentclasscodingwithmatrices,478coordinaterotationin3Dsystems,412RotateYdocumentclasscoordinaterotationin3Dsystems,409rotateYmethodcodingwithmatrices,479coordinaterotationin3Dsystems,411rotation,63–66coordinaterotation,250–2563Dsystems,407–414easingappliedtorotation,200Flash'sdirectionofanglemeasurements,56rotatingavelocity,257rotatingmovieclipstopointtomouse,63–66trigonometricformulae,80,512usingdegreesandradians,54rotationproperty,spriteormovieclipseasingappliedtorotation,200rotatingmovieclipstopointtomouse,65rotationwithmatrices,482usingdegreesandradians,54rotationalvelocityapplyingfrictiontospaceshipsimulation,168shipcontrols,spaceshipsimulation,143vrnotationinthisbook,131RotationalVelocitydocumentclass,131rulesanimationusinglooping,29scriptedanimation,28usingrulestobuildframes,10SSameMassdocumentclasscollisionsbetweensamemassobjects,507scalingscalingwithmatrices,476–477settingupActionScript3.
0application,26Schoneveld,Stuart,256scope,AS3SWF,36screenrefreshes/updatesanimationusinglooping,29eventsand,36screenwrappingatboundaries,157–159,169,515walking,342–347screenX/screenYmethods,Point3Dclasscreating3Dpointsandlines,427determiningclockwise/counterclockwise,453moving3Dsolids,447scriptedanimation,27Segmentdocumentclassforwardkinematics,movingonesegment,325segmentsforwardkinematics,325automatingwalkingprocess,330–338buildingnaturalwalkcycle,332–334makingwalkcycledynamic,334–338movingonesegment,325–328movingtwosegments,328–330reducingsegmenttocreatespace,338refiningwalkingprocess,338–347inversekinematicsdragging,350draggingmultiplesegments,354–356draggingtwosegments,352–354draggingwithonesegment,352lawofcosines,367reaching,350reachingforanobject,363–365reachingforthemouse,357–362reachingwithmultiplesegments,357–366reachingwithonesegment,350–351setCentermethod,Point3Dclass3Dspinningletter,432creating3Dpointsandlines,427moving3Dsolids,447,449setChildIndexmethodz-sorting,391setPixel/setPixel32methods,112setTransformmethod,Colorclass,105setVanishingPointmethod,Point3Dclasscreating3Dpointsandlines,427shadowsusingdegreesandradians,54INDEX537shapeFlagparameter,hitTestPointmethodcollisiondetectionwith,231collisiondetectionwithout,230–231shapescreating3Dfills,432–438usingtriangles,433–438creatinggradientfillsusingbeginGradientFill,101creatingshapesusingbeginFillandendFill,100–101makingshapesin3Dspace,428–432Shipdocumentclass,140shipcontrols,142–144ShipSimdocumentclass,142ShipSim2documentclass,157ShipSimFrictiondocumentclass,168sinfunction,57–59angularacceleration,139circularmovement,73linearverticalmotion,69mousefollower,130pulsingmotion,70smoothupanddownmotion,67–69waveswithdrawingAPI,71waveswithtwoangles,70sineofangle,57–59basicformulae,80,512sinewaves,66–72illustrationof,66linearverticalmotion,69pulsingmotion,70smoothupanddownmotion,67–69valuesofsine,67waveswithdrawingAPI,71waveswithtwoangles,70SingleSegmentdocumentclass,327skewingwithmatrices,482SkewXdocumentclass,482Skinner,Grant,245slidersforcontrollingwalkcycle,335slingshoteffect,310snippetsuseofinitmethodwithcodesnippets,20solidsmodeling3Dsolids,438–447moving3Dsolids,447–449sortingz-sorting(depthsorting),455–458sound,integratingwithanimation,509–512Soundclass,509,510SoundEventsdocumentclass,509,510source-pathcommand-lineparametertracinginFlex2SDK,26spaceforobjectsseeboundariesSpaceshipdocumentclassextendingMovieCliporSpriteclasses,19spaceshipsimulation,140–144applyingfrictionto,168–169shipcontrols,142–144speedmagnitudeandvelocity,122pixelsperframe,122,124speedandvelocitycompared,122speedSliderslidersforcontrollingwalkcycle,335spinningcubemodeling3Dspinningcube,439–441SpinningEdocumentclass,432splicemethod,Arrayclassremovingobjectsatboundaries,150,154SprayPaintdocumentclass,112springfunctionnodeswithconnections,317nodeswithmass,319springynodegarden,316Spring1documentclass,202Spring2documentclass,203Spring3documentclass,203Spring3Ddocumentclass,405Spring4documentclass,205Spring5documentclass,205springing(proportionalacceleration),201–2183Dsystems,405–407addinggravity,205allowingforlengthofspring,213–215attachingmultipleobjectswithsprings,215–218chainingsprings,207–210collision-basedspringing,235–238determiningacceleration,201formulas,219,516makingspringvisible,205–207multipleobjectspringing,241–244offsettingthetarget,213–215,219,517one-dimensionalspringing,201–203proportionalmotion,190springingtowardamovingmouse,205springingtowardamovingtarget,205springingtomultipletargets,210–213two-dimensionalspringing,203–204springs,313–320gravitycompared,314nodeswithconnectors,317–318nodeswithmass,318–320springynodegarden,314–316springTofunctionattachingmultipleobjectswithsprings,215,217Spriteclassclassextending,19creatingandusingsprite,34,38description,19INDEX538importing,20rotatingmovieclipstopointtomouse,64subclassingdisplayobjects,40,41spritescollisiondetectionbetweenspriteandpoint,230–231betweentwosprites,225–229forirregularlyshapedsprites,232forverysmallsprites,232combiningthrowingwithdragging,183creating3Dpointsandlines,425documentclassextending,20draggingsprites,177–182combiningdraggingwithmotioncode,179–182mouseMoveevent,177–178startDrag/stopDragmethods,178–179easingandspringing,190easingtowardanotherspriteastarget,199easingtowardtarget,192forwardkinematics,movingonesegment,325graphicsproperty,90matrixmultiplication,476pressingandreleasing,174–177receivingmouseevents,174removingobjectsatboundaries,150skewingwithmatrices,483spritescollidingandstickingtogether,300–302squaredistribution,492–494Square3Ddocumentclassmodelingsquarein3Dspace,429squares3Dspinningsquare,430modelingsquarein3Dspace,428stagedraggingwithmouseMoveevent,177registeringmouseeventregardlessofpointerposition,175stagepropertysettingboundaries,148–150StageAlignclass,26stageHeightpropertyhandlingcollisionswithfloor,340StageScaleModeclass,26standardcoordinatesystem,55standardpositionputtingtheangleinstandardposition,59startDrag/stopDragmethodsdraggingsprites,178–179staticanimation,10stopDragmethodspringingtomultipletargets,212subclassesclassinheritance,18overridingmethods,18subclassingdisplayobjects,40–43superclassesclassinheritance,18swapChildrenmethod,391swapChildrenAtmethod,391swapDepthsmethod,391SWF(ShockwaveFlash)differencesbetweenobjectsin,38documentclass,20embeddingexternalassets,115–116eventarchitecture,32loadingexternalassets,114scope,36settingupActionScript3.
0application,21–26command-linecompiler,23–25Flash9IDE,21FlexBuilder2,22tracing,25SWFmetadatatag,25wrappingonz-axisin3Dsystems,396switchstatementaccelerationontwoaxes,137shipcontrols,spaceshipsimulation,142,144systemevents,31Ttanfunction,60tangentofangle,60basicformulae,80,512Tarbell,Jared,313targetCoordinateSpaceparametergetBoundsmethod,264targetseasingtowardmovingmouseastarget,198movinggraduallyclosertotarget,191offsettingtargetofspring,213–215springingtowardmovingmouse,205springingtowardmovingtarget,205springingtomultipletargets,210–213thighBaseSlider,335thighRangeSlider,335thirddimensionsystemswrappingonz-axis,395–403three-dimensionalsystems3Ddistanceformula,418,5193Dlighting,458–4693Dspinningletter,4323Dspinningsquare,430acceleration,382–384INDEX539backfaceculling,440,452–455bouncing,384–390multipleobjectbouncing,387–390singleobjectbouncing,384–387collisiondetection,414–417coordinaterotation,407–414formula,418,519withmatrices,477creating3Dfills,432–438usingtriangles,433–438creating3Dpointsandlines,422–428easing,403–405gravity,392–395left-handcoordinatesystem,377makingshapesin3Dspace,428–432modeling3Dcylinder,445–447modeling3Dletter,442–445modeling3Dpyramid,441–442modeling3Dsolids,438–447modeling3Dspinningcube,439–441modelingsquarein3Dspace,428moving3Dsolids,447–449perspectiveand,376–382perspectiveformula,378–379,417,519plottingpoints,430right-handcoordinatesystem,376springing,405–407velocity,382–384visualmodeling,436zaxis,376–377z-sorting(depthsorting),390–392,455–458throwingcombiningwithdragging,182–186Throwingdocumentclass,184thrustvariableshipcontrols,spaceshipsimulation,144time-basedanimation,4,505–507TimeBaseddocumentclass,505timelines,movieclipswithout,19timer-basedanimation,502–505Timerclass,502Timer1documentclass,502Timer2documentclass,503TimerEventclass,502,504totalforce,309tracefunctionconvertingbetweendecimalandhexcolorvalues,85tracingFlex2SDK,26FlexBuilder2,26settingupActionScript3.
0application,25XPanel,26trackVelocitymethodcombiningthrowingwithdragging,183transformpropertychangingcolorswithColorTransformclass,105,106codingwithmatrices,480transformscolortransforms,105–107translationmatrices,475transparency32-bitcolorand,85alphaparameter,lineStylemethod,91alphavelocity,131easingappliedtotransparency,199transparentparameterBitmapDataclass,111Treedocumentclasswrappingonz-axisin3Dsystems,396Treesdocumentclass,396Trees2documentclass,399Triangleclass3Dlighting,459creating3Dfillsusingtriangles,434,436determiningclockwise/counterclockwise,454finalcodefor,463–465getAdjustedColormethod,460getLightFactormethod,460modeling3Dcylinder,447z-sorting(depthsorting),456trianglesbackfaceculling,453creating3Dfills,433–438determiningclockwise/counterclockwise,453,454exteriorside,453modeling3Dspinningcube,439normaloftriangles,461PythagoreanTheorem,75–76righttriangle,52terminologyrelatingto,57trianglesarrayz-sorting(depthsorting),456,457Trianglesdocumentclass,437trigfunctions,57–63acosfunction,61asinfunction,61atanfunction,61–62atan2function,62–63cosfunction,59–60sinfunction,57–59tanfunction,60trigonometryangles,52–57arccosineofangle,61arcsineofangle,61arctangentofangle,61–63basicformulae,80,512convertingbetweenradiansanddegrees,80,512INDEX540cosineofangle,59–60description,52mathandtrigonometry,52PythagoreanTheorem,75–76rotation,63–66sineofangle,57–59tangentofangle,60trigfunctions,57–63waves,66–75cosinewaves,72–75sinewaves,66–72tweenedanimation,14twips,196TwoSegmentDragdocumentclass,353TwoSegmentReachdocumentclass,360TwoSegmentsdocumentclass,328TwoSegments2documentclass,330UuintnumbertypeActionScript,86storing32-bitcolor,86"undertheline"problembouncingoffanangle,265–267upanddownmotionsmoothupanddownmotion,67–69updateAfterEventtimer-basedanimation,504URLRequestclass,510Uro,Tinik,36userevents,31userinteraction,43–48keycodes,46–48keyboardevents,45–46mouseevents,43–45mouseposition,45Vvanishingpointmodelingsquarein3Dspace,429perspectiveinActionScript,380vectors3Dlighting,461conservationofmomentum,284crossproduct,461dotproduct,462momentum,277negativevelocity,123vectoraddition,128–129gravityasacceleration,138vectorsandvelocity,122bouncingoffanangle,257velocity,122–1323Dsystems,382–384accelerationand,132addingaccelerationtovelocity,145,514addingvelocitytoposition,145,514alphavelocity,131angularvelocity,126–130convertingtox,yvelocity,145,514mousefollower,129–130vectoraddition,128–129changingpropertiesusing,131conservationofmomentum,277description,122directionand,122easing(proportionalvelocity),190–200frictionaffecting,164–169applyingfrictioncorrectly,165–167,170,515applyingfrictiontheeasyway,167,170,515magnitudeandspeed,122matrixaddition,475momentumandmass,277negativevelocity,123,124proportionalvelocityseeeasingrotatingavelocity,257rotationalvelocity,131speedandvelocitycompared,122vectorsandvelocity,122vectoraddition,128–129velocityononeaxis,124–125velocityontwoaxes,126vxnotationinthisbook,124vynotationinthisbook,124xaxisvelocity,124yaxisvelocity,124Velocity1documentclass,125Velocity2documentclass,126Velocity3Ddocumentclass,382VelocityAngledocumentclass,127versions,ActionScript,14verticalmotion,linear,69visibilityofobjectsin3Dsystemsz-sorting,390–392visualmodelingthree-dimensionalsystems,436vr(rotationalvelocity)notationinthisbook,131shipcontrols,spaceshipsimulation,143vxnotationinthisbook,124vxpropertyapplyingfrictiontheeasyway,167regeneratingobjects,156removingobjectsatboundaries,152vynotationinthisbook,124INDEX541vypropertyapplyingfrictiontheeasyway,167regeneratingobjects,156removingobjectsatboundaries,152Wwalkmethodbuildingnaturalwalkcycle,333handlingcollisionswithfloorwhilewalking,341walkingforwardkinematics,330–347addinggravitytowalkingprocess,338–339automatingwalkingprocess,330–338buildingnaturalwalkcycle,332–334handlingcollisionswithfloorwhilewalking,339–342makingwalkcycledynamic,334–338reducingsegmenttocreatespace,338refiningwalkingprocess,338–347screenwrapping,342–347slidersforcontrollingwalkcycle,335Walking1documentclass,331Walking2documentclass,332Walking3documentclass,333Walking4documentclass,334Walking5documentclass,334wallsseeboundariesWave1documentclass,69waves,66–75seealsomotioncircularmovement,73–74cosinewaves,72–75ellipticalmovement,74–75linearverticalmotion,69pulsingmotion,70sinewaves,66–72smoothupanddownmotion,67–69trigonometricformulae,80,512waveswiththedrawingAPI,71waveswithtwoangles,70weightseemasswidthparameter,lineStylemethod,91windforceaccelerationand,139regeneratingobjects,156wrappingscreenwrappingatboundaries,157–159,169,515walking,342–347wrappingonz-axisin3Dsystems,395–403XXeno'sParadoxeasing(proportionalvelocity),195XPaneltracepanelchoice,26YYard,Todd,452Zzaxis,3Dsystems,376–377seealsothree-dimensionalsystemsz-sorting(depthsorting),455–4583Dsystems,390–392formula,418,519setChildIndexmethod,391swapChildrenmethod,391swapChildrenAtmethod,391swapDepthsmethod,391zerodividingbyzeroinFlash,381INDEX542
华纳云双11钜惠出海:CN2海外物理服务器终身价688元/月,香港/美国机房,免费送20G DDos防御,50M CN2或100M国际带宽可选,(文内附带测评)华纳云作为一家专业的全球数据中心基础服务提供商,总部在香港,拥有香港政府颁发的商业登记证明,APNIC 和 ARIN 会员单位。主营香港服务器、美国服务器、香港/美国OpenStack云服务器、香港高防物理服务器、美国高防服务器、香港高防I...
可以看到这次国庆萤光云搞了一个不错的折扣,香港CN2产品6.5折促销,还送50的国庆红包。萤光云是2002年创立的商家,本次国庆活动主推的是香港CN2优化的机器,其另外还有国内BGP和高防服务器。本次活动力度较大,CN2优化套餐低至20/月(需买三个月,用上折扣+代金券组合),有需求的可以看看。官方网站:https://www.lightnode.cn/地区CPU内存SSDIP带宽/流量价格备注购...
CloudCone 商家在以前的篇幅中也有多次介绍到,这个商家也蛮有意思的。以前一直只有洛杉矶MC机房,而且在功能上和Linode、DO、Vultr一样可以随时删除采用按时计费模式。但是,他们没有学到人家的精华部分,要这样的小时计费,一定要机房多才有优势,否则压根没有多大用途。这不最近CloudCone商家有点小变化,有新人洛杉矶优化线路,具体是什么优化的等会我测试看看线路。内存CPU硬盘流量价格...
attachmovie为你推荐
莫代尔和纯棉哪个好纯棉含莫代尔和100%莫代尔哪个好三国游戏哪个好玩三国游戏哪个最好玩手机音乐播放器哪个好手机音乐播放器什么的好?清理手机垃圾软件哪个好清理手机垃圾的软件哪个好yy空间登录怎样进入YY主播的空间dns服务器地址DNS服务地址网通dns服务器地址新乡网通DNS服务器地址是什么360云盘网页版登陆360云盘要求登录网页版是怎么回事360云查杀怎样使用360木马云查杀强生美瞳月抛强生美瞳日抛月抛和年抛有什么区别?分别多少钱?
如何注册中文域名 lamp安装 云网数据 enom 搬瓦工官网 128m内存 英语简历模板word 三拼域名 免费美国空间 多线空间 ebay注册 web应用服务器 七牛云存储 阿里云个人邮箱 hostease 服务器托管价格 SmartAXMT800 美国主机 apache启动失败 远程登录 更多