Define Tweener in the document class

I have a movieclip on stage with instance name top_mc.

This is the code I want to apply to it:
Tweener.addTween(top_mc, {x:726, y:30, time:0.8, transition:“easeInOutCirc”, delay:0.1});

Can’t do it on stage! need to define it in the document class…

Can somewone give me the right code?

thanks

Assuming your code is on frame 1 of the timeline and your movieclip is on the stage with an instance name of top_mc it will work. Dont forget you need to import the Tweener class before it will work.

import caurina.transitions.Tweener;

No, I started writing the code for my movieclip in the main timeline and it worked good.
By when I started to write some code in the document class (fileReference…) the main timeline code can’t trigger the Movieclips anymore. so I want to learn how to define them in the Doc. Class. And I haven’t found a good tutorial so far…

thanks.

When you include a document class, it acts as the timeline. If your using a document class you should remove all code and movie clips from your main timeline.

Edit: Senocular has a good post about it: http://www.kirupa.com/forum/showpost.php?p=1950401&postcount=209

^ Not at all. Your document class behaves as the timeline and receives all of the timeline’s variables and children as a consequence.

My bad :smiley: