Skip to main content
Inspiring
February 6, 2007
Answered

Class Problems

  • February 6, 2007
  • 1 reply
  • 148 views
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
This topic has been closed for replies.
Correct answer SymTsb
Managed to solve the problem in another way. Thank God for the Tween Class!

1 reply

SymTsbAuthorCorrect answer
Inspiring
February 7, 2007
Managed to solve the problem in another way. Thank God for the Tween Class!