Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

Explorer ,
Feb 20, 2014 Feb 20, 2014

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

TOPICS
ActionScript
1.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 20, 2014 Feb 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 20, 2014 Feb 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Feb 20, 2014 Feb 20, 2014

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 21, 2014 Feb 21, 2014
LATEST

Yes i thought the same... but what is necessary both should fall on same application domain? I want the components to deal with child.swf only?

We able to write custom scroll bar component on child.swf with out consider application domain right? then why flash component failed?

is there any option to changes on "ScrollPane.as"? or let me know have any other custom component which should have the setSize function?

Also i suspect that same problem will comes on combo box flash component too ... if making custom component is the only solution,then let me know where could i get them for free?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines