# Using the onLoad event with the movie

**URL:** <https://forum.kirupa.com/t/using-the-onload-event-with-the-movie/253652>\
**Category:** flash\
**Created:** [March 3, 2008, 9:05pm UTC](https://forum.kirupa.com/t/using-the-onload-event-with-the-movie/253652 "2008-03-03T21:05:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![uncle\_phil](https://avatars.discourse-cdn.com/v4/letter/u/8baadc/32.png) [@uncle\_phil](https://forum.kirupa.com/u/uncle_phil)\
**Post date:** [March 3, 2008, 9:05pm UTC](https://forum.kirupa.com/t/using-the-onload-event-with-the-movie/253652/1 "2008-03-03T21:05:47Z")

</div>

I have a function that’s supposed to run when the XML is done loading:

function startUp(){  
mens\_button\_box.\_visible = true;  
womens\_button\_box.\_visible = false;  
loadThumbs();  
var bigpic = seesection.firstChild.firstChild.childNodes[0].attributes.fullsize;  
var thetext = seesection.firstChild.firstChild.childNodes[0].attributes.textfile;  
loadText = new LoadVars();  
loadText.load(thetext);  
loadText.onLoad = function(success) {  
if (success) {  
// trace(success);  
specs.html = true;  
specs.antiAliasType = “advanced”;  
specs.htmlText = this.casualtext;  
}  
};  
fullsize.fullsize\_holder.loadMovie(bigpic);  
}

but I realized that it also can’t be run until the whole movie is done loading because of another function that it’s calling…but i don’t know how to reference the movie class itself to use onLoad with it. Is it just “var mymovie = new Movie();” ? Can someone tell me how to do that? thanks alot!
