TypeError: Error #1009 for Tween Class

Hello, I'm trying to tween some movie clip object that I created with following code.
But I  get error like:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
      at fl.transitions::Tween/setPosition()
      at fl.transitions::Tween/set position()
      at fl.transitions::Tween()
      at main_fla::MainTimeline/frame10()
      at flash.display::MovieClip/gotoAndStop()
      at main_fla::MainTimeline/onComplete()

I checked movie_mc with trace(typeof(movie_mc)) = object.
But I'm getting the error and cannot find what the problem is.
Please someone help.
Thank you.
import fl.transitions.Tween;
import fl.transitions.easing.*;
var loadedTween:Tween = new Tween(movie_mc, "alpha", Regular.easeOut, 0, 1, 10, false);
// movie_mc movie clip contains some other movie clips

Open in new window

Who is Participating?
blue-genieConnect With a Mentor Commented:
your problem is in your setPosition() function. you're referencing something that doesn't exist yet.
Eaddy BarnesITCommented:

the snippet of code you provided works fine. you dont need line five for the code to run.
so could you provide a few more details as to what you were trying to do and did not succeed in doing?

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.

All Courses

From novice to tech pro — start learning today.