Creative COW SIGN IN :: SPONSORS :: ADVERTISING :: ABOUT US :: CONTACT US :: FAQ
Creative COW's LinkedIn GroupCreative COW's Facebook PageCreative COW on TwitterCreative COW's Google+ PageCreative COW on YouTube
ADOBE FLASH:HomeFlash ForumFlash TutorialsFlash Video TutorialsWeb Streaming ForumAdobe FlashPodcast

[flash CS3, AS2] Script needed for scrubing through time line with mouse drag

COW Forums : Adobe Flash

FAQ   •   VIEW ALL   •   ADD A NEW POST   •   PRINT
Share on Facebook
Respond to this post   •   Return to posts index   •   Read entire thread


catherine sulzmann[flash CS3, AS2] Script needed for scrubing through time line with mouse drag
by on Jun 14, 2012 at 10:46:03 am

Hello,
(Just need to note that I am a total beginner at action scrip so forgive me if I make no sense at all)
I'm trying to recreate the effect in the link below, where a viewer can mouse click on the object and rotate it through the x axis with a mouse drag.

http://bmc.erin.utoronto.ca/~enid/interactivethyroidectomy/

I've managed to put something together through reading many other forums and its working generally OK - but the I need to make the mouse more sensitive (at the moment to turn -x (left) I have to click and drag practically off the window before it even starts turning). (is this something to do with the registration points?)
Also I need to figure out how, if I mouse click and drag to the last frame that it will start again at the first frame. I assume I have to leave a blank frame at the start of the time line and say
Go To "start"
Then call the actual starting frame of my animation "next"
Then call the last frame "start"
and write underneath
Go To "next"
Or something like that - but that didn't work so I'm not sure how to do it.

Basically this is where I've got up to.
I made a movie clip and in the movie clip are 400 images of a complete 360 degree view of the bones of the shoulder I rendered out of Maya.

I created a button (its invisible when testing the movie) on the layer above my movieclip and inserted this code:

on(press){

Dragg=true

}



on(release,releaseOutside){

Dragg=false;

}



on(press){

Dragg=true

}



on(release,releaseOutside){

Dragg=false;

}

Then back on scene 1 I've put this code on top of the movie clip

onClipEvent(load){

gotoAndStop(1)

}

onClipEvent(enterFrame){

if ( Dragg==true){

if (_root._xmouse > _x){nextFrame()}

else if (_root._xmouse < _x){prevFrame()}

else {

if ( _currentFrame<30){nextFrame()}

if ( _currentFrame>30){prevFrame()}

}



}

}

So that's it - but it needs refining. Better mouse movement and to make it go back to frame one when it comes to frame 400.
I'd really appreciate any help I can get.
Thank you very much in advance
Catherine


Posts IndexRead Thread
Reply   Like  
Share on Facebook


Current Message Thread:




LOGIN TO REPLY



FORUMSTUTORIALSFEATURESVIDEOSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

Creative COW LinkedIn Group Creative COW Facebook Page Creative COW on Twitter
© 2014 CreativeCOW.net All rights are reserved. - Privacy Policy

[Top]