• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 6. STEP 6: ActionScript with Net... > NetConnection() Methods, Properties,...

NetConnection() Methods, Properties, and Events

If you are not familiar with programming, it is important to understand that every object has three components. Object methods (or behaviors) are internal functions that affect the property (or characteristic) of an object. For example, in a movieClip, the method .gotoAndPlay() affects the MovieClip property _currentFrame. Properties (or characteristics) are variables that contain values describing an object. For example, a MovieClip on the Flash stage has _x and _y properties. The values of _x and _y are numbers representing the x and y position of the MovieClip. Most properties can read or be written to. For example, a MovieClip can be repositioned by changing the value of the _x and _y properties. Some properties are read-only, such as the _currentFrame property.

Events act as listeners that respond to actions or inputs affecting the object. For example, when you move your mouse over a button, you trigger an onMouseOver event. Events must be overwritten. That means no default (prototype) actions are associated with an event. You are responsible for creating event actions by overwriting the default event handler. Consider the onMouseOver event. You can script a sound effect to play when the user rolls over the button triggering the onMouseOver event. The NetConnection() methods are as follows:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint