I am trying to change some properties of a movie that I have loaded into my main swf using the loadMovie command. I am applying the code to the instance of the movie clip that the movie is loaded into.
I can load the movie in no problem, but when I try to get to the manipulation part is where I am running into problems. I have been searching through previous posts here and was referring to this one:http://www.kirupa.com/forum/showthread.php?t=79640
for guidance in making certain that the clip is loaded before the script runs to (in this case) scale the clip.
Right now, once I apply the code it is not working and it is unloading an image that was previously loaded into the file. I have checked to make sure that I am not loading into the same level.
The loaded swf that I am trying to scale is the text that comes in that says “A Catholic Church Organization Serving the Church”
You can see the swf before I try to scale the clip
Here is the code before:
_root.createEmptyMovieClip(“text”, 12);
_root.text.loadMovie(“serving.swf”);
_root.text._x = 165;
_root.text._y = 350;
And the code after:
_root.createEmptyMovieClip(“text”, 12);
_root.loadMovie(“serving.swf”, text);
_root.text._x = 165;
_root.text._y = 350;
_root.onEnterFrame = function() {
if (_root.text.getBytesLoaded()>=_root.text.getBytesTotal()) {
MovieClip.prototype.grow = function(a,b) {
this._xscale += b;
this._yscale = this._xscale;
if (this._xscale>a-1 && this._xscale<a+1) {
delete this.onEnterFrame;
}
}
}
};
_root.text.onEnterFrame = function() {
this.grow(250,50);
}
If I should post the fla, please let me know.