Answered
Class Problems
Hey everyone. I have my custom Image Reel class. The reel
builds a container for the reel itself etc etc down the line for
each object. Now I'm trying to get it to scroll and having a ton of
issues that don't quite make sense at all... After my panel is
created, the following code is called....
b = container_mc.irborder_mc.getBounds(_root);
trace(container_mc.reel_mc);
container_mc.reel_mc.onRollOver = panelOver;
trace(container_mc.reel_mc.onRollOver);
This results in the following output (which is correct)....
_level0.ireel_mc.reel_mc
[type Function]
The panelOver function is where things get weird....
private function panelOver() {
trace("START PANEL-OVER");
var poObj = this;
trace(poObj);
poObj.onEnterFrame = scrollPanel;
delete poObj.onRollOver;
trace(poObj.onEnterFrame);
trace(poObj.onRollOver);
trace("END PANEL-OVER");
}
results in the following output
START PANEL-OVER
_level0.ireel_mc.reel_mc
undefined
undefined
END PANEL-OVER
What the )&*(^*& is going on here? The first undefined is the problem. The second undefined I'd expect but may be off as a result of the issue causing the first to error out. If poObj refers to the reel mc that contains all of the thumbnails, why would assigning it an onEnterFrame and tracing that onEnterFrame result in undefined? This is probably an issue of scope but I just don't see it...
I really need to get this figured out in a bad way. Reaching deadlines for the 2nd design approval and have to have this working. Much thanks in advance.
Mike
b = container_mc.irborder_mc.getBounds(_root);
trace(container_mc.reel_mc);
container_mc.reel_mc.onRollOver = panelOver;
trace(container_mc.reel_mc.onRollOver);
This results in the following output (which is correct)....
_level0.ireel_mc.reel_mc
[type Function]
The panelOver function is where things get weird....
private function panelOver() {
trace("START PANEL-OVER");
var poObj = this;
trace(poObj);
poObj.onEnterFrame = scrollPanel;
delete poObj.onRollOver;
trace(poObj.onEnterFrame);
trace(poObj.onRollOver);
trace("END PANEL-OVER");
}
results in the following output
START PANEL-OVER
_level0.ireel_mc.reel_mc
undefined
undefined
END PANEL-OVER
What the )&*(^*& is going on here? The first undefined is the problem. The second undefined I'd expect but may be off as a result of the issue causing the first to error out. If poObj refers to the reel mc that contains all of the thumbnails, why would assigning it an onEnterFrame and tracing that onEnterFrame result in undefined? This is probably an issue of scope but I just don't see it...
I really need to get this figured out in a bad way. Reaching deadlines for the 2nd design approval and have to have this working. Much thanks in advance.
Mike