dcsimg
A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Help Please! XML news section

  1. #1
    Member
    Join Date
    Nov 2004
    Posts
    79

    Help Please! XML news section

    I am in need,

    Basically, I am doing a site which loads in multiple swfs.

    One of these swf is a news section created dynamically with XML.

    When I view this particular swf on its own , it works fine and all the text is displayed , however when I call on this swf from the main site its text does not display ....?

    I could really do with some help here..... anyone...please !

    I dont know if its something simple or what, but im a bit of a panic merchant.

    take pity on me !....

    suzi x

  2. #2
    OOP is one letter from OOPS kortex's Avatar
    Join Date
    Aug 2005
    Location
    New Hope, PA
    Posts
    2,668
    in the news swf in frame one fo actionscript layer place :
    _lockroot = true

    and recompile (publish) the news swf.
    Jeremy Wischusen
    Flash - Flex - LAMP - Web Developer Purple Inc
    AS OOP FAQ-Best Practices Thread | Flashkit OOP Tutorials | Purple Inc (day job) | Blog


  3. #3
    Member
    Join Date
    Nov 2004
    Posts
    79
    hey thanks for the reply Kortex !

    ok...

    i messed about with it a little bit and added your

    _lockroot = true

    to the news.swf.

    it seems now the text is showing but the ignore white space is no longer working, the news text is now displayed in a white box.

    this is the as on the news.swf :

    ////////////////////////////////////////////////////////////////////////////////

    _lockroot = true


    //init TextArea component
    myText.html = true;
    myText.wordWrap = true;
    myText.multiline = true;
    myText.label.condenseWhite=true;
    _level0.myText.depthChild0._alpha=0



    //load css
    kungFuStyle = new TextField.StyleSheet();
    kungFuStyle.load("kungfu.css");
    myText.styleSheet = kungFuStyle;

    //load in XML
    kungFuContent = new XML();
    kungFuContent.ignoreWhite = true;
    kungFuContent.load("kungfu.xml");
    kungFuContent.onLoad = function(success)
    {
    if(success)
    {
    myText.text = kungFuContent;
    }
    }


    ////////////////////////////////////////////////////////////////////////////////


    PLEASE NOTE that when I view this news.swf on its OWN everything is displayed fine, its only when I call on it from the mainsite.swf that i see it in a white box.

    not sure whats going on....

    any help would be greatly welcomed,

    suzi x

  4. #4
    OOP is one letter from OOPS kortex's Avatar
    Join Date
    Aug 2005
    Location
    New Hope, PA
    Posts
    2,668
    Wierd, that usually fixes it. Umm just as a guess try the following (and I am assuming all of this code is on the root timeline of the news swf?):

    Change:
    _lockroot = true

    to

    this._lockroot = true

    and change

    _level0.myText.depthChild0._alpha=0

    to

    __root.myText.depthChild0._alpha=0
    Jeremy Wischusen
    Flash - Flex - LAMP - Web Developer Purple Inc
    AS OOP FAQ-Best Practices Thread | Flashkit OOP Tutorials | Purple Inc (day job) | Blog


  5. #5
    Member
    Join Date
    Nov 2004
    Posts
    79
    hey thanks again,

    last night I managed to fix it.

    I deleted the "level0' in the following and it worked.

    changed

    _level0.myText.depthChild0._alpha=0

    to

    myText.depthChild0._alpha=0

    The only thing is now, I want to make the text which is loaded in from XML unselectable. At the moment whenever you press down on the scrollbar all the text is selected and goes black.

    do you know how I can disable this?

    again, thanks for the help !

    suzi x

  6. #6
    OOP is one letter from OOPS kortex's Avatar
    Join Date
    Aug 2005
    Location
    New Hope, PA
    Posts
    2,668
    myText.selectable = false
    Jeremy Wischusen
    Flash - Flex - LAMP - Web Developer Purple Inc
    AS OOP FAQ-Best Practices Thread | Flashkit OOP Tutorials | Purple Inc (day job) | Blog


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