Ask a Question related to Macromedia Flash, Design and Development.
-
nigel #1
horizontal scroll
I have a small flash movie that the user can control with their left / right
arrow keys.
I want to be able to stop the user scroll past the end of an image that I
have in there. How do I limit it.
The code i am using at the moment is as follows.
onClipEvent(enterFrame) {
if(Key.isDown(Key.LEFT)) {
this._x--;
}
if (Key.isDown(Key.RIGHT)) {
this._x++;
}
}
nigel Guest
-
horizontal scroll Bar
Hi, I'm new in using Flash Mx and I need somebody help me to create an horizontal scroll bar. I'm making a movie with slide pictures using a mask... -
Horizontal Scroll Bar in Layer
Hi all I am adding content into a layer and want to have a vertical scrollbar, to enable the user to scroll the layer and view content which... -
Horizontal Scroll Issue with CSS
I have an issue with a horizontal scroll at www.armissions.org/index2.php. My CSS document looks as follows: /* CSS Document */ #nav {... -
What Web Control Allows you to Scroll Virtical and Horizontal
Hi all, Other than IFrame or Frames What control can scroll vertical and horizontal Thanks -
Horizontal scroll bar, with images?
Try using Adobe Photoshop. There is a pluggin called Web Photo Gallery, it definatly makes life easy for a novice (that i am). Thanks, Chris... -
Benny Cemoli #2
Re: horizontal scroll
nigel wrote:
> I have a small flash movie that the user can control with their left / right
> arrow keys.
>
> I want to be able to stop the user scroll past the end of an image that I
> have in there. How do I limit it.
>
> The code i am using at the moment is as follows.
>
> onClipEvent(enterFrame) {
>
> if(Key.isDown(Key.LEFT)) {
> this._x--;
> }
> if (Key.isDown(Key.RIGHT)) {
> this._x++;
> }
> }
>
>
>
Why not just use the built-in ScrollPane UI component? No code needed at
all then.
Benny Cemoli Guest
-
J-Dogg #3
Re: horizontal scroll
I did the scroll on [url]www.emasavahl.com[/url] based on the mouse position relative
to the screen, but it can easily be done with a KeyPress command. The
limiting factor, as you put it, is the _x coordinate of the graphic on the
screen. As long as object._x is less than 10, it can scroll right, and as
long as object._x is greater than (-1*(object._width - stage._width)) it can
scroll right. (I think the concept's correct -- not the code -- someone can
correct me or I will march back with my tail between my legs and put the -1
where it belongs.)
basically, keep the left edge of the object within the screen (I use x =
10), and keep the right edge of the object in the screen, by subtracting the
screen width from the object width, and multiplying by -1. The code was
pretty short.
"nigel" <nigel@nigel.com> wrote in message
news:bm3m78$fva$1$8300dec7@news.demon.co.uk...right> I have a small flash movie that the user can control with their left /> arrow keys.
>
> I want to be able to stop the user scroll past the end of an image that I
> have in there. How do I limit it.
>
> The code i am using at the moment is as follows.
>
> onClipEvent(enterFrame) {
>
> if(Key.isDown(Key.LEFT)) {
> this._x--;
> }
> if (Key.isDown(Key.RIGHT)) {
> this._x++;
> }
> }
>
>
>
J-Dogg Guest
-
J-Dogg #4
OOPS: horizontal scroll
correction: should read:
can> As long as object._x is less than 10, it can scroll right, and as
> long as object._x is greater than (-1*(object._width - stage._width)) it"J-Dogg" <j-dogg@quitspammingme.net> wrote in message> scroll LEFT.
news:Wdehb.26453$Sn1.15597@bignews4.bellsouth.net. ..can> I did the scroll on [url]www.emasavahl.com[/url] based on the mouse position relative
> to the screen, but it can easily be done with a KeyPress command. The
> limiting factor, as you put it, is the _x coordinate of the graphic on the
> screen. As long as object._x is less than 10, it can scroll right, and as
> long as object._x is greater than (-1*(object._width - stage._width)) itthe -1> scroll LEFT. (I think the concept's correct -- not the code -- someone can
> correct me or I will march back with my tail between my legs and putthe> where it belongs.)
>
> basically, keep the left edge of the object within the screen (I use x =
> 10), and keep the right edge of the object in the screen, by subtractingI> screen width from the object width, and multiplying by -1. The code was
> pretty short.
>
> "nigel" <nigel@nigel.com> wrote in message
> news:bm3m78$fva$1$8300dec7@news.demon.co.uk...> right> > I have a small flash movie that the user can control with their left /> > arrow keys.
> >
> > I want to be able to stop the user scroll past the end of an image that>> > have in there. How do I limit it.
> >
> > The code i am using at the moment is as follows.
> >
> > onClipEvent(enterFrame) {
> >
> > if(Key.isDown(Key.LEFT)) {
> > this._x--;
> > }
> > if (Key.isDown(Key.RIGHT)) {
> > this._x++;
> > }
> > }
> >
> >
> >
>
J-Dogg Guest



Reply With Quote

