Welcome, Guest. Please login or register.
Did you miss your activation email?
05/22/12, 19:00
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  General
| |-+  Flash and AS 3 (Moderators: papachan, kofi addaquay)
| | |-+  Handle stage reference of the scrollpane component
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: Handle stage reference of the scrollpane component  (Read 143 times)
Govinda
Mods
Systems Administrator
*****
Posts: 510

If You Want To Be Big Then Solve Big Problems


View Profile WWW Email
« on: 02/03/12, 04:53 »

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.
Logged

.: Govinda :.
Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14600


View Profile
« Reply #1 on: 02/06/12, 10:01 »

Use event.ADDED TO STAGE to have a reference

Jorge
Logged

Pages: [1] Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
anything