Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Dynamic text Scroll Box

New Here ,
Mar 01, 2017 Mar 01, 2017

Hi Im new on this forum so apologies if this has been covered before.

Im using flash CS6 and AS3.

I have a  1 frame test that loads XML into a Dynamic text multiline box. The text box is set as HTML. I have added a UIScrollBar to scroll the text.

My issue is when I -  Control > Test Movie > In Flash Professional everything works fine

When i - Control > Test Movie > In Browser the text fails to load and the scroll bar is useless.

Below is the AS and on the page is a txt box call about_txt and in the xml file there are <mcgtxt> tags.

var xml:XML;

var req:URLRequest = new URLRequest("PDHXML.xml");

var loader:URLLoader = new URLLoader();

function dataLoaded(event:Event):void

{

  xml = new XML(loader.data);

  about_txt.htmlText = xml.mcgtxt;

}

loader.addEventListener(Event.COMPLETE, dataLoaded);

loader.load(req);

I have looked round the web for possible solutions and not sure if Dynamic txt and UIScrollBar was never going to work or the xml file is not being loaded when previewed in the browser event though its in the same folder as the html/swf files.

I have used xml as the user will edit the xml to change txt but more importantly change hyperlink destinations contained in the text.

Any help will be appreciated.

TOPICS
ActionScript
862
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Mar 01, 2017 Mar 01, 2017

apply validateNow() to your scrollbar instance after htmlText is assigned in dataLoaded()

Translate
Community Expert ,
Mar 01, 2017 Mar 01, 2017

attach a screenshot of the directory that contains your swf and embedding html on your server.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 01, 2017 Mar 01, 2017

Screen Shot as requestedScreen Shot 2017-03-01 at 14.56.12.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 01, 2017 Mar 01, 2017

show the files on your server, not on you local computer.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 01, 2017 Mar 01, 2017

Hi

Screen shot attached - 1 server files - 2 resulting page - the text does load from xml just the scroll bar that does not work (there is enough txt to force the scrollbar)

Screen Shot 2017-03-01 at 15.38.20.png

Screen Shot 2017-03-01 at 15.39.46.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 01, 2017 Mar 01, 2017

apply validateNow() to your scrollbar instance after htmlText is assigned in dataLoaded()

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 01, 2017 Mar 01, 2017

Many Thanks for your help - worked well. Thanks

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 01, 2017 Mar 01, 2017
LATEST

you're welcome.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines