/    Sign up×
Community /Pin to ProfileBookmark

MOZILLA Stopping Default Drag Function for <DIV> with Flash

Ok, I’m not exactly sure how to ask this, but here is what I’m working on. If you take a look at this web player I’ve been making in Mozilla/Netscape here:

[url]http://www.metalblend.com/test/player/playerPreview.htm[/url]

You will notice that while dragging it around, it tries to drag the actual Flash movie or Layer by itself like if you were dragging a picture or link into a window. See how it shows the circle with slash NOT sign after you try to drag it a couple times?

The code I’ve made for this is fairly simple, but different from most dragging image/layers code you might find because it is Flash. Anyway, the Flash movie get’s the mousedown event. After that, the Flash movie tells my javascript code to start dragging. The Javascript code captures the position of the mouse and moves the <DIV> the flash movie is on to that position. This does not stop until the Flash movie captures a mouseup event and then tells my javascript program to stop dragging the layer. I have to do it this way because you cannot capture mouse events from the browser window when your mouse is over a Flash movie.

Anyway, does anyone know a way I can get the browser to stop trying to drag the movie? It makes it so it doesn’t register layer movement until after you let the mouse back up. By the way, this script works perfect in IE, but not in Mozilla/Netscape.

Thanks for all the help guys!

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @Shawn spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...