Welcome, Guest
  • Author Topic: Handle stage reference of the scrollpane component  (Read 615 times)

    Govinda

    • Mods
    • Systems Administrator
    • *****
    • Posts: 510
    • If You Want To Be Big Then Solve Big Problems
      • View Profile
      • Mitr Learning & Media
      • Email
    I have created a XML driven shell where I'm calling external SWF files reading from the XML. Some of the SWFs has SCROLLPANE from the component panel of Flash is added on their respective stages. Now if I'm running those files individually, they are working fine. But it is loaded in the shell the below issue is coming.

    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at fl.containers::ScrollPane/setScrollDrag()
    at fl.containers::ScrollPane/draw()
    at fl.core::UIComponent/drawNow()
    at fl.containers::BaseScrollPane/get maxVerticalScrollPosition()
    at com.components::TableComp/resetAll()
    at com.components::TableComp()
    at TableComponent()
    at flash.display::Sprite/constructChildren()
    at flash.display::Sprite()
    at flash.display::MovieClip()
    at com::Main()


    The problem I believe is with the stage reference used by the component. I usually use a Model class to handle the stage reference. But I'm unable to handle the stage reference of the component. Please help.
    .: Govinda :.

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: Handle stage reference of the scrollpane component
    « Reply #1 on: 02/06/12, 10:01 »
    Use event.ADDED TO STAGE to have a reference

    Jorge