Article View: alt.pl.programy.flash-5
Article #21892Re: obiekt flash i onRollOver
From: Bartłomiej
Date: Sun, 26 Oct 2003 23:43
Date: Sun, 26 Oct 2003 23:43
54 lines
2482 bytes
2482 bytes
Ten skrypt w JS podaje pozycje myszy nad dokumentem i pozycje filmu flasha.
Odejmujac jedno od drugiego mamy pozycje nad filmem nawet jesli user
wyjedzie myszka poza jego obszar... np x=-40, y=-100... albo w druga
strone..
x > stage._width
Pozdrawiam.
<script language="JavaScript" type="text/JavaScript">
<!--
function MM()
{
var isNetscape = navigator.appName=="Netscape";
var fmx;
var fmy;
var fleft;
var ftop;
if (isNetscape) {
fmx = event.x + document.scrollLeft;
fmy = event.y + document.scrollTop;
} else {
fmx = event.x + document.body.scrollLeft;
fmy = event.y + document.body.scrollTop;
}
fleft = document.flash_movie.offsetLeft;
ftop = document.flash_movie.offsetTop;
document.all.flash_movie.SetVariable("fmx", fmx);
document.all.flash_movie.SetVariable("fmy", fmy);
document.all.flash_movie.SetVariable("fleft", fleft);
document.all.flash_movie.SetVariable("ftop", ftop);
}
//-->
</script>
</HEAD>
<BODY onMouseMove="MM()">
....
Użytkownik "kp" <n@n.n> napisał w wiadomości
news:bngsn4$r4b$1@hermes.e-wro.net...
> Witam!Czy mechanizmy flasha pozwalają wychwycić zdarzenie zachodzące
> wówczas, kiedy użytkownik "zjedzie" z pola dokumentu (obiektu flash).
> Jeżeli to możliwe, proszę o wskazówki jak osiągnąć zamierzony przeze
> mnie efekt. Serdecznie dziękuje.
>
> --
> pozdrawiam kp
>
Technical Details
Message-ID:
<bnhma0$lga$1@nemesis.news.tpi.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!news.ipartners.pl!news.nask.pl!newsfeed.gazeta.pl!news.internetia.pl!skynet.be!skynet.be!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mailReferences:
<bngsn4$r4b$1@hermes.e-wro.net>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!news.ipartners.pl!news.nask.pl!newsfeed.gazeta.pl!news.internetia.pl!skynet.be!skynet.be!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail From: Bartłomiej <bchojnowski@op.pl> Newsgroups: alt.pl.programy.flash-5 Subject: Re: obiekt flash i onRollOver Date: Mon, 27 Oct 2003 00:43:43 +0100 Organization: tp.internet - http://www.tpi.pl/ Lines: 56 Message-ID: <bnhma0$lga$1@nemesis.news.tpi.pl> References: <bngsn4$r4b$1@hermes.e-wro.net> NNTP-Posting-Host: 195.205.189.10 X-Trace: nemesis.news.tpi.pl 1067211905 22026 195.205.189.10 (26 Oct 2003 23:45:05 GMT) X-Complaints-To: usenet@tpi.pl NNTP-Posting-Date: Sun, 26 Oct 2003 23:45:05 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit