Article View: alt.pl.programy.flash-5
Article #21894Re: obiekt flash i onRollOver
From: Bartłomiej
Date: Mon, 27 Oct 2003 16:54
Date: Mon, 27 Oct 2003 16:54
67 lines
2956 bytes
2956 bytes
Ta metoda mozesz zrobic wlasne funkcje onRollOver/Out bez przykrego efektu
odswiezania. Wystarczy pare linijek kodu.
Użytkownik "kp" <n@n.n> napisał w wiadomości
news:bnj29q$hoi$1@hermes.e-wro.net...
> Użytkownik Bartłomiej napisał:
> > 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...
> >
>
> w rzeczy samej, można to zrobić znacznie prościej przypisując do
> znacznika obsługę zdarzenia onmouseout i ewentualnie odswiezyc(obiekt
> flash) przy uzyciu np js api - DOM. efekt niestety jest wizualnie
> "przykry". Mnie chodzi o coś w stylu Obflash.onRollOver = myfunction;
>
>
> --
> pozdrawiam kp
>
>
Technical Details
Message-ID:
<bnjilo$nnm$1@nemesis.news.tpi.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!news.ipartners.pl!news.nask.pl!news-stoc.telia.net!news-stoa.telia.net!telia.net!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mailReferences:
<bngsn4$r4b$1@hermes.e-wro.net> <bnhma0$lga$1@nemesis.news.tpi.pl> <bnj29q$hoi$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!news-stoc.telia.net!news-stoa.telia.net!telia.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 17:54:02 +0100 Organization: tp.internet - http://www.tpi.pl/ Lines: 69 Message-ID: <bnjilo$nnm$1@nemesis.news.tpi.pl> References: <bngsn4$r4b$1@hermes.e-wro.net> <bnhma0$lga$1@nemesis.news.tpi.pl> <bnj29q$hoi$1@hermes.e-wro.net> NNTP-Posting-Host: 195.205.189.10 X-Trace: nemesis.news.tpi.pl 1067273721 24310 195.205.189.10 (27 Oct 2003 16:55:21 GMT) X-Complaints-To: usenet@tpi.pl NNTP-Posting-Date: Mon, 27 Oct 2003 16:55:21 +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