Tengo problemas para asignarle valores a la function onMove(), desde otra function... no me toma los valores..!!
Código PHP:
package {
import flash.display.MovieClip;
import flash.events.Event;
import flash.events.MouseEvent;
public class RolloverTestScale extends MovieClip {
private static var UP_COLOR:uint = 0xFF0000;
private static var ROLLOVER_COLOR:uint = 0x0000FF;
public var VALCONST:int= 800;
public var valu:int= 1;
public var velocidad:Number = 1.7;
public var friccion:Number = 0.009;
public var speed:int= 4;
public var speedd:int;
private var _square:MovieClip;
public function RolloverTestScale() {
_square = new MovieClip();
drawSquare(UP_COLOR);
addChild(_square);
_square.addEventListener(Event.ENTER_FRAME, onMove);
_square.addEventListener(MouseEvent.ROLL_OVER, onSquareRollOver);
_square.addEventListener(MouseEvent.ROLL_OUT, onSquareRollOut);
}
private function drawSquare(color:uint):void {
_square.graphics.clear();
_square.graphics.lineStyle(2, 0x000000);
_square.graphics.beginFill(color);
_square.graphics.drawRect(-50,-50,100,100);
_square.graphics.endFill();
_square.x = 450;
_square.y = 450;
}
private function onSquareRollOver(event:MouseEvent):void {
onMove(4.5);// de esta manera no funciona ..!! porke..??
}
private function onSquareRollOut(event:MouseEvent):void {
valu = 1; //de esta manera funciona.. pero no es la idea
onMove(valu);
}
public function onMove(valuu:uint):void{
_square.scaleY = _square.scaleX += speedd = speedd * friccion +((valuu - _square.scaleX) * velocidad );
}
}
}
Si alguien tiene alguna idea ..por lo mas minima ke sea ..es bienvenida..
Saludos