• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 307
  • Last Modified:

calling a function on the main timeline from a class file


when I try to call a function on the maintime line from a class file i get :

TypeError: Error #1006: redArrowAlpha is not a function.

the code is simple:

//blueArrow_select function is called from an addEventListener and works fine...

public function blueArrow_select(e:MouseEvent):void


then in the main time line a simple function...

function redArrowAlpha():void
                  TweenLite.to(redArrow, 5, { alpha:0, ease:Circ.easeOut});


  • 2
1 Solution
did you set up a Document class?
where how are you currently trying to access the function resulting in that error?
are you wanting to not use an event listener?
i've just done a quick mock up and it works fine so I think I dont' understand your problem.
I need you to verify what it is you're doing (code that calls redarrowalpha)
Hi nth1971,
You need to clarify what actions script language you are using.
If AS2 you may be out of scope in this case you may need to use Delegate class or _root instance or movieclip instance
If AS3 you may have problem by calling parent because is reference to systemManager. In this case try to call parentDocument or document or paren.parent
nth1971Author Commented:
oh my god, I must be a very tired boy...

its as3 and everything isset up fine I was simply not thinking instead of


it was


I'm such a dufus!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now