Re: [Flashcoders] Click drag to control a MC?
Thanks Zeh! I understand the concept of what you're saying to do, but don't understand how to apply it. Right now I'm doing this: onClipEvent (enterFrame) { framePos = int(_xmouse / 200 *( _parent._totalframes)); if (framePos0) { _parent.gotoAndStop(_parent._totalframes + ((framePos + 1) % _parent._totalframes)); } else { _parent.gotoAndStop(1 + (framePos % _parent._totalframes)); } } I thought I could change my clip event to an onPress event, but that doesn't work at all. Right now this code is on the MC itself. Thanks for the help! Paul When the user clicks the area, you save the main stage _xmouse to any other auxiliary variable. Then, when the user moves the mouse, if you subtract the saved/original _xmouse from the current new _xmouse, you will get the ammount of 'pixels' it should move (then you have to translate that to how many frames you want your animation to skip forward/backward). Zeh ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] non-coder needs help
Sorry if this is a dupe - my mail server has been screwy for a couple of days. It appeared as though this had bounced: Hi guys, About 95% of what you guys do is way over my head and now I could use some help. I have a 3D rendered object that is in a movie clip - it does a single 360 degree rotation. I've placed an invisible movie clip above it with this code on it: onClipEvent(enterFrame){ framePos = int(_xmouse / 630 *( _parent._totalframes)); if (framePos 0) { _parent.gotoAndStop(_parent._totalframes + ((framePos + 1) % _parent._totalframes)); } else { _parent.gotoAndStop(1 + (framePos % _parent._totalframes)); } } It works fine, but when I watched an end user view it, they really spazzed out - they couldn't do smooth rotations. So, I thought I would instead put this code on a mouse event. I thought it would be good for them to click and drag to make the rotation happen and release to stop the rotation. I've tried a few versions of the code and I simply can't get it to work at all. Sorry if this is a really simple question, but I'm just not a coder. Thanks Paul ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com