-
trying to drag to nextFrame/prevFrame and increase speed
Hi Guys,
Im new here, i would search for what i am about to ask but im not sure exactly what to search for to find it, i've googled it every way i can think of but cant find anything.
Basically i am trying to make a 360 degree product viewer, i have 100 frames each with a serperate image on them, and a button to advance the frames and a button to rewind them which works great.
However i want to be able to click and drag to rotate the product left and right (and if possible increase the speed the further you drag) by cycling through the frames in the same way the buttons do.
But i can't seem to work out how to do this. I used flash quite a bit a years ago in as2 and have only recently tried to pick it up again and finding as3 is very different.
any help anybody could offer would be greatly appreciated.
thanks in advance
Rich
-
Dignitary
Say the movie is 1000px wide and you have 100 separate pictures going from frame 1 to frame 100 in a nested movieClip named "clip".
PHP Code:
stage.addeventListener(Event.ENTER_FRAME, 3DPan);
function 3DPan(e:Event):void{
var temp:Number = Math.ceil(mouseX/10);
clip.gotoAndStop(temp);
}
Last edited by rynoe; 05-14-2012 at 09:10 AM.
Reason: Eye fell out.
[SIGPIC][/SIGPIC]
-
Originally Posted by rynoe
Say the movie is 1000px wide and you have 100 separate pictures going from frame 1 to frame 100 in a nested movieClip named "clip".
PHP Code:
stage.addeventListener(Event.ENTER_FRAME, 3DPan);
function 3DPan(e:Event):void{
var temp:Number = Math.ceil(mouseX/10);
clip.gotoAndStop(temp);
}
Brilliant, thank you i was able to take what you showed me here and develop it into nearly exactly what i was looking for.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|