Scroll List Update

Posted 6/23/2006 2:16 PM by sleekdigital | Categories: Flash

Today I found a minor problem with my Scroll List (ListBox Alternative) code.  The getScrollPaneRef method would not return a reference to the scroll pane if you used the Macromedia V2 scrollpane component.  This went on unnoticed because I have been using the Metaliq MCOM scrollpane.


Right away I noticed that I forgot to change some code in my ScrollPaneMM adapter class.  But when I fixed that, it still didn't work ?#$%$?  The problem turned out to be due to my use of Interfaces and then trying to use "instanceof"....

if (sp instanceof IScrollPaneAdaptor) {
   return IScrollPaneAdaptor(sp).getScrollPaneRef();
  } else {
   return sp;
  }

Where IScrollPaneAdaptor is an interface and sp is an instance of a class that implements IScrollPaneAdaptor

This works fine when publishing to Flash 7 or 8, but not for Flash 6.  The live docs say that interfaces are supported in Flash 6, but I suspect there are some small issues.

At any rate, I changed the logic to no longer rely on instance of and uploaded the modified code.  The changes are in ScrollList.as and ScrollPaneMM.as.

Download

Comments:

Post your comments:

Anti-spam Key
Please Type in the letters shown above (this helps prevent spam):

Name:

URL (Optional):


Your Comments:

Search



www This site

Blog Topics

Skip Navigation Links.