Skip to main content
sivacse24rep
Inspiring
February 20, 2014
Question

TypeError: Error #1009: Cannot access a property or method of a null object reference

  • February 20, 2014
  • 1 reply
  • 1163 views

Hi,

I have parent.swf which is load the a child.swf

I gave alreay gave few version of both swf to my clients. Now i am on the postion to update only the child.swf.

Now i want to add scroll panel on the child.swf.When i try to add that it shows error:

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/callLaterDispatcher()

    at flash.display::DisplayObjectContainer/addChild()

    at yume_survey_cs_as3_fla::MainTimeline/frame1()

The coding on child.swf is:


import fl.containers.ScrollPane;

var a:ScrollPane=new ScrollPane();

addChild(a);

with out any code change on parent.swf, i want to add this scrollPane on child which need to work fine with parent.How to do that?.

Thanks,

SIva

This topic has been closed for replies.

1 reply

Ned Murphy
Legend
February 20, 2014

That error reads as if you neglected to place a ScrollPane component in the library.  You need to have one available in the library in order for it to be loaded dynamically.

sivacse24rep
Inspiring
February 20, 2014

Yes i have the copy of ScrollPane component in my child.fla.

But on parent.fla the component is not there in library.And I am not allowed to place ScrollPane component in parent.fla.

All i have is to doing change with my child.fla only.

Thanks,

Siva

Amy Blankenship
Legend
February 20, 2014

I don't think you can solve this without recompiling the parent to place the child in a different applicaiton domain.