[Papervision3D] Need help from a Flash Developer
SJ
fernando_alfa_d at hotmail.com
Thu Jul 30 23:32:29 PDT 2009
Hi List, i need some help with Flash-AS3
I mainly do 3d modeling for living, so my knowledge about Flash and
actionscript is dreadful.
Anyway, i´m currently building my website and in the process i come across
with a dead end
with my current two-day-skills with Flash. The question is this, i´ve made a
FLA file, within it there is a movieclip which
contains a secuence of 72 images (a render of one of my models). My goal is
to have two buttons, one for advance the frames
and other one to move backwards. The code i put below just doesn´t work, if
any body can help me, advice me or charge me for do it it,
this is my email: fernando_alfa_d at hotmail.com. As a footnote, in this link
http://www.pixologic.com/turntable/ you can see a super advanced
version (as a local web developer refers to it when i contact him) of what
i´m talking about. I just need a version, doesn´t matter if it is like
Pixologics
or the one i was tryin to develop, it just have to be understandable for a
person that doesn´t eat AS3 every day. With a FLA file and one class i´m
done, i can put the images in the file by my self. I´ll be waiting for
replies. Thanks for reading.
::::::::::::::::::::::CODE::::::::::::::::
package {
import flash.display.MovieClip;
import flash.display.SimpleButton;
import flash.events.MouseEvent;
import flash.events.Event;
public class turn extends MovieClip {
public var _turnMC:MovieClip = new JeepWrangler(); //the image secuence
public var _btnDerecho:SimpleButton =new derBtn();
public var _btnIzquierdo:SimpleButton = new izqBtn();
public function turn() {
_turnMC.stop();
_btnDerecho.x=400;
_btnDerecho.y=350;
_btnIzquierdo.x=150;
_btnIzquierdo.y=350;
addChild(_turnMC);
addChild(_btnDerecho);
addChild(_btnIzquierdo);
_btnDerecho.addEventListener(MouseEvent.MOUSE_OVER, overDerHandler);
_btnDerecho.addEventListener(MouseEvent.MOUSE_DOWN, downDerHandler);
_btnIzquierdo.addEventListener(MouseEvent.MOUSE_OVER, overIzqHandler);
_btnIzquierdo.addEventListener(MouseEvent.MOUSE_DOWN, downIzqHandler);
}
public function overDerHandler(e:MouseEvent):void
{
_turnMC.addEventListener(Event.ENTER_FRAME, sigFrame);
}
public function downDerHandler(e:MouseEvent):void
{
_turnMC.addEventListener(Event.ENTER_FRAME, sigFrame);
}
public function overIzqHandler(e:MouseEvent):void
{
_turnMC.addEventListener(Event.ENTER_FRAME, antFrame);
}
public function downIzqHandler(e:MouseEvent):void
{
_turnMC.addEventListener(Event.ENTER_FRAME, antFrame);
}
public function sigFrame(e:Event):void
{
_turnMC.nextFrame();
}
public function antFrame(e:Event):void
{
_turnMC.prevFrame();
}
}
}
::::::::::::::::::::::CODE::::::::::::::::
More information about the Papervision3D
mailing list