Jump to content
Search Community

Tween MC's inside another MC

muxa test
Moderator Tag

Recommended Posts

Hello,

 

i am new using Flash AS and i am facing problem requires experts help , i hope you dont mind provide me solution or hints

 

in AS2 i am trying to do the following :-

 

when clicking a button i will attach a MC dynamically inside another Main_MC

 

 

 

 

1)Attaching the dynamic MC named cipTemp inside the main Main_MC not at the root

 

_root.Main_MC.attachMovie("cipTemp","cip1",100000000);

 

// make the attached cip1 appear at x y

 

set("_root.Main_MC .cip" + 1 + "._x", eval("_root.Main_MC .Seat" + 1)._x);

 

set("_root.Main_MC .cip" + 1 + "._y", eval("_root.Main_MC .Seat" + 1)._y);

 

 

2) Then if want to move :-

 

A normal flash move will work without any problem :-

 

eval("_root.Main_MC.cip1")._y = 20;

eval("_root.Main_MC.cip1")._x = 20;

 

While greensock animation will not work any advice here will be highly appreciated i search all internet and forum but no change to find solution for my problem :)

 

com.greensock.TweenMax.to(eval("_root.Main_MC .cip1"),3,{bezier:[{_x:266, _y:262}, {_x:300, _y:345}], orientToBezier:true, ease:Back.easeOut}); // no working

 

or

 

com.greensock.TweenMax.to("_root.Main_MC.cip1",3,{bezier:[{_x:266, _y:262}, {_x:300, _y:345}], orientToBezier:true, ease:Back.easeOut}); // not working..

 

knowing that attaching to root directly :- _root.attachMovie("cipTemp","cip1",100000000); then move directly will work with greensock

 

Thank you very much.

Link to comment
Share on other sites

try

 

 

import com.greensock.*;

TweenMax.to(_root.Main_MC.cip1, 1, {_x:200})

 

you should also research using alternatives to set and eval

 

in AS2 you can just use

 

_root.Main_MC.cip1._x = 20

 

you don't need eval and set unless you are using AS1 i think.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...