Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Scrolling an image horizontally

Explorer ,
Sep 06, 2007 Sep 06, 2007
I have a JPG image that is 6851 x 632 px. I would like to scroll the image horizontally (I would like to see 1000 x 632 at a time). How can I create a horizontal scroll bar to scroll an image like that?

Any help will be greatly appreciated.


Thank you in advanced,
TOPICS
ActionScript
449
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Sep 06, 2007 Sep 06, 2007
as2 is easier.

create a horizontal scrollbar in the authoring environment and convert the scrolltrack and slider into movieclips with their registration point at their left edges.

assign an onPress handler for the slider that initiates the slider's startDrag() with parameters set to the left edge of the slider track (0) and the right edge (slider track's _width minus the slider's _width) and initiate a loop that repeatedly updates your image's _x property based on the slider's _x property.

...
Translate
Community Expert ,
Sep 06, 2007 Sep 06, 2007
as2 or as3?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 06, 2007 Sep 06, 2007
Whichever is easier!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 06, 2007 Sep 06, 2007
as2 is easier.

create a horizontal scrollbar in the authoring environment and convert the scrolltrack and slider into movieclips with their registration point at their left edges.

assign an onPress handler for the slider that initiates the slider's startDrag() with parameters set to the left edge of the slider track (0) and the right edge (slider track's _width minus the slider's _width) and initiate a loop that repeatedly updates your image's _x property based on the slider's _x property.

finally, assign an onRelease handler to stopDrag() and terminate your loop.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 06, 2007 Sep 06, 2007
Thank you kglad
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 06, 2007 Sep 06, 2007
LATEST
you're welcome.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines