Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | Re: FLASH: stop scroll image |
From: | Ramesh C T |
Date: | Tue, 10 Oct 2000 04:55:10 +0100 |
Hello stephan
I hope you are using F5. The below pasted script is writen for the movie
clip (map) itself. if you notice, i have initializing the edges variables of
the area when the movieclip loads using the onClipEvent(load) handler. and
then below i'm checking whether the map goes beyond these edges when the
arrow keys pressed before the actual movement of the map.
onClipEvent(load) {
leftEdge = 0;
topEdge = 0;
rightEdge = 320
bottomEdge = 240;
speed = 3;
}
onClipEvent (keyDown) {
if (Key.getCode() == 38){
nextLocV = this._y + speed;
} else if (Key.getCode() == 40){
nextLocV = this._y - speed;
} else if (Key.getCode() == 37){
nextLocH = this._x + speed;
} else if (Key.getCode() == 39){
nextLocH = this._x - speed;
}
if ((nextLocH <= leftEdge ) || (nextLocH >= rightEdge))
this._x = this._x;
} else {
this._x = nextLocH;
}
if ((nextLocV <= topEdge) || (nextLocV >= bottomEdge ))
this._y = this._y;
} else {
this._y = nextLocV;
}
}
Hope this helps
Ramesh C T
-----Original Message-----
From: stephan seifert <stephantoolbox [dot] co [dot] nz>
To: flasherchinwag [dot] com <flasherchinwag [dot] com>
Date: Tuesday, October 10, 2000 8:41 AM
Subject: FLASH: stop scroll image
>Hi all
>I made a scrolling map that the user navigates by using arrows.
>there is just one problem... he can keep scrolling and scrolling and
>screolling
>
>how do i restrain the area that he can scroll in? so that when he reaches
>the edge of the area
>he can press the button but will go no further
>or even better the button diappears.
>
>please help because I'm lost!:)
>
>cheers
>stephan
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NudeGuru.com is proud to sponsor the Flasher list
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IT'S THE ART OF MONEY, HONEY!
Tips and Advice from some of the most popular Flash
artists + industry power-brokers on how to hold onto
your rights, negotiate contracts and get full value
for your work.http://www.nudeguru.com from Franke James
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpchinwag [dot] com
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]