Hey guys. So I am trying to get my head around OOP these days. You know trying to keep up with the times. So i wrote this simple class
class buttonUI {
[COLOR=#000087]var[/COLOR] btnLabel:[COLOR=#000087]String[/COLOR];
[COLOR=#000087]var[/COLOR] page:[COLOR=#000087]String[/COLOR];
[COLOR=#000087]var[/COLOR] [COLOR=#000087]target[/COLOR]:[COLOR=#000087]MovieClip[/COLOR]
static [COLOR=#000087]function[/COLOR] loadPage (btnLabel, page, [COLOR=#000087]target[/COLOR]):Void {
btnLabel.[COLOR=#000087]text[/COLOR] = btnLabel;
[COLOR=#000087]target[/COLOR].[COLOR=#000087]loadMovie[/COLOR](page);
}
}
and in my flash movie I have a dynamic text field with an instance name
of btnLabel and an empty movie clip with an instance name of targetMC.
so in my flash file I use my class like this.
buttonUI.loadPage("[COLOR=blue]Name[/COLOR]", “[COLOR=blue]load.swf[/COLOR]”, targetMC);
the load.swf works and the targetMC works but the label wont change to Name.
here is the example. Al you will see is a black square cus that what it
loads but you will also notice that my text field doesnt change to
“Name”
http://www.creativescientist.com/OOP/test.html
Thanks for your help.
Rob