Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 01-11-2006, 06:29 PM   #1
kieserr
Registered User
 
Join Date: May 2005
Posts: 25
Default StartDrag on Mouseover

Hi Guys,

What i wanted to do is, once i hover or mouseover on my banner(728x200), the dragabble MC(93x71) appears on the scene, meaning, it will only start to be visible on mouseover. But the problem is, where should i place the draggable MC? The MC should appear exactly where the mouse is or hovers. I appreciate your help. Thanks.
kieserr is offline   Reply With Quote
Old 01-11-2006, 09:59 PM   #2
Headshotz
TEAM INTERNET
 
Headshotz's Avatar
 
Join Date: Jul 2005
Location: Batcave
Posts: 2,761
Send a message via MSN to Headshotz
Default

Try:

ActionScript Code:
//Make movieclip invisible to start with my_mc._visible = false; //Start drag my_mc.startDrag(true); //On rollOver make it visible banner.onRollOver = function() {     my_mc._visible = true; }; //*~HeadshotZ*~\\
__________________
The author of windows file copy dialogue visits some friends:
"I'm just outside of town so I should be there in about 15 minutes"
"Actually it's looking more like 6 days"
"No, wait, 30 seconds"
Headshotz is offline   Reply With Quote
Old 01-11-2006, 10:12 PM   #3
tobyw_1969
Member
 
tobyw_1969's Avatar
 
Join Date: Apr 2005
Posts: 73
Default

bear in mind that if you place any action like an onPress on the dragger, you won't be able to detect the onRollOut
__________________
http://www.flashjunction.com

Last edited by tobyw_1969; 01-11-2006 at 10:15 PM.
tobyw_1969 is offline   Reply With Quote
Old 01-11-2006, 10:39 PM   #4
Flash Gordon
rather be programming
 
Flash Gordon's Avatar
 
Join Date: Feb 2005
Location: City of Angels
Posts: 10,140
Default

Quote:
The MC should appear exactly where the mouse is or hovers.
mc._x = _root.mouse.x;
mc._y = _root.moust.y;
__________________
trace("Good bye Flash.") Log.i(TAG, "Hello Droid");
Flash Gordon is offline   Reply With Quote
Old 01-11-2006, 11:25 PM   #5
Headshotz
TEAM INTERNET
 
Headshotz's Avatar
 
Join Date: Jul 2005
Location: Batcave
Posts: 2,761
Send a message via MSN to Headshotz
Default

My code works, stop teasing me
__________________
The author of windows file copy dialogue visits some friends:
"I'm just outside of town so I should be there in about 15 minutes"
"Actually it's looking more like 6 days"
"No, wait, 30 seconds"
Headshotz is offline   Reply With Quote
Old 01-12-2006, 05:19 AM   #6
kieserr
Registered User
 
Join Date: May 2005
Posts: 25
Default

Wow, that was quick. Ok ill try this one out. Thanks a lot guys
kieserr is offline   Reply With Quote
Old 01-12-2006, 05:26 AM   #7
Headshotz
TEAM INTERNET
 
Headshotz's Avatar
 
Join Date: Jul 2005
Location: Batcave
Posts: 2,761
Send a message via MSN to Headshotz
Default

No problem
__________________
The author of windows file copy dialogue visits some friends:
"I'm just outside of town so I should be there in about 15 minutes"
"Actually it's looking more like 6 days"
"No, wait, 30 seconds"
Headshotz is offline   Reply With Quote
Old 01-12-2006, 06:30 AM   #8
Flash Gordon
rather be programming
 
Flash Gordon's Avatar
 
Join Date: Feb 2005
Location: City of Angels
Posts: 10,140
Default

Quote:
Originally Posted by Headshotz
No problem
He was talking to me


__________________
trace("Good bye Flash.") Log.i(TAG, "Hello Droid");
Flash Gordon is offline   Reply With Quote
Old 01-12-2006, 06:38 AM   #9
kieserr
Registered User
 
Join Date: May 2005
Posts: 25
Default

It seems like its working just fine and perfect. Thanks a lot Headshotz for most of the script, Flash Gordon for the mouse xy thingy, tobyw_1969 for the onPress notes You guys are the best. Heres the source file and swf you have all done, in case somebody needs something like this.

http://www.freewebs.com/kieserr/test.swf
http://www.freewebs.com/kieserr/test.fla

Actionscript forum rules!!!
kieserr is offline   Reply With Quote
Old 01-12-2006, 06:40 AM   #10
Headshotz
TEAM INTERNET
 
Headshotz's Avatar
 
Join Date: Jul 2005
Location: Batcave
Posts: 2,761
Send a message via MSN to Headshotz
Default

ActionScript Code:
//Make movieclip invisible to start with my_mc._visible = false; //Start drag my_mc.startDrag(true); //On rollOver make it visible banner.onRollOver = function() {     my_mc._visible = true; }; //*~HeadshotZ*~\\

ActionScript Code:
//Make movieclip invisible to start with my_mc._visible = false; //Start drag _root.onEnterFrame = function() { my_mc._x = _xmouse; my_mc._y = _ymouse; }; //On rollOver make it visible banner.onRollOver = function() {     my_mc._visible = true; }; //*~HeadshotZ*~\\

Same thing, he was thanking me
__________________
The author of windows file copy dialogue visits some friends:
"I'm just outside of town so I should be there in about 15 minutes"
"Actually it's looking more like 6 days"
"No, wait, 30 seconds"
Headshotz is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mouseover effect for 'tooltip' foot01 ActionScript 1.0 (and below) 3 07-30-2005 12:50 AM
Movieclip (mouseover) on top of other movieclip (mouseover) msmith29063 ActionScript 1.0 (and below) 12 01-31-2005 11:59 PM
startDrag and button conflict PixelPimp ActionScript 1.0 (and below) 1 07-02-2003 01:19 AM
startdrag Problems rsassine ActionScript 1.0 (and below) 9 06-05-2002 05:56 AM
startDrag disables my buttons m31 ActionScript 1.0 (and below) 6 11-09-2001 08:27 PM


All times are GMT. The time now is 06:21 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.