Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9184495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:04:03+00:00 2026-06-17T19:04:03+00:00

I am using Flash Pro CS6. I have built a scrolling textfield which is

  • 0

I am using Flash Pro CS6. I have built a scrolling textfield which is injected with htmltext through XML.

The problem I am having is the maxScrollV doesn’t seem to take into account my images . I have tried to set the dimensions in the html <img src='assets/images/test.png' height='330' width='330' /> but this seems to throw out the wordwrap.

public class ScrollingTextField extends Sprite
{
    private var myText:TextField;
    private var myFormat:TextFormat;
    private var bounds:Rectangle;
    private var boundHeight:Number;
    private var slider:SliderImage;

    public function ScrollingTextField()
    {
        trace("ScrollingTextField added");
        myText = new TextField();
        myFormat = new TextFormat();
        slider = new SliderImage();

        myFormat.font = "Arial";
        myFormat.color = 0x333333;
        myFormat.size = 14;
        addChild(myText);

        myText.htmlText = "init";
        myText.setTextFormat(myFormat);
        myText.wordWrap = true;
        myText.multiline = true;
        myText.setTextFormat(myFormat);
        myText.selectable = false;

        this.addChild(slider);

        slider.addEventListener(MouseEvent.MOUSE_DOWN, dragSlider);
        addEventListener(Event.ENTER_FRAME, checkSlider);
    }

    private function dragSlider(evt:MouseEvent):void
    {
        slider.startDrag();
        slider.removeEventListener(MouseEvent.MOUSE_DOWN, dragSlider);
        slider.addEventListener(MouseEvent.MOUSE_UP, dropSlider);
        addEventListener(MouseEvent.MOUSE_MOVE,moveSlider);
    }

    private function dropSlider(evt:MouseEvent):void
    {
        slider.stopDrag();
        slider.removeEventListener(MouseEvent.MOUSE_UP, dropSlider);
        slider.addEventListener(MouseEvent.MOUSE_DOWN, dragSlider);
        removeEventListener(MouseEvent.MOUSE_MOVE,moveSlider);
    }

    private function moveSlider(evt:MouseEvent):void
    {
        evt.updateAfterEvent();
        if (evt.buttonDown)
        {
            slider.startDrag(false,bounds);
        }
        else
        {
            slider.stopDrag();
        }
    }

    private function checkSlider(evt:Event):void
    {
        myText.scrollV = ((slider.y - bounds.y)* (myText.maxScrollV)/boundHeight);
    }

    public function textToDisplay(txt:String):void
    {
        myText.htmlText = txt;
        myText.setTextFormat(myFormat);
    }

    public function setDimensions(w:Number, h:Number):void
    {
        boundHeight = h - slider.height;
        bounds = new Rectangle(w + 20,10,0,h - slider.height);
        slider.x = w + 20;
        slider.y = 10;
        myText.width = w;
        myText.height = h;
    }

    public function checkTextFieldSize():void
    {
        trace("numLines = " + myText.numLines);
        trace("text height = " + myText.textHeight);
        trace("height = " + myText.height);
        if (myText.textHeight < myText.height)
        {
            slider.visible = false;
        }
        else
        {
            slider.visible = true;
        }
    }

}

}

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T19:04:05+00:00Added an answer on June 17, 2026 at 7:04 pm

    Well, I ended up doing a cheap workaround. From scouring the net, it seems that .maxScrollV just doesn’t like .htmltext. I’ll take it to Adobe… in the meantime adding in <p>&nbsp;</p> to the html a load of times to act as the image space, seems to do the trick.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Flash CS5 and I have a problem with my exported SWF file:
I have a project in which we are using phpdocx pro to generate a
I'm simply playing around with basic ActionScript 3 using Flash CS3 Pro. I put
I'm creating a flex-based video player, using the FLVPlayback component (imported from Flash Pro
I'm using Flash Builder 4 Beta 2. I have it connecting to a PHP
I have an Actionscript project that I was building using Flash CS4. I embedded
(using flash) I have a Sprite object that I want to show on google
I'm using AMFPHP 1.9, ActionScript 3 and Adobe Flash Pro CS5 with Flash player
I have been using Flash Builder to build my flex software and I am
Currently am using an interactive flash map on my website, which displays different colors

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.