dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: HTML Text in Flash code

  1. #1
    Junior Member
    Join Date
    Nov 2010
    Posts
    1

    HTML Text in Flash code

    Hi

    I am trying to create a flash text field which is html formatted using the code to link to a text file already containing html formatted text. Both these files have been saved in the same folder on my hard drive.

    Having created a text field on my stage (on one layer) with an instance name of myText_txt I have entered this into the actionscript (on the layer above):

    var loader:URLLoader=new URLLoader(new URLRequest("profile_Text"));
    loader.addEventListener(Event.COMPLETE, completeHandler);

    function completeHandler(event:Event):void{
    var loadedText:URLLoader=URLLoader(event.target);
    myText_txt.htmlText=loadedText.data;
    }

    When I test the movie I get this message in the output:

    Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: file:///L:ackup data 09-04-2010Hayes Design SolutionsNichDesignArchitectsNich WebsiteFlash Filesprofile_Text
    at texttest1_fla::MainTimeline/frame1()

    I have tryed moving both files to the desktop but this hasnt worked.

    Can somebody please help? Flash is crushing my will to live

  2. #2
    flash grasshopper
    Join Date
    Feb 2005
    Posts
    156
    Well you definitely need a file extension for "profile_Text". I'm not good enough at AS 3.0 to see off the top of my head whether there are other problems with your code, but give that a go first.

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