🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.pl.programy.flash-5
Article #21893

Re: obiekt flash i onRollOver

#21893
From: kp
Date: Mon, 27 Oct 2003 12:26
57 lines
2534 bytes
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: <bnj29q$hoi$1@hermes.e-wro.net>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!news.ipartners.pl!newsfeed.gazeta.pl!news.e-wro.pl!not-for-mail
References: <bngsn4$r4b$1@hermes.e-wro.net> <bnhma0$lga$1@nemesis.news.tpi.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!news.ipartners.pl!newsfeed.gazeta.pl!news.e-wro.pl!not-for-mail
From: kp <n@n.n>
Newsgroups: alt.pl.programy.flash-5
Subject: Re: obiekt flash i onRollOver
Date: Mon, 27 Oct 2003 13:26:59 +0100
Organization: Miejskie Sieci Informatyczne http://www.e-wro.pl
Lines: 59
Message-ID: <bnj29q$hoi$1@hermes.e-wro.net>
References: <bngsn4$r4b$1@hermes.e-wro.net> <bnhma0$lga$1@nemesis.news.tpi.pl>
NNTP-Posting-Host: host82-143-133-5.ip.pop.e-wro.net.pl
Mime-Version: 1.0
X-Trace: hermes.e-wro.net 1067256954 18194 82.143.133.5 (27 Oct 2003 12:15:54 GMT)
X-Complaints-To: usenet@e-wro.net
NNTP-Posting-Date: Mon, 27 Oct 2003 12:15:54 +0000 (UTC)
User-Agent: Mozilla/5.0 (Windows; U; Win98; PL; rv:1.5b) Gecko/20030901 Thunderbird/0.2
X-Accept-Language: pl, en-us, en
In-Reply-To: <bnhma0$lga$1@nemesis.news.tpi.pl>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit