A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: can't see the forest for the trees (can't see whats wrong)

Hybrid View

  1. #1
    Senior Member
    Join Date
    Jul 2007
    Posts
    243

    can't see the forest for the trees (can't see whats wrong)

    im just trying to get CDATA to work and what i see as a perfectly normal piece of code
    PHP Code:
    <![CDATA[<a href ='http://www.google.co.uk>Google</a>]] 
    gives me this error
    TypeError: Error #1091: XML parser failure: Unterminated CDATA section.
    at WelcomePart_fla::MainTimeline/LoadXML()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()

    i dont see why it would be of any difference but i have applied a stylesheet to my xml within flash.
    can anybody see a problem?
    thanks
    Dan

  2. #2
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    missing quote ( ' ) in link
    missing closing tag ( > )

    <![CDATA[<a href ='http://www.google.co.uk'>Google</a>]]>
    Last edited by a_modified_dog; 03-07-2008 at 02:21 PM.

  3. #3
    Senior Member
    Join Date
    Jul 2007
    Posts
    243
    hmm.. thanks for that, but now when i load it in to flash it is blank where that link should be.
    any ideas why?

  4. #4
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    textfield is html enabled, yes ?

    PHP Code:
    this.createTextField("test",1,10,10,350,35);
    test.html = true;

    _xml = new XML();
    _xml.ignoreWhite = true;
    _xml.load("cdata.xml");

    /*--cdata.xml--

    <?xml version="1.0"?>
    <list> 
    CDATA[<a href ='http://www.google.co.uk'>Google</a>]]> 
    </list>

    */

    _xml.onLoad = function(){
    aNode = this.firstChild.firstChild.nodeValue;
    test.htmlText = aNode;
    };

  5. #5
    Senior Member
    Join Date
    Jul 2007
    Posts
    243
    yes bringing it in as myText.htmlText, using a textArea, although im using as3, and importing the xml file which contains the CDATA code.

    i am not using this code "test.html = true;" when i tried to bring it in it said
    Error #1056: Cannot create property html on fl.controls.TextArea.

    and a similar one when i used a dynamic textfield
    Last edited by danhodkinson; 03-07-2008 at 06:25 PM.

  6. #6
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    in cs3, can you set the html property of the TextArea component
    within the Components Parameters panel ? ( as in Flash 8 )

    if so, change the xml file to -
    PHP Code:
    <?xml version="1.0"?> 
    <list> 
    <a href ='http://www.google.co.uk'>Google</a> 
    </list>
    and the Flash file to -
    Code:
    _xml = new XML(); 
    _xml.ignoreWhite = true; 
    _xml.load("google.xml"); 
    
    _xml.onLoad = function(){ 
    aNode = this.firstChild.firstChild;
    myText.text = aNode; 
    };

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