# Argh! onLoad! AS2.0 (flash-lite 2.1)

**URL:** https://forum.kirupa.com/t/argh-onload-as2-0-flash-lite-2-1/246973
**Category:** flash
**Created:** [December 17, 2007, 12:32pm UTC](https://forum.kirupa.com/t/argh-onload-as2-0-flash-lite-2-1/246973 "2007-12-17T12:32:01Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![grandpaw\_broon](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/grandpaw_broon/32/3985_2.png) [@grandpaw\_broon](https://forum.kirupa.com/u/grandpaw_broon)
#### Post date: [December 17, 2007, 12:32pm UTC](https://forum.kirupa.com/t/argh-onload-as2-0-flash-lite-2-1/246973/1 "2007-12-17T12:32:01Z")

</div>

Hey there!

I am having an issue with regards to fetching XML from bbc news.

Check this:

```auto
import mx.utils.Delegate;

class Application {
    
    private var canvas_mc:MovieClip;
    private var news_xml:XML;
    
    public function Application (mc:MovieClip)
    {
        canvas_mc = mc;

        fetchURL();
    }
    
    private function fetchURL(): Void
    {
        news_xml = new XML();
        news_xml.ignoreWhite = true;
        
        var appScope:Application = this;
        
        news_xml.onLoad = function (success)
        {
            trace(news_xml);
        }
        
        news_xml.load("http://news.bbc.co.uk/mobile/bbc_news/scotland/rss10.xml");
    }
    
}

```

Why is it that the trace of (news\_xml) is never shown?

I know the data has loaded correctly but trace does not fire. If you change the code to:

```auto
import mx.utils.Delegate;

class Application {
    
    private var canvas_mc:MovieClip;
    private var news_xml:XML;
    
    public function Application (mc:MovieClip)
    {
        canvas_mc = mc;

        fetchURL();
    }
    
    private function fetchURL(): Void
    {
        news_xml = new XML();
        news_xml.ignoreWhite = true;
        
        var appScope:Application = this;
        
        news_xml.onLoad = function (success)
        {
            **trace("hi");**
        }
        
        news_xml.load("http://news.bbc.co.uk/mobile/bbc_news/scotland/rss10.xml");
    }
    
}

```

Then “hi” is shown in the trace window… therefor… does anyone know why my news\_xml remains blank?

Thanks 😃
