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

AS3 Custom Scrollable Movieclip Using Buttons

New Here ,
Apr 03, 2009 Apr 03, 2009

Copy link to clipboard

Copied

Hello,

I am a student that is new to AS3 (although I have some experience with AS2) and new to the Adobe forums.

I found, what I think is, a great tutorial on how to create a custom scroll bar without using the UI components. Unfortunately, the author has deleted the video but still provides the source files which I have began to pick apart. Although this scroll bar works great, I am working on a movieclip of scrollable thumbnails that only uses buttons to scroll and not the scrollbar it self. Please correct me if I am wrong, but it seems as though the buttons control the movie clip based on the position of the scroll bar/scroller.

Here is the url of the tutorial page (the source files can be downloaded): http://www.developphp.com/Flash_tuts/AS3_scrollbar2.php
I have also attached the code that is used to control the scrollbar.

Can someone please provide the code that would only use the buttons to smoothly control the timeline? Or show some altercations of the code that would make this work properly. I've seen it done in AS2 without much of a problem but I am not very good at translating AS2 to AS3.
TOPICS
ActionScript

Views

2.6K

Translate

Translate

Report

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 ,
Apr 05, 2009 Apr 05, 2009

Copy link to clipboard

Copied

i didn't check any of your links but to scroll a movieclip smoothly, you would do better to control the movieclip's x (or y) property, and not its timeline.

Votes

Translate

Translate

Report

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
Guest
Apr 06, 2009 Apr 06, 2009

Copy link to clipboard

Copied

LATEST

You can use a ScrollPane component and customize its look and feel.

Why you are trying to re-invent the wheel?

Use ScrollPane component and just customize its look and feel.

What I would have done in this case is

1. Take a ScrollPane.

2. Set its horizontalScrollPolicy ="Off"; and verticalScrollPolicy ="Off".

3.Change the Look and feel for background.

4. Create buttons on stage and write the following code on click event of those buttons.

scrollLeft.addEventListener(MouseEvent.CLICK,moveight);

function moveRight(evnt:MouseEvent)

{

     myScrollPane.horizontalScrollPosition = myScrollPane.horizontalScrollPosition + myScrollPane.width;

     //You can use a Tween effect here for better User Experience.

}

Votes

Translate

Translate

Report

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