A Flash Developer Resource Site

Page 3 of 5 FirstFirst 12345 LastLast
Results 41 to 60 of 81

Thread: external html image

  1. #41
    Senior Member
    Join Date
    May 2016
    Posts
    451
    is this possible
    can you add another vertScroll and rotate it to horizontal
    and set text._x +=

  2. #42
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    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:
    PHP Code:
    _root.ContentScroller._x=Stage.width/2-scroll_width/2//Inside of the onEnterFrame function. 
    At the onSelfEvent(load) is where the main program is:
    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. 
    This program works with the margin-right from the css.


    download v3 (swish)
    Last edited by AS3.0; 02-08-2023 at 06:42 PM.

  3. #43
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    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.
    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 css simple (swish)
    load image simple (swish)
    combined version (swish)
    Last edited by AS3.0; 02-09-2023 at 12:17 AM.

  4. #44
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    Bug fix:

    combined version (swish)

  5. #45
    Senior Member
    Join Date
    May 2016
    Posts
    451
    load css simple horizontal scroll not working

  6. #46
    Senior Member
    Join Date
    May 2016
    Posts
    451
    can you make vertical scroll in the right of text

  7. #47

  8. #48
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    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:
    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.
     
    }
      } 
    load css simple v3 (swish)
    combined version v5 (swish)
    Last edited by AS3.0; 02-09-2023 at 02:36 AM.

  9. #49
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    Scrollpane fix for 100%:

    load css simple v4 (swish)
    combined version v6 (swish)

  10. #50
    Senior Member
    Join Date
    May 2016
    Posts
    451

  11. #51
    Senior Member
    Join Date
    May 2016
    Posts
    451
    load css simple
    can you add a big button horizontal same vertical
    Last edited by kofa; 02-09-2023 at 04:33 AM.

  12. #52
    Senior Member
    Join Date
    May 2016
    Posts
    451
    padding right not working in load css simple

  13. #53
    Senior Member
    Join Date
    May 2016
    Posts
    451
    load css simple

    how to change width and height

    i tried use parametrers but not working

  14. #54
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    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:
    PHP Code:
    _root.ContentScroller.SetSize(600,400)//Set width & height.

    _root.ContentScroller._x=0//Set x coordinate.
    _root.ContentScroller._y=0//Set y coordinate. 
    Inside of the styles.css file you can change the pane colors, & you wanted the horizontal pane larger correct?:
    PHP Code:
    .heading {
    font-familyArialHelveticasans-serif;
    font-weightbold;
    }
    .
    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 you are having issues changing with setSize, you have to be accessing it as _root.ContentScroller.SetSize:
    PHP Code:
    _root.ContentScroller.SetSize(200,400
    If it is still not resizing you can try setting a delayed timer before resizing:
    PHP Code:
    setTimeout(test,300);//Example call to resize in 300ms.
    function test(){
    _root.ContentScroller.SetSize(200,400

    simple scrollpane v5 (swish)
    combined version v7 (swish)
    Last edited by AS3.0; 02-09-2023 at 12:31 PM.

  15. #55
    Senior Member
    Join Date
    May 2016
    Posts
    451
    We're almost done


  16. #56
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    Hello, this version uses the original design:

    simple scrollpane v6 (swish)
    combined version v8 (swish)
    Last edited by AS3.0; 02-09-2023 at 10:06 PM.

  17. #57
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    Bug fix on scrollpane alignment.

    Simple scrollpane v7 (swish)
    combined version v9 (swish)
    Last edited by AS3.0; 02-10-2023 at 12:16 AM.

  18. #58
    Senior Member
    Join Date
    May 2016
    Posts
    451
    the end in Simple scrollpane v7

    can you Increase the size of the horizontal scroll button and make onRover color same as vertical

  19. #59
    Senior Member
    Join Date
    May 2016
    Posts
    451
    in load image simple

    can you add smooth quality zoom function as like this

    onRollOver = function() { the image quality smooth zoom (w,h) }

  20. #60
    Senior Member
    Join Date
    May 2016
    Posts
    451
    without any scroll
    if i have _root.main.txtfield

    can you write simple code to load external variable without fragmentation on lines

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center