In this chapter, we will go through the basic events and callbacks of CreateJS to make a drag-and-drop feature. After reading this chapter, you will be able to understand common events of objects in CreateJS and also how to change properties such as width or height. We will cover the following topics in this chapter:
All we need to do to create a drag-and-drop feature is to bind events to DisplayObject
on the Stage
object (such as a circle) and then change the x and y axes of the target object continuously as the mouse is moved. Fortunately, CreateJS provides many events on mouseover, and we can use them to achieve our goals.
In further sections, we will see how we can bind events to objects and get information from the mouse cursor. We will also see how to change the properties of an object or shape in the Stage
object.
18.118.253.198