Article View: alt.pl.programy.flash-5
Article #34594Re: panorama
From: Leszek
Date: Mon, 01 Sep 2008 13:00
Date: Mon, 01 Sep 2008 13:00
30 lines
1877 bytes
1877 bytes
> Może podzielić panoramę na dwa obrazki, przesuwać w zależności gdzie
> znajduje się kursor myszki (_ymouse, _xmouse).Gdy jeden obrazek się
> skończy (zniknie z wyświetlanego obszaru) wczytać(wyświetlić) drugi
> obrazek. Taka prosta pętla.
tereaz mam to zrobione tak
var speed = 25;
function onEnterFrame(){
trace("this mouse x: "+this._xmouse);
var percent = ((Stage.width/2)-this._xmouse)/(Stage.width/2);
trace("percent: "+percent);
var finalSpeed = percent * speed;
trace("final speed: "+finalSpeed);
panorama_mc._x +=finalSpeed;
if(panorama_mc._x+finalSpeed > 0){
panorama_mc._x = 0;
}else if (panorama_mc._x < Stage.width-panorama_mc._width){
panorama_mc._x = Stage.width-panorama_mc._width;
}else{
panorama_mx._x +=finalSpeed;
}
};
co tu powinienem zmienić żeby chodziło w kółko
Technical Details
Message-ID:
<g9gp4h$h0s$1@atlantis.news.neostrada.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!wsisiz.edu.pl!newsfeed.neostrada.pl!atlantis.news.neostrada.pl!news.neostrada.pl!not-for-mailReferences:
<g9gm8e$fp0$1@nemesis.news.neostrada.pl> <g9go4j$j1j$1@nemesis.news.neostrada.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!wsisiz.edu.pl!newsfeed.neostrada.pl!atlantis.news.neostrada.pl!news.neostrada.pl!not-for-mail From: "Leszek" <leszek@offsetdrukimedia.pl> Newsgroups: alt.pl.programy.flash-5 Subject: Re: panorama Date: Mon, 1 Sep 2008 15:00:33 +0200 Organization: TP - http://www.tp.pl/ Lines: 33 Message-ID: <g9gp4h$h0s$1@atlantis.news.neostrada.pl> References: <g9gm8e$fp0$1@nemesis.news.neostrada.pl> <g9go4j$j1j$1@nemesis.news.neostrada.pl> NNTP-Posting-Host: bzs108.internetdsl.tpnet.pl X-Trace: atlantis.news.neostrada.pl 1220274130 17436 83.19.48.108 (1 Sep 2008 13:02:10 GMT) X-Complaints-To: usenet@news.neostrada.pl NNTP-Posting-Date: Mon, 1 Sep 2008 13:02:10 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit