I'm confused by a difference in the F7 and F8 compiler. When casting a
dynamically attached MovieClip, my code runs fine in F7 but not in F8. This
code compiles fine in F7 and F8 but when compiled from F8 (even when
targetting the F7 player) I cannot access the methods of the dynamically
attached MovieClip which is an instance of a class.
 I understood that casting was purely to fool the compiler into believing
the object in question was actually an instance of a specific class for type
checking purposes, but there seems to be something more going on here.
 Can anyone please explain to me what is going on?
 import MenuList;
 class MyClass {
 private var:MenuList = myList;
 public function init () : Void {
  // Cast attached movie to MenuList type
 myList = MenuList(attachMovie("MenuListLinkageID", "MenuList", 1));
}
 public function doSomething () : Void {
  // Compiler generates error if the object is not cast to MenuList when
attached
 myList.doSomeOtherThing();
 }
  }
 Thanks
 Clark Slater
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to