01-11-2006, 06:29 PM
|
#1
|
|
Registered User
Join Date: May 2005
Posts: 25
|
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.
|
|
|
01-11-2006, 09:59 PM
|
#2
|
|
TEAM INTERNET
Join Date: Jul 2005
Location: Batcave
Posts: 2,760
|
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"
|
|
|
01-11-2006, 10:12 PM
|
#3
|
|
Member
Join Date: Apr 2005
Posts: 73
|
bear in mind that if you place any action like an onPress on the dragger, you won't be able to detect the onRollOut
Last edited by tobyw_1969; 01-11-2006 at 10:15 PM.
|
|
|
01-11-2006, 10:39 PM
|
#4
|
|
rather be programming
Join Date: Feb 2005
Location: City of Angels
Posts: 10,141
|
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");
|
|
|
01-11-2006, 11:25 PM
|
#5
|
|
TEAM INTERNET
Join Date: Jul 2005
Location: Batcave
Posts: 2,760
|
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"
|
|
|
01-12-2006, 05:19 AM
|
#6
|
|
Registered User
Join Date: May 2005
Posts: 25
|
Wow, that was quick. Ok ill try this one out. Thanks a lot guys
|
|
|
01-12-2006, 05:26 AM
|
#7
|
|
TEAM INTERNET
Join Date: Jul 2005
Location: Batcave
Posts: 2,760
|
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"
|
|
|
01-12-2006, 06:30 AM
|
#8
|
|
rather be programming
Join Date: Feb 2005
Location: City of Angels
Posts: 10,141
|
Quote:
|
Originally Posted by Headshotz
No problem 
|
He was talking to me
__________________
trace("Good bye Flash.") Log.i(TAG, "Hello Droid");
|
|
|
01-12-2006, 06:38 AM
|
#9
|
|
Registered User
Join Date: May 2005
Posts: 25
|
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!!!
|
|
|
01-12-2006, 06:40 AM
|
#10
|
|
TEAM INTERNET
Join Date: Jul 2005
Location: Batcave
Posts: 2,760
|
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"
|
|
|
| Thread Tools |
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT. The time now is 06:13 PM.
///
|
|