Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 01-03-2010, 03:01 PM   #1
Registered User
Join Date: Mar 2009
Posts: 1
Default [AS3] Scrollbar and Error 1009


I am creating a webpage with a scrollbar and it throws me this error:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at fl.controls::TextArea/drawLayout()
at fl.controls::TextArea/draw()
at fl.core::UIComponent/callLaterDispatcher()

Code for the AS3 is following:

ActionScript Code:
import fl.controls.ScrollBar; import fl.events.ScrollEvent; var mc:RainbowMC = new RainbowMC(); mc.x = (this.stage.stageWidth/2)-(mc.width/2); mc.y = 100; var mcMask:MovieMaskMC = new MovieMaskMC(); mcMask.x = mc.x; mcMask.y = mc.y; mc.mask = mcMask; var sb:ScrollBar = new ScrollBar(); sb.x = mc.x + mc.width; sb.y = mc.y; sb.height = mcMask.height; sb.enabled = true; sb.setScrollProperties(mcMask.height, 0, (mc.height-mcMask.height)); sb.addEventListener(ScrollEvent.SCROLL, scrollMC); this.addChild(mc); this.addChild(mcMask); this.addChild(sb); function scrollMC(event:ScrollEvent):void{     mc.y = -event.position + mcMask.y; }

I have tried to look for a solution for a long time but have not found it yet, hopefully some of you could help me!
When I publish it in my computer, it works without errors, but on the server it throws this error!
I am using adobe flash CS4

Thank you in advance!
muraqib is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT. The time now is 06:31 PM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.