A Flash Developer Resource Site

Page 2 of 5 FirstFirst 12345 LastLast
Results 21 to 40 of 81

Thread: external html image

  1. #21
    Senior Member
    Join Date
    May 2016
    Posts
    451
    can you add a professional scroll like the one in ( how to auto fit external text variable post )

  2. #22
    Senior Member
    Join Date
    May 2016
    Posts
    451
    padding text in css not working
    how to set distance between text and scroll

  3. #23
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    Alright, send me the padding script to implement, padding is not currently a feature in the css that comes with as2.

    HTML Code:
    .heading {
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    }
    .mainBody {
    color: #FF0000;
    text-align:right;
    font-size: 14px;
    margin:40; //Distance between image and scrollpane
    padding: 25px 50px;// Do you want this implemented? or a different type of padding.
    }

    You can do:
    HTML Code:
    margin-right:300px;
    ...instead of padding? for:
    HTML Code:
    text-align:right;
    Last edited by AS3.0; 02-06-2023 at 05:05 PM.

  4. #24
    Senior Member
    Join Date
    May 2016
    Posts
    451
    like this padding-right:10px;

  5. #25
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    Ok, here is the implementation for padding-right:

    At the onFrame(2) scripting section where the css file is loaded, you can check if align_mode is right & subtract padding_right:
    PHP Code:
    if(align_mode=="right"){
    pane_1.scrollToMaxHorizontal()
    pane_focus.container.content.data_field._x=-int(padding_right)

    download v7 (swish)

    Do you want the scrollpane to have better graphics like the component?
    Last edited by AS3.0; 02-06-2023 at 05:57 PM.

  6. #26
    Senior Member
    Join Date
    May 2016
    Posts
    451
    yes better scroll

  7. #27
    Senior Member
    Join Date
    May 2016
    Posts
    451
    quality and smooth is important
    please delete html image and add draw function to another mc to load smooth image
    Last edited by kofa; 02-06-2023 at 05:59 PM.

  8. #28
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    Hi, I left 3 downloads for a simple file version & the last file combines them all.

    For "simple fullscreen scrollpane" file, you just need to know 2 commands:
    PHP Code:
    pane_1.resize_no_scale(Stage.width,Stage.height)           //  <----------Set the scroll pane size.

    pane_1.appendText("ABCDEFGHIJKLMNOPQRSTUVWXYZ")         // <---------- Add more text lines to the pane. 
    You can go to the onSelfEvent(load) that you usually use to load "styles.css" for the "simple scrollpane with css" file:
    PHP Code:
    if(align_mode=="right"){//After the getCssValues() loads the css styles as variables you can set padding_right if align_mode is right.
    _root.ContentScroller.textArea._x=-padding_right

    For the "simple image load with quality" file you can notice a change in quality when setting the values to 0:
    PHP Code:
    loadListener.onLoadComplete = function(target_mc:MovieCliphttpStatus:Number):Void {
    target_mc._x=100
    target_mc
    ._quality "HIGH";//HIGH or LOW
    target_mc._highquality 2;//0 = low, 2 = HIGH

    For the "all 3 combined" it gets alittle complicated but you can simplify it by just staying at onFrame(2)
    PHP Code:
    pane_1.resize_no_scale(Stage.width,Stage.height)//Set the size for the fullscreen scrollpane that stores everything, it is also called when the stage is resized.
    //The rest of the lines were covered in the simple versions. 
    There is a scripting section that says "var css color", that section is just if you want to modify textformat styling for the scrollpane under the image.

    The "styles.css" that comes with the main all 3 combined version has a value for quality, padding-right, margin to separate image from scrollpane:
    HTML Code:
    .heading {
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    }
    .mainBody {
    color: #FF0000;
    text-align:right;
    font-size: 14px;
    margin:200;//Separate image from scrollpage.
    padding-right:0px;//Padding right when text align is right.
    quality:low;//Image quality for the jpgs.
    }

    This is the accessor for ContentScroller , I just had to paste it inside of my fullscreen scrollpane when its inside of the content movieclip:
    PHP Code:
    _root.pane_1.container.content.ContentScroller//Accessor for css scrollpane.
    _root.pane_1.container.content.ContentScroller.textArea._text.text="hello"//Would change the pane to say hello. 

    simple fullscreen scrollpane (swish)
    simple scrollpane with css (swish)
    simple image load with quality (swish)
    all 3 combined (swish)
    Last edited by AS3.0; 02-07-2023 at 06:22 PM.

  9. #29
    Senior Member
    Join Date
    May 2016
    Posts
    451
    can add option
    1- (blue scrool ._visible = true or false)
    2- transparent background

  10. #30
    Senior Member
    Join Date
    May 2016
    Posts
    451
    can you delete image url from settings file
    and add script in swishmax file load any image name like this ( *.jpg )

  11. #31
    Senior Member
    Join Date
    May 2016
    Posts
    451
    Can you add a main mc
    Root.main.scroll
    And add resize function to root
    It means scal all content in main mc when swf file resized

  12. #32
    Senior Member
    Join Date
    May 2016
    Posts
    451
    when i set font-size: 30px
    same problem,
    which is that the words are fragmented on the lines

  13. #33
    Senior Member
    Join Date
    May 2016
    Posts
    451
    simple image load with quality ==> great

    simple scrollpane with css ==> same problem,which is that the words are fragmented on the lines if font size changed ( I need this file very important)

  14. #34
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    Im working on the fullscreen scrollpane.

    But this should solve the fragmentation:

    download v3 (swish)

  15. #35
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    Fragmentation bug fix for css scrollpane simple:

    download v2 (swish)

  16. #36
    Senior Member
    Join Date
    May 2016
    Posts
    451
    can you solve simple scrollpane with css first please

  17. #37
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    Did you see post #35

    If you are using a big font you will want to put:
    PHP Code:
     _root.ContentScroller.vertScroll._x=0//Put the scrollpane in view. 
    Since ContentScroller doesn't use horizontal scrollpane we will have to use the custom fullscreen one I made.
    Last edited by AS3.0; 02-08-2023 at 04:43 PM.

  18. #38
    Senior Member
    Join Date
    May 2016
    Posts
    451

  19. #39
    Senior Member
    Join Date
    May 2016
    Posts
    451
    in simple scrollpane with css file

    then i select text ==> padding ++

  20. #40
    Senior Member
    Join Date
    May 2016
    Posts
    451
    in simple scrollpane with css file

    can you delete image url from settings file

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