Creative Flash Scroller Forum


box Creative Flash Scroller
With Creative Flash Scroller you can scroll any kind of Flash Content: static text, dynamic text, pictures, animations, movies. It comes with multiple scroll behaviors: touch scroll, mouse gesture scroll, scrollbar scroll and even supports mouse wheel behavior. You can add smooth scrolling or motion blur effects and customize it to suit your design, from an easy to use interface.

Find out more about Creative Flash Scroller

Thread: Center... based on \\\"create-unconventional-scroller\\\" sampl

title left
User Details
message
title right
Ian Humbert

post date:
2010-06-05 17:22:13
Hello,

I need to have my main image centered (ENTER_FRAME) and also possibly make a button to bring it back to center...

Basically my setup now works like your:
"create-unconventional-scroller" sample
my content is loaded from the library (and must be)

meaning that the scrollbars are all the way up and all the way left and so is the content...

How could you "fix" this example so that the scrollbars and content are centered then ?



I tried something along the lines of:

recenterBtn.addEventListener(MouseEvent.CLICK, recenterBtnClick)
function recenterBtnClick(event:MouseEvent):void {
scrollerarea.HscrollTo(.5);
scrollerarea.VscrollTo(.5);

etc

etc... cannot make this happen.. please help ;-) Must be simple but I cannot get it...

THANKS !!!






Ian Humbert

post date:
2010-06-06 13:35:01
oki I was able to make it work inside my fairly complex liquid layout without loading the content from the library... but directly on stage and thus centered..


HOWEVER I still need help regarding the button for recentering ones the scrollers have been used to move the content around..

with the following I'm able to recenter horizontally but I don't understand how to target it vertically... I tried HScroll and WScroll guess those are not the methods for it though :-(



//recenterBtn
Object(root).bottomlogo.recenterBtn.addEventListener(MouseEvent.CLICK, recenterBtnClick)
function recenterBtnClick(event:MouseEvent):void {
Object(root).scrollerareaholder.scrollerarea.scrollTo("HScroll", 160);
}



Andrei Rinciog [Extend Studio]

post date:
2010-06-07 06:10:18
Hello Ian,

The first parameter for the scrollTo method is of type string and it can have the values "Vertical" or "Horizontal". You can also use percentage for the second parameter, like this:

scrollerarea.scrollTo("Vertical",50,true);

Regards,
Andrei
Ian Humbert

post date:
2010-06-07 09:21:31
You are the sunshine of my Life la la la... ;-) lol Thanks !!!!!!!!!!!!!!!!!