On 8/23/06, Ian Thomas <[EMAIL PROTECTED]> wrote:
Hi Chris,
  Having had a trawl through the source code, I see what you're
getting at. The fact that MovieAsset doesn't extend MovieClip is
nothing to do with the problem; MovieAsset wraps a MovieClip property
and passes that back, and that should be fine.

  I've no idea where it's going wrong, I'm afraid - the code all looks
sane and clean to me. Did you say you're only getting this issue from
MTASC compiled .swfs..?

Ian


Hi Ian,

Thanks for looking into this.

I did indeed try running it with Flash compiling. Try this in an FLA
and you should see the same results:

import org.osflash.fling.util.assets.MovieAsset;

MovieAsset.setHideWhenLoaded(true);
var asset:MovieAsset = new MovieAsset();
asset.addEventListener(AssetLoader.ASSETLOADCOMPLETE,
Delegate.create(this, handleAssetComplete));
asset.addEventListener(AssetLoader.ASSETLOADPROGRESS,
Delegate.create(this, handleAssetProgress));
asset.addEventListener(AssetLoader.ASSETLOADERROR,
Delegate.create(this, handleAssetError));
asset.setName("testMovie");
asset.setAutoCreateContainer(true);
var mc:MovieClip = _level0.createEmptyMovieClip("testHolder_mc",
_level0.getNextHighestDepth());
asset.setTarget(mc);
asset.setSource("testassets/test.swf");
asset.load();


function handleAssetComplete(eventObj:Object):Void
{       
        trace("loaded");
        trace("Movie: " + asset.getResource());

        var movie:MovieClip = MovieClip(asset.getResource());
        movie._visible = true;
}

function handleAssetProgress(eventObj:Object):Void
{
        trace("bytesLoaded: " + eventObj.loadedBytes + " totalBytes: " +
eventObj.totalBytes + " for " + eventObj.assetName);
}

function handleAssetError(eventObj:Object) :Void
{
        trace (eventObj.message);
}
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to