strjela
09-25-2007, 10:33 PM
Why does this code fail :
<mx:Script>
<![CDATA[
import mx.effects.Tween;
import mx.effects.easing.*;
[B]private var matrix:Matrix=new Matrix(0.8,0.05,1,0.8,0.0,0.0);
.....
<mx:states>
<mx:State name="One">
<mx:SetProperty target="{myImage.transform.matrix}" value="{matrix}" />
</mx:State>
.....
<mx:Image id="myImagel" source="001.jpg" x="{geStagePos()}" y="0"> </mx:Image>
<mx:Button label="1" click="currentState='One'" />
Error:
ReferenceError: Error #1069: Property null not found on flash.geom.Matrix and there is no default value.
at mx.states::SetProperty/apply()
at mx.core::UIComponent/::applyState()
at mx.core::UIComponent/::commitCurrentState()
at mx.core::UIComponent/setCurrentState()
at mx.core::UIComponent/set currentState()
at aaa/___Button1_click()
IF this is wrong way to do it, what is correct matrix transform of image in state?
<mx:Script>
<![CDATA[
import mx.effects.Tween;
import mx.effects.easing.*;
[B]private var matrix:Matrix=new Matrix(0.8,0.05,1,0.8,0.0,0.0);
.....
<mx:states>
<mx:State name="One">
<mx:SetProperty target="{myImage.transform.matrix}" value="{matrix}" />
</mx:State>
.....
<mx:Image id="myImagel" source="001.jpg" x="{geStagePos()}" y="0"> </mx:Image>
<mx:Button label="1" click="currentState='One'" />
Error:
ReferenceError: Error #1069: Property null not found on flash.geom.Matrix and there is no default value.
at mx.states::SetProperty/apply()
at mx.core::UIComponent/::applyState()
at mx.core::UIComponent/::commitCurrentState()
at mx.core::UIComponent/setCurrentState()
at mx.core::UIComponent/set currentState()
at aaa/___Button1_click()
IF this is wrong way to do it, what is correct matrix transform of image in state?