PDA

View Full Version : Where are these properties from?


nmduc073
11-30-2007, 04:41 AM
I have read the example source code from http://download.macromedia.com/pub/labs/flex/3/featuresamples/configurator_beta2.zip.

When I read these code, there are some properties that I don't know where they are from.

this.colar.transform.colorTransform = colorInfo;

this.highlight.transform.colorTransform = colorInfo;

this.highlight_sash.transform.colorTransform = colorInfo;

Please help me.

package com.adobesamples.controls {

import mx.flash.UIMovieClip;
import flash.events.Event;
import flash.display.MovieClip;

interface IShirtView {

function set baseColor(i_color:Number):void;

function get baseColor():Number;

function set trimColor(i_color:Number):void;

function get trimColor():Number;

function set type(i_type:String):void;

function get type():String;

}
}

package com.adobesamples.controls {

import flash.events.Event;
import flash.display.MovieClip;
import com.adobesamples.controls.*;
import mx.flash.UIMovieClip;
import flash.display.Sprite;
import flash.display.GradientType;
import flash.geom.ColorTransform;
import fl.motion.Color;

public class Shirt1Front extends UIMovieClip implements IShirtView {

private var __type:String;

public function Shirt1Front() {

}

public function set baseColor(i_color:Number):void{

// Set the color of the ColorTransform object.
var colorInfo = new ColorTransform();
colorInfo.color = i_color;
// apply the change to the display object
this.base.transform.colorTransform = colorInfo;
this.colar.transform.colorTransform = colorInfo;

}

public function get baseColor():Number{
return this.base.transform.colorTransform.color;
}

public function set trimColor(i_color:Number):void{

// Set the color of the ColorTransform object.
var colorInfo = new ColorTransform();
colorInfo.color = i_color;
// apply the change to the display object
this.highlight.transform.colorTransform = colorInfo;
this.highlight_sash.transform.colorTransform = colorInfo;


}

public function get trimColor():Number{
return this.highlight.transform.colorTransform.color;
}

public function set type(i_type:String):void{
__type = i_type;
}

public function get type():String{
return __type;
}

/* override public function setActualSize(newWidth:Number, newHeight:Number):void {

trace("FRONT : WIDTH : "+_width+" : "+newWidth+" : HEIGHT : "+_height+" : "+newHeight);

if (newWidth != _width || newHeight != _height) {

_width = newWidth;
_height = newHeight;
trace("FRONT : WIDTH : "+_width+" : HEIGHT : "+_height);
}

}*/
}
}

dr_zeus
11-30-2007, 07:05 PM
I assume that there's a FLA file in that download where a library symbol defines these items on stage.

nmduc073
12-01-2007, 03:32 AM
Yes, there is fla file. But I am not sure it has what you talked.
Man, the configurator example is so complex to understand it. T_T