Now that the user can acquire the tool needed to interact with other objects, we need to write a little code to detect and handle these interactions. We’ll also, most importantly, write the logic that allows the user to complete the interaction.
- Now that the user can acquire the tool…needed to interact with other objects,…we need to write a little code…to detect and handle these interactions.…We'll also, most importantly,…write the logic that allows the user…to complete the interaction.…Let's go down to where we're swinging the axe,…and, within the swing axe function,…I'm gonna paste in a big code snippet.…So, there are a number of pieces to this snippet.…Here's the first one.…
For each of these, we're going to check…global to local so that we can translate…the global coordinates of our axe…and our mouse cursor…to segment three's coordinate system.…Here, we're gonna check and see jar1.…We want to test and see if…the axe is going to hit jar1.…So what we do is, we say…jar1 global to local…and then we pass in the stage.mouseX and mouseY…to see if these actually overlap.…
To test and see if they do overlap,…we use a hit test.…Hit test is a function inside of CreateJS that we can use.…So we say, if segment03…jar1 hitTest,…and then we test against these interpreted coordinates,…
- Implementing desktop and mobile interactions
- Designing an animated web banner
- Creating titles
- Programming the banner
- Publishing the banner
- Designing, programming, and publishing an interactive animation
- Importing visuals and audio
- Integrating Animate animations into a responsive HTML website
Skill Level Intermediate
Learning 2D Animation Principleswith Dermot O' Connor2h 25m Beginner
Adobe Animate CC for Web Designerswith Paul Trani1h 21m Beginner
2D Animation: Walk Cycles Basicswith Dermot O' Connor57m 24s Intermediate
1. Desktop and Mobile Interaction
2. Design an Animated Web Banner
3. Program the Animated Web Banner
4. Design an Interactive Animation
Import visuals and audio2m 52s
5. Program the Interactive Animation
6. Website Integration
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.