Can someone help me attach a button movie clip to class?
[AS]
function Job(id) {
this.id = id;
this.jobName = _root.loginData[“btnJob”+id+"_name"];
this.jobID = _root.loginData[“btnJob”+id+"_id"]; // the job id for interaction w/ php
this.hasSales = _root.loginData[“btnJob”+id+"_hasSales"]; // if they’re an employee who processes sales
}
function JobButton(id) {
this.job = new Job(id);
}
JobButton.prototype = new MovieClip();
Object.registerClass(“movJobButton”, JobButton);
// this code lives in another clip…
for(x=0; x < _root.employee.numJobs; x++) {
_root[“jobButton”+(x+1)] = new _root.JobButton(x+1);
_root[“jobButton”+(x+1)].attachMovie(“jobButton”, “myJobButton”+(x+1), (x+1));
}
[/AS]
While debugging, I see that jobButton1 is:
Variable _level0.jobButton1 = [object #71, class ‘MovieClip’] {
job:[object #72, class ‘Job’] {
jobName:“Maintenance”,
jobID:“1”,
hasSales:“0”
}
}
but the movie clip isn’t showing up on the stage… I’m new at oop, anyone know what I’m doing wrong?
Thanks!