Flash Player 6
The Makeover Magic object structure.
2.0Makeover Magic
Flash Player 6
Contains a single Fader object and its associated ColorFeature object(s).
Package containing a single Fader object and its associated ColorFeature object(s).
Flash Player 6
<P class='codeStyle'>myColorFeature = new ColorFeature();</P>
None.
An instance of the ColorFeature class.
The ColorFeature object is a group of associated movie clips to which color changes are applied using the onApply() method. For example, an instance of the ColorFeature object might control the coloring of all hair elements, applying a color transform to each hair movie clip to varying degrees.
<P class='codeStyle'>myColorFeature = new ColorFeature(); myColorFeature.addElement(_root.hair.layer1_mc,_root.hair.layer2_mc,_root.hair.layer3_mc);</P>
A group of associated movie clips to which color changes are applied.
Flash Player 6
<P class='codeStyle'>myColorFeature.elements</P>
Read only; do not modify the elements array except by using the addElement() and removeElement() methods.
<P class='codeStyle'> myFeature = new ColorFeature();<br> myFeature.addElement(_root.element1_mc); </P>
An array of movieclip elements associated with this feature.
Flash Player 6
<P class='codeStyle'> myColorFeature = new ColorFeature();<br> myColorFeature.addElement(_root.eyeball_mc); </P>
<b>obj</b> - An object to add to the elements array to be manipulated by the onApply method. An added object will typically have at least an <i>mc</i> property.
The index in the elements array of the newly added element.
Adds movieclip elements to the colorFeature object's elements array. The onApply() method will typically apply any received color transform objects to each element to varying degrees.
<P class='codeStyle'> obj1 = {mc: _root.element1_mc, applyPercentage: 80,} myFeature = new ColorFeature();<br> myFeature.onApply = function () { for (i=0;i<this.elements.length;i++) { this.elements[i].mc._alpha = this.elements[i].applyPercentage; } }; myFeature.addElement(obj1); </P>
Adds a movieclip element to this color feature.
Flash Player 6
<P class='codeStyle'>myColorFeature.apply([<i>colorObj</i>]);</P>
<b>colorObj</b> - an optional parameter defining a color transform object applied to the elements array. If no colorObj is passed, the current color, set by the onChangeColor() method, is applied.
Nothing.
Method; applies the colorObj transformation to the features elements (to whatever degree specified), and triggers the onUpdate event. The apply method is called from the onMouseDown handler (a private method) of the ColorFeature object.
<P class='codeStyle'>myColorFeature = new ColorFeature();<br> t = { ra: '50', rb: '244', ga: '40', gb: '112', ba: '12', bb: '90', aa: '40', ab: '70'}<br> myColorFeature.apply(t);</P>
Applies a provided color transform object to its elements.
Flash Player 6
<P class='codeStyle'>myColorFeature.disableMouseEvents();</P>
None.
Nothing.
Method; disables the object from receiving mouse events.
Disables the object from receiving mouse events.
Flash Player 6
<P class='codeStyle'>myColorFeature.enableMouseEvents();</P>
None.
Nothing.
Method; enables the object to receive mouse events.
Enables the object to receive mouse events.
Flash Player 6
<P class='codeStyle'>myColorFeature.onChangeColor(<i>colorObj</i>);</P>
<b>colorObj</b> - a color transform object to apply to the elements array.
Nothing.
Event Handler; receives the onChangeColor event from an associated Fader object. (By default, the onChangeColor method does not change any elements, it only reserves a color to be applied. Overload this method to change the elements as the slider is moved.)
<P class='codeStyle'>myColorFeature = new ColorFeature();<br> t = { ra: '50', rb: '244', ga: '40', gb: '112', ba: '12', bb: '90', aa: '40', ab: '70'}<br> myColorFeature.onChangeColor(t); myColorFeature.apply();</P>
Sets the current color to apply to the ColorFeature elements.
Flash Player 6.
<P class='codeStyle'> myColorFeature.removeElement(<i>obj</i>); </P>
<b>obj</b> - an object to remove from the elements array.
True if the object specified is found and removed; false if an error is encountered.
Removes a specified element from the elements array.
<P class='codeStyle'> myColorFeature.removeElement(_root.myMovie_mc); </P>
Removes an object to the listener array, disabling it from receiving events from this object.
Flash Player 6
<P class='codeStyle'>Component</P>
None.
Nothing.
Component; The Fader object incorporates graphical elements and pure data elements to create a gradient slider for color selection.
<P class='codeStyle'>skin0 = new FadePoint( 0, 255, 211, 173, 100); skin1 = new FadePoint(33.33, 240, 193, 168, 100); skin2 = new FadePoint(66.66, 218, 174, 149, 100); skin3 = new FadePoint( 100, 141, 102, 83, 100); myFader_mc.setGradient(skin0,skin1,skin2,skin3);</P>
Component; used to manipulate colors.
Flash Player 6
<P class='codeStyle'>myFader.points</P>
Read only; do not modify except by using the setGradient() method.
<P class='codeStyle'> gradient1 = new Gradient(); <p>myFader = new Fader(); <br>myFader.setGradient(gradient1); </P>
Points (color transform objects) that define the colors of this fader.
Flash Player 6
<P class='codeStyle'>myFader.getColorAt(<i>percent</i>);</P>
<b>percent</b> - a number between 0-100 representing a position on the associated gradient.
A color transform object with the values corresponding to the position in the gradient.
Method; returns a color transform object corresponding to the slider position specified using the percent argument. This does not set the slider position. (Use the setSliderPos() method.)
<P class='codeStyle'></P>
Retrieves a color from a point in the fader sliders range.
Flash Player 6
<P class='codeStyle'>myFader.getCurrentColor()</P>
None.
The currently selected color.
Method; retrieves the currently selected color.
The following example creates a new color feature and applies the currently selected color from the <span class='codeStyle'>myFader</span> object. <P class='codeStyle'>cF = new ColorFeature(); cF.apply(myFader.getCurrentColor());</P>
Retrieves the currently selected color.
Flash Player 6
<P class='codeStyle'>value = myFader.getSliderPos();</P>
None.
The current position of the slider within the associate movieclip (mc).
Method; retrieves the current position of the gradient slider in the associated movieclip.
<P class='codeStyle'> myFader = new Fader();<br> myFader.getSliderPos(); </P>
Retrieves the percentile position of the fader slider.
Flash Player 6
<P class='codeStyle'>myFader.setGradient(<i>point1 [, point2,..,pointN]</i>);</P>
<b>point1, point2,...,pointN</b> - a series of FadePoint objects used to define the color gradient associated with the Fader.
Nothing.
Method; sets the values of the points array equal to the points provided, which are then used in color calculations.
<P class='codeStyle'>skin0 = new FadePoint( 0, 255, 211, 173, 100); skin1 = new FadePoint(33.33, 240, 193, 168, 100); skin2 = new FadePoint(66.66, 218, 174, 149, 100); skin3 = new FadePoint( 100, 141, 102, 83, 100); myFader_mc.setGradient(skin0,skin1,skin2,skin3);</P>
Sets the gradient object used to define the Faders color spectrum.
Flash Player 6
<P class='codeStyle'>myFader.setSliderPos(<i>percent</i>);</P>
<b>percent</b> - a number between 0-100 representing a position on the associated gradient.
Nothing.
Method; sets the slider position of the Fader and triggers the onChangeColor event.
<P class='codeStyle'> gradient1 = new Gradient();<br> myFader = new Fader();<br> myFader.setGradient(gradient1);<br> myFader.setSliderPos(50);<br> </P>
Sets the slider position of the fader and triggers the onChangeColor event.
<P class='codeStyle'></P>
None.
Triggered by the setSliderPos() method; passes the color transform associated with the fader slider's current position.
<P class='codeStyle'></P>
Flash Player 6
<P class='codeStyle'><i>name</i> = new PaletteControl();</P>
None.
An instance of the PaletteControl class.
The Palette Control object is used within the Makeover application to control the active Faders and their associated ColorFeatures. The PaletteControl adds and removes the ColorControl to the active Fader object, and adds and removes the associated ColorFeatures to the ColorControl object.
<P class='codeStyle'>myPaletteControl = new PaletteControl();</P>
Palette Control object
Flash Player 6
<P class='codeStyle'>myPaletteControl.currentPalette</P>
Property (read only); the name of the currently active palette.
The currently active palette.
Flash Player 6
<P class='codeStyle'>myPaletteControl.palettes</P>
Property (read only); do not modify except using the addPalette() and removePalette() methods.
An array of palette objects which the PaletteControl acts on.
Flash Player 6
<P class='codeStyle'>myPaletteControl.addPalette(<i>name,Fader [, ColorFeature1, ColorFeature2...ColorFeatureN])</i>)</P>
<b>name</b> - A string defining the name of the Palette. <p><b>Fader</b> - A Fader object associated with the Palette used to manipulate the ColorControl object. <p><b>ColorFeature1, ColorFeature2...ColorFeatureN</b> - Any number of ColorFeature objects to be associated with the specified Fader.
True, if the Palette is added; false if an error is encountered.
Method; adds a Palette to the PaletteControl objects stored palettes. A Palette is a package consisting of at least three parameters passed: a name, a Fader, and at least one ColorFeature object.
<P class='codeStyle'> myFader1 = new Fader();<br> myFeature1 = new ColorFeature();<br> myPaletteControl = new PaletteControl();<br> myPaletteControl.addPalette("p1",myFader1,myFeature1); </P>
Adds the named palette to the PaletteControl object.
Flash Player 6
<P class='codeStyle'>myPaletteControl.clearPalettes();</P>
None.
Nothing.
Private Method; clears the current faders listener array and disable elements from receiving events.
Clears the current faders listener array and disable elements from receiving events.
Flash Player 6
<P class='codeStyle'>myPaletteControl.removePalette(<i>name</i>);</P>
<b>name</b> - the name parameter assigned to the palette when created using the addPalette() method.
true, if the named palette is found and removed; false if an error is encountered.
Removes the named palette from the palettes array of the PaletteControl object.
<P class='codeStyle'>myPaletteControl.removePalette("p1");</P>
Removes the named palette from the PaletteControl object.
Flash Player 6
<P class='codeStyle'>myPaletteControl.switchToPalette(<i>name</i>);</P>
<b>name</b> - the name of the palette to switch to, defined when created using the addPalette() method.
True if the palette exists, false if it does not.
Switches from the current palette to the named palette by: <p>-Removing the associated ColorControl object (myColorControl) from the old palette's Fader object's listeners array, and adding it to the new Fader object's listeners. <p>-Removing the old palette's ColorFeatures from the associated ColorControl object's listeners array, and adding to it the new palette's ColorFeatures.
<P class='codeStyle'> Fader1 = new Fader();<br> Feature1 = new ColorFeature();<br> myPaletteControl = new PaletteControl();<br> myPaletteControl.addPalette("p1",Fader1,Feature1);<br> myPaletteControl.switchToPalette("p1"); </P>
Switch to a different palette.
Flash Player 6
<P class='codeStyle'>myMakeover = new Makeover();</P>
None.
An instance of the Makeover class.
The Makeover class is the basic data model for the application. All viewstate information - including color feature properties and stamps - is saved in an instance of the Makeover object by the SaveControl object. No instantiation of a Makeover object is required as it is handled by the SaveControl object.
<P class='codeStyle'>myMakeover = new Makeover();</P>
The basic data model for the viewstate of the current makeover.
Flash Player 6
<P class='codeStyle'>myMakeover.colorFeatures</P>
Read-only; do not modify except by using the addFeature(), removeFeature(), and changeFeature() methods.
<P class='codeStyle'> myFeature = new ColorFeature();<br> myMakeover = new Makeover();<br> myMakeover.addFeature(myFeature); </P>
The ColorFeature objects associated with this instance of the Makeover object.
Flash Player 6
<P class='codeStyle'>myMakeover.addFeature(<i>ColorFeature,colorObject</i>0;</P>
<b>feature</b> - an instance of the ColorFeature object.<p> <b>colorObj</b> - a color transform object used to initialize that feature.
True if the feature is added; false if errors are encountered.
Method; adds instances of the ColorFeature object to the colorFeatures array, and associates a color transform with them.
<P class='codeStyle'> myFeature = new ColorFeature();<br> myMakeover = new Makeover();<br> myMakeover.addFeature(myFeature); </P>
Adds instances of the ColorFeature object to the colorFeatures array
Flash Player 6
<P class='codeStyle'>myMakeover.addStamp(mc1 [,mc2,...,mcN]);</P>
<b>mc1, mc2,...,mcN</b> - movieclips to be added to the makeover as a stamp.
Nothing.
Method; adds movieclips to the Makeover object's stamps array.
<P class='codeStyle'> myMakeover = new Makeover();<br> myMakeover.addStamp(_root.stamp_mc); </P>
Adds stamps to this instance of the Makeover object.
Flash Player 6
<P class='codeStyle'>myMakeover.duplicate()</P>
None.
An exact copy of this instance of the Makeover object.
Method; duplicates this instance of the Makeover object and returns it.
<P class='codeStyle'> myMakeover = new Makeover();<br> myNewMakeover = myMakeover.duplicate(); </P>
Duplicates this instance of the Makeover object and returns it.
Flash Player 6
<P class='codeStyle'>myMakeover.removeFeature(<i>feature</i>);</P>
<b>feature</b> - an instance of the ColorFeature object added using the addFeature() method.
True if the feature is removed; false if an error is encountered or the feature does not exist.
Method; removes instances of the ColorFeature object from the colorFeatures array
<P class='codeStyle'> myMakeover.removeFeature(myFeature); </P>
Removes instances of the ColorFeature object from the colorFeatures array
Flash Player 6
<P class='codeStyle'>myMakeover.removeStamp(<i>mc [, mc1, mc2...mcn]</i>);</P>
<b>mc</b> - a movieclip, added using the addStamp() method, to be removed from the Makeover object's stamps array.
True if the movieclip is removed; false if an error is encountered.
Method; removes a stamp, added using the addStamp() method, from the Makeover object's stamps array.
<P class='codeStyle'> myMakeover.removeStamp(_root.stamp_mc); </P>
Removes a stamp from this instance of the Makeover object.
The Fader defines the current color; the colorFeature waits for user input, then changes any elements accordingly.The paletteControl adds/removes the ColorFeatures associated with a Fader as listeners to that Fader.the colorFeatures array is 2-dimensional: 1d = ColorFeature obj, 2d = colorObj
Flash Player 6
<P class='codeStyle'>mySaveControl = new SaveControl();</P>
None.
An instance of the SaveControl class.
The SaveControl object detects any changes to any registered color feature as well as the addition or removal of stamps, and saves those in a new Makeover object, allowing for multiple undos.
<P class='codeStyle'>feature1 = new ColorFeature(); feature1.addElement(_root.hair.layer1_mc,_root.hair.layer2_mc,_root.hair.layer3_mc); feature2 = new ColorFeature(); feature2.addElement(_root.skin.layer1_mc,_root.skin.layer2_mc,_root.skin.layer3_mc); mySaveControl = new SaveControl(); mySaveControl.addListener(feature1,feature2);</P>
Detects changes to associated ColorFeatures and saves them.
Flash Player 6
<P class='codeStyle'>mySaveControl.currentIndex</P>
Property (read only); do not modify except via the redo() and undo() methods. The currentIndex can be retrieved using the getCurrentIndex() method.
Flash Player 6
<P class='codeStyle'>mySaveControl.saves</P>
Read-only; do not modify. The applyCurrent() and revert() methods access and modify this array.
<P class='codeStyle'>mySaveControl.applyCurrent();</P>
An array of Makeover objects representing the saved states of the Makeover.
Flash Player 6
<P class='codeStyle'>mySaveControl.applyCurrent();</P>
<b>mc</b> - a master movieclip to which the most recently saved makeover is applied.
True if the mc exists; false if it does not.
Method; applies the most recently saved makeover to a movieclip containing all the makeover's color features
<P class='codeStyle'>mySaveControl.applyCurrent();</P>
Applies the most recently saved makeover to a movieclip containing all the makeover's color features.
Flash Player 6
<P class='codeStyle'>mySaveControl.getCurrentIndex();</P>
None.
A number representing an index in the saves array.
Method; retrieves the index of the most recently saved Makeover from the saves array.
The following example reverts to the last saved Makeover state. <P class='codeStyle'>mySaveControl.undo(mySaveControl.getCurrentIndex() - 1);</P>
Retrieves the index of the most recently saved Makeover from the saves array.
Flash Player 6
<P class='codeStyle'>mySaveControl.onUpdate(<i>feature</i>);</P>
<b>feature</b> - an instance of the ColorFeature object.
Nothing.
Event Handler; creates a new Makeover object with the updated feature and saves it in the saves array, and calls the applyCurrent() method.
<P class='codeStyle'> myFeature = new ColorFeature();<br> mySaveControl.onUpdate(myFeature); </P>
Event handler for ColorFeature updates; saves the new Makeover.
Flash Player 6
<P class='codeStyle'>mySaveControl.redo(<i>index</i>);</P>
<b>index</b> - the index of the Makeover object in the saves array to apply.
True if a Makeover object exists at the specified index; false if one does not.
Method; applies the Makeover in the saves array specified by the index.
<P class='codeStyle'>mySaveControl.redo(mySaveControl.getCurrentIndex + 1);</P>
Applies the Makeover in the saves array specified by the index.
Flash Player 6
<P class='codeStyle'>mySaveControl.setInitialMakeover(<i>makeoverObj</i>);</P>
<b>makeoverObj</b> - an instance of the Makeover class.
Nothing.
Method; Sets the initial makeover object model. All subsequent saves are built off of this initial model.
The following example creates a new (simple) Makeover object and sets it as the initial model for the saveControl: <P class='codeStyle'>defaultTransform = {ra: 100, rb: 0, ga: 100, gb: 0, ba: 100, bb: 0, aa: 100, ab: 255}; cF1 = new ColorFeature(); &nbsp; &nbsp; cF1.addElement(_root.movie1_mc); &nbsp; &nbsp; cF1.addElement(_root.movie2_mc); cF2 = new ColorFeature(); &nbsp; &nbsp; cF1.addElement(_root.movie3_mc); mainMakeover = new Makeover(); mainMakeover.addFeature(cF1,defaultTransform); mainMakeover.addFeature(cF2,defaultTransform); mySaveControl = new SaveControl(); mySaveControl.setInitialMakeover(mainMakeover);</P>
Sets the initial makeover object model.
Flash Player 6
<P class='codeStyle'>mySaveControl.undo(<i>index</i>);</P>
<b>index</b> - The index (in the saves array) to revert to.
True if a Makeover object exists at the specified index; false if one does not.
Method; reverts to the Makeover in the saves array specified by the index.
<P class='codeStyle'>mySaveControl.undo(mySaveControl.getCurrentIndex() - 1);</P>
Reverts to the specified index.
The undo() method updates all listener elements' colors within a saved Makeover object. The onUpdate() method adds the current Makeover to the saves array, duplicates it, and changes it's data
Flash Player 6
<P class='codeStyle'>myStamper = new Stamper();</P>
None.
An instance of the Stamper class.
The Stamper creates and tracks stamp objects and their impressions. A "stamp" is the physical object used by the user to create the "impressions".
<P class='codeStyle'>myStamper = new Stamper(); myStamper.addStamps(_root.stamp1_mc,_root.stamp2_mc);</P>
Creates and tracks stamp objects and their impressions.
Flash Player 6
<P class='codeStyle'>myStamper.impressions</P>
Read-Only Property; do not modify directly. The stamp() method adds elements to the impressions array.
Array used to store all stamped objects.
Flash Player 6
<P class='codeStyle'>myStamper.stampCount</P>
Read-Only Property; a number representing the number of stamps created.
A number representing the number of stamps created.
Flash Player 6
<P class='codeStyle'>myStamper.stamps</P>
Read-Only Property; stores all of the stampers available to the user.
Stores all of the stampers available to the user.
Flash Player 6
<P class='codeStyle'>myStamper.addStamps(<i>stamp1 [, stamp2, stamp3...stampN]</i>);</P>
<b>stamp1</b> - An instance of the Stamp object to add to the Stamper control. <b>stamp2,stamp3...stampN</b> - Additional Stamp objects.
True if the stamp(s) are added; false if an error is encountered.
Method; adds new stamps to the Stamper object.
<P class='codeStyle'>myStamper = new Stamper(); stamp1 = new Stamp(_root.stamp1_mc,"stamp1"); stamp2 = new Stamp(_root.stamp2_mc,"stamp2"); myStamper.addStamps(stamp1,stamp2);</P>
Adds new stamps to the Stamper object.
Flash Player 6
<P class='codeStyle'>Private Method</P>
None.
Nothing.
Method; overload this method to extend the Stamper's capabilities.
<P class='codeStyle'>myStamper = new Stamper(); myStamper.onPickUp = function () { trace("stamp has been picked up!"); }</P>
Event handler triggered whenever a stamp is picked up.
Flash Player 6
<P class='codeStyle'>Private Method</P>
None.
Nothing.
Method; overload this method to extend the Stamper's capabilities.
<P class='codeStyle'>myStamper = new Stamper(); myStamper.onSetDown = function () { trace("the stamp was set down."); }</P>
Event handler triggered whenever a stamp is set down.
Flash Player 6
<P class='codeStyle'>Private Method</P>
None.
Nothing.
Method; overload this method to extend the Stamper's capabilities.
<P class='codeStyle'>myStamper = new Stamper(); myStamper.onStamp = function () { trace("A stamp is born."); };</P>
Event handler triggered whenever a stamp is stamped.
Flash Player 6
<P class='codeStyle'>Private Method</P>
None.
Nothing.
Method; sets the dragging property to true. Overload this method to extend the Stamper's capabilities.
<P class='codeStyle'>myStamper = new Stamper(); myStamper.onStartDrag = function () { trace("dragging a stamp..."); };</P>
Event handler triggered whenever a stamp starts dragging.
Flash Player 6
<P class='codeStyle'>Private Method</P>
None.
Nothing.
Method; sets the dragging property to false. Overload this method to extend the Stamper's capabilities.
<P class='codeStyle'>myStamper = new Stamper(); myStamper.onStopDrag = function () { trace("done dragging this stamp."); };</P>
Event handler triggered whenever a stamp is no longer being dragged.
Flash Player 6
<P class='codeStyle'>myStamper.removeStamps(<i>stamp1 [, stamp2, stamp3...stampN]</i>);</P>
<b>stamp1</b> - An instance of the Stamp object to remove from the Stamper control. <b>stamp2,stamp3...stampN</b> - Additional Stamp objects.
True if the stamp(s) are removed; false if an error is encountered.
Method; removes stampers from the Stamper object.
<P class='codeStyle'>myStamper.removeStamps(stamp1,stamp2);</P>
Removes stamps from the Stamper object.
Flash Player 6
<P class='codeStyle'>Private Method</P>
None.
Nothing.
Private Method; creates an impression of the currently selected stamp.
Creates an impression of the currently selected stamp.
Flash Player 6
<P class='codeStyle'>stamp1 = new Stamp(_root.stamp1_mc,"stamp1");</P>
<b>id</b> - the identifier of the library element to be used as the stamp's impression. <b>mc</b> - the movieclip to be used as the stamp.
An instance of the Stamp class.
Object; a simple container for the movieclip and library element to be used in stamping.
<P class='codeStyle'>stamp1 = new Stamp(_root.stamp1_mc,"stamp1");</P>
The movieclip and library element to be used in stamping.
Flash Player 6
<P class='codeStyle'>Read-Only Property</P>
Property; the identifier of the library element to be used as the stamp's impression.
The identifier of the library element to be used as the stamps impression.
Flash Player 6
<P class='codeStyle'>Read-Only Property</P>
Property; the movieclip to be used as the stamp.
The movieclip to be used as the stamp.
Flash Player 6
<P class='codeStyle'>myFadepoint = new FadePoint(<i>pos,r,g,b</i>);</P>
<b>pos</b> - the position (0-100) in the gradient spectrum on which the point exists. <b>r</b> - a number 0-255 representing the red value of the FadePoint's color. <b>g</b> - a number 0-255 representing the green value of the FadePoint's color. <b>b</b> - a number 0-255 representing the blue value of the FadePoint's color.
An instance of the FadePoint class.
The FadePoint object stores information for a single point on a gradient spectrum, including the point's RGB values and the position of the point on the spectrum.
The following code creates a new gradient array (an array composed of FadePoint objects), and utilizes that gradient in a new Fader object. <P class='codeStyle'>red = new FadePoint(0,255,0,0); green = new FadePoint(50,0,255,0); blue = new FadePoint(100,0,0,255); rgbGradient = [red,green,blue]; myFader = new Fader(_root.fader_mc,rgbGradient);</P>
Stores all necessary information for a single point on a gradient spectrum.
Flash Player 6
<P class='codeStyle'>myPoint.aa</P>
Property; a number 0-100 representing the alpha percentage of the FadePoint's color.
<P class='codeStyle'></P>
A number 0-100 representing the alpha percentage of the FadePoint color.
Flash Player 6
<P class='codeStyle'>myPoint.bb</P>
Property; a number 0-255 representing the blue value of the FadePoint's color.
A number 0-255 representing the blue value of the FadePoint color.
Flash Player 6
<P class='codeStyle'>myPoint.gb</P>
Property; a number 0-255 representing the green value of the FadePoint's color.
A number 0-255 representing the green value of the FadePoint color.
Flash Player 6
<P class='codeStyle'>myPoint.pos</P>
Property; the position (0-100) in the gradient spectrum on which the point exists.
The position (0-100) in the gradient spectrum on which the point exists.
Flash Player 6
<P class='codeStyle'>myPoint.rb</P>
Property; a number 0-255 representing the red value of the FadePoint's color.
A number 0-255 representing the red value of the FadePoint color.
Flash Player 6
<P class='codeStyle'>EventBroadcaster.initialize(<i>obj</i>);</P>
None.
An instance of the EventBroadcaster class.
The Event Broadcaster enables any object to broadcast events by adding three methods to the object: broadcastMessage(), addListener(), and removeListener(). It also endows the object with a listeners array.
<P class='codeStyle'>#include "EventBroadcaster.as" myObj = new Object(); EventBroadcaster.init(myObj);</P>
Event Broadcaster enables any object to broadcast events.
Flash Player 6
<P class='codeStyle'>EventBroadcaster.initialize(<i>obj</i>);</P>
<b>obj</b> - Any object. (Object)
Nothing.
Method; adds the EventBroadcaster methods (addListener(), broadcastMessage(), and removeListener()) and properties (the listeners array) to an object.
<P class='codeStyle'>#include "EventBroadcaster.as" myObj = new Object(); EventBroadcaster.init(myObj);</P>
Adds the Eventbroadcaster methods to an object.
Flash Player 6
<P class='codeStyle'><i>myObject</i>.addListener(<i>obj</i>);</P>
<b>obj</b> - An object to receive events broadcast by the object to which this method is added.
True if the object is added successfully; false if errors are encountered.
Private Method - do not invoke directly. This method is added to an object (using the initialize() method) enabling it to add its own listener objects.
<P class='codeStyle'>master = new Object(); slave = new Object(); EventBroadcaster.initialize(master); master.addListener(slave);</P>
Method added to an object enabling it to add listener objects.
Flash Player 6
<P class='codeStyle'><i>myObject</i>.broadcastMessage(<i>event,args</i>);</P>
<b>event</b> - The event name. (String) <b>args</b> - An argument (or series of arguments) to pass to the event handler. (Object)
Nothing.
Private Method - do not invoke directly. This method is added to an object (using the initialize() method) enabling it to add its broadcast events to its listener objects.
<P class='codeStyle'>master = new Object(); slave = new Object(); EventBroadcaster.initialize(master); master.addListener(slave); master.broadcastMessage("onClick",Mouse.x,Mouse.y);</P>
Method added to an object enabling it to broadcast events to listener objects.
Flash Player 6
<P class='codeStyle'><i>myObject</i>.clearListeners();</P>
None.
Nothing.
Method; clears all listeners from an object.
<P class='codeStyle'>myBroadcaster.clearListeners();</P>
Clears all listeners from an object.
Flash Player 6
<P class='codeStyle'><i>myObject</i>.removeListener(<i>obj</i>);</P>
<b>obj</b> - An object added using the addListener method. (Object)
True if the object is removed; false if it is not found.
Private Method - do not invoke directly. This method is added to an object (using the initialize() method) enabling it to remove listener objects.
<P class='codeStyle'>master = new Object(); slave = new Object(); EventBroadcaster.initialize(master); // add the listener master.addListener(slave); // now remove it master.removeListener(slave); </P>
Method added to an object enabling it to remove listener objects.