is this possible
can you add another vertScroll and rotate it to horizontal
and set text._x +=
Printable View
is this possible
can you add another vertScroll and rotate it to horizontal
and set text._x +=
Yes, But the way to center it is abit different:
At the onSelfEvent(load) is where the main program is, you can center it like this:
At the onSelfEvent(load) is where the main program is:PHP Code:_root.ContentScroller._x=Stage.width/2-scroll_width/2//Inside of the onEnterFrame function.
This program works with the margin-right from the css.PHP Code:onEnterFrame=function(){
var percent=((_root.ContentScroller.horScroll.slider._y)/(_root.ContentScroller.horScroll.tempTrack._height-_root.ContentScroller.horScroll.slider._height))*100 //Produce a horizontal scroll percent.
_root.data_field.text=percent
_root.ContentScroller.textArea._x=-((_root.ContentScroller.textArea._width/100)*percent)+((scroll_width/100)*percent)-(int(padding_right/100)*percent) //Set the textArea._x based on the percent produced.
_root.ContentScroller._x=Stage.width/2-scroll_width/2
}
my_styleSheet.load("styles.css");
loadVariables("settings.txt");
setWidth(Stage.width/2)//Set the width of the horizontal scrollpane with setWidth().
setTimeout(scrollToRight,1)//Call scorllToRight in 1 ms for margin right.
download v3 (swish)
This is the new combined version, the main program to look at is at onFrame(2).
So the combined version checks with the scrollwheel if all of the movieclips are in view to scroll them.
load css simple (swish)PHP Code:var mouseListener:Object = new Object();
Mouse.addListener(mouseListener);
var scrollwheel:Object = new Object();
Mouse.addListener(scrollwheel);
mouseListener.onMouseWheel = function(scr) {
if(scr<0){
for(var i=0;i<item_list.length;i++){
if(item_list[i]._y+item_list[i]._height>Stage.height){
for(var j in _root){//Loop through all stage assets.
if(typeof(_root[j])=="movieclip"){ //If asset is a movieclip, scroll the object _y coordinate minus an amount.
_root[j]._y-=item_list[0]._height/5
}
}
}
}
}else{
if(item_list[0]._y<0){
for(var j in _root){//Loop through all stage assets.
if(typeof(_root[j])=="movieclip"){ //If asset is a movieclip, scroll the object _y coordinate plus an amount.
_root[j]._y+=item_list[0]._height/5
}
}
}
resize()//update resize event.
}
load image simple (swish)
combined version (swish)
Bug fix:
combined version (swish)
load css simple horizontal scroll not working
can you make vertical scroll in the right of text
load css simple (swish)
Hello, for the combined version, I setup a scrolling feature.
At the onFrame(2) scripting section inside of the onMouseWheel function, page scrolling can happen if the css scroller is fully scrolled when the mouse is hovered over it:
load css simple v3 (swish)PHP Code:var scroll_up_ok:Boolean=true//start ok to scroll boolean at true.
var scroll_down_ok:Boolean=true
if(_root._xmouse>ContentScroller._x&&_root._xmouse<ContentScroller._x+ContentScroller.horScroll._width&&_root._ymouse>ContentScroller._y&&_root._ymouse<ContentScroller._y+ContentScroller._height){//Check if the mouse is in the bounds of the css scroller.
if(ContentScroller.vertScroll.slider._y<=0){//Check if the css scroller is fully scrolled up before allowing it to scroll the page up.
scroll_down_ok=true;//Scrolling the page up is ok.
}else{
scroll_down_ok=false//Scrolling the page up is not ok.
}
if(int(ContentScroller.vertScroll.slider._y)+int(ContentScroller.vertScroll.slider._height) >=int(ContentScroller.vertScroll.tempTrack._y)+int(ContentScroller.vertScroll.tempTrack._height)){//Check if the mouse is in the bounds of the css scroller.
scroll_up_ok=true;//Scrolling the page down is ok.
}else{
scroll_up_ok=false//Scrolling the page down is not ok.
}
}
combined version v5 (swish)
Scrollpane fix for 100%:
load css simple v4 (swish)
combined version v6 (swish)
load css simple
can you add a big button horizontal same vertical
padding right not working in load css simple
load css simple
how to change width and height
i tried use parametrers but not working
Hi, margin-right issue was resolved when the value was below 100.
At the onSelfEvent(load) scripting section you can set the size of the scrollpane using setSize:
Inside of the styles.css file you can change the pane colors, & you wanted the horizontal pane larger correct?:PHP Code:_root.ContentScroller.SetSize(600,400)//Set width & height.
_root.ContentScroller._x=0//Set x coordinate.
_root.ContentScroller._y=0//Set y coordinate.
If you are having issues changing with setSize, you have to be accessing it as _root.ContentScroller.SetSize:PHP Code:.heading {
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
}
.mainBody {
color: #FF0000;
text-align:right;
font-size:30px;
margin:100;
padding-right:50px;
quality:high;
pane-color:0x370640; //Horizontal pane color.
pane-color2:0xFF0000;//Vertical pane color.
}
If it is still not resizing you can try setting a delayed timer before resizing:PHP Code:_root.ContentScroller.SetSize(200,400)
simple scrollpane v5 (swish)PHP Code:setTimeout(test,300);//Example call to resize in 300ms.
function test(){
_root.ContentScroller.SetSize(200,400)
}
combined version v7 (swish)
We're almost done
https://board.flashkit.com/board/ima.../2023/02/5.jpg
Hello, this version uses the original design:
simple scrollpane v6 (swish)
combined version v8 (swish)
Bug fix on scrollpane alignment.
Simple scrollpane v7 (swish)
combined version v9 (swish)
the end in Simple scrollpane v7
can you Increase the size of the horizontal scroll button and make onRover color same as vertical
in load image simple
can you add smooth quality zoom function as like this
onRollOver = function() { the image quality smooth zoom (w,h) }
without any scroll
if i have _root.main.txtfield
can you write simple code to load external variable without fragmentation on lines