Troubles with tweens after changing mc._x property



  • 1. referring to variable contents
    how can i make actionscript use the variable contents instead of the variable name? for example, if i type duplicateMovieClip(circle, (_root.newname), 1); and have it adding one to the value of _root.newname each time, it can't copy it more than once because for some ungodly reason its decided to call them something other than the values of _root.newname (ie 1, 2 , 3 and so forth). i'm not sure how i can fix this, any suggestions would be greatly appreciated. -sm
  • 2. Basic flash to php email form
    Hi, i'm trying to use the POST method in flash to send two variables (the contents of two input fields) to a php script which can then send an email to me with the variables values. I've tried using the downloads/tutorials i found from google but i cant get any to work. I'm using mx 04 and php 4.3.9 i need help with both the actionscript and the php can anyone help?
  • 3. delay gotoAndStop() action
    Anyone know how I can delay my movie (for a certain amount of seconds) from playing an action? Thank you. F
  • 4. any text book for php and xml for flash
    Hi, Can anyone suggest me a good book for data base connectivity in Flash using PHP and XML? I hav eno clue about PHP and XML though. Thanks, kedar
  • 5. Ahhrrgg! LoadVars madness!! help?
    I am being driven mad by a seemingly simple problem. I have made a flash movie which loads data from a .txt file.... works fine...then I have a movie with input fields which using LoadVars sends the text which you type in to a php script which then writes the .txt file. With me so far? Now this all works fine until I move the files somewhere else...anywhere else actually..!!! There are no local paths and no logical reason this should happen.....!!!! Any ideas? Anyone else had this happen?? help please:confused;

Troubles with tweens after changing mc._x property

Postby artfabrique » Wed, 12 Apr 2006 02:00:34 GMT

I can't solve this problem:
 I have 100 frame movie.
 in the first frame AS is :

 //back_main - is a background movieclip with gradient
 //solarsys - is movieclip of preloader (with which I have troubles)

 var stageListener:Object = new Object();
 h = Stage.height;
 w = Stage.width;
 _root.back_main._height = h;
 _root.back_main._width = w;
 _root.solarsys._y = h/2;
 _root.solarsys._x = w/2;
 stageListener.onResize = function() {
 	h = Stage.height;
 	w = Stage.width;
 	_root.back_main._height = h;
 	_root.back_main._width = w;
 	_root.solarsys._y = h/2;
 	_root.solarsys._x = w/2;
 Stage.align = "TL";
 Stage.scaleMode = "noScale";

 and after this frame any motion tween whith the symbol solarsys doesn't work...
 even after simle AS line in the first frame:


 any timeline (not AS tween) tween with this movieclip doesn't work..

 here is the movie:
 As you can see after loading "gfx" all this dotted rounds must slowly fade... 
but it doest work..

Re: Troubles with tweens after changing mc._x property

Postby tralfaz » Wed, 12 Apr 2006 02:44:11 GMT

Make a holder movieclip.
Make a movieclip with your tween in it.
Place the tween clip inside the holder clip.
Move the holder clip or scale it or whatever.  don't ever change the properties of a tween directly with Actionscript or it will 
stop tweening.

Re: Troubles with tweens after changing mc._x property

Postby artfabrique » Wed, 12 Apr 2006 02:47:38 GMT

hey pholks!!!!!! ANSWER please!
 maybe some suggestions??? =)
 stupid problem but i cant solve it.. i don't know why =)) 
 What i've tryed to do:
 1) tryed to remove listener just before tween begins.
 2) tryed to make animation of fade of solarsys mc whith AS (but it's not so 
good lookin')
 3) now i'm trying to script tween with AS... =)
 4)2moro i wil recompile FleshPlayer to make it DO WHAT I SAY!!! =))))))))))))) 

Re: Troubles with tweens after changing mc._x property

Postby blemmo » Wed, 12 Apr 2006 02:53:27 GMT

3) now i'm trying to script tween with AS... =)
 That's what I wanted to recommend... Somewhere on this forum I read that it's 
sometimes problematic to change MC properties by both AS and timeline tweens in 
the Flash IDE. Might be that this is such a case. If it's possible to script 
the tween in AS, it should be worth a try.

 good luck,

Similar Threads:

1.trouble with for loop changing mc properties


I have 7 of mc's in a frame, each named box+number (box0, box1, box2,

I have the following script under the actions of this frame:

var BoxLoop;
for (var i=0; i<7; i++) {
	BoxLoop = "box" + i;
	_root.BoxLoop._visible = false;

In theory, the mc's should dissappear one by one when I export the
movie, but they don't.

Any clues? Thanks!

2.Set mc._x property value from an array

Im trying to import x and y points from a external file ("getDevices.txt") and 
use them to position a new MovieClip from the library in a loop.
 I know I could be using _root.attachMovie("box", "box_mc"+i, 110+i, 
{x:something, y:something});
 I've just been playing with this all day and tried many different methods, but 
still no luck. I think my problem may be in the setup of the array and not how 
its presented to _root["box_mc"+i]._y
 Because if I create a new array like ypos = new Array(20, 40); it worked

 The Actionscript code (Cant seem to find any tags, so I just used Quote)
 //get devices and loop through
 var mydevices:LoadVars = new LoadVars();
 var ypos = [];
 mydevices.onLoad = function() {
         for (i=0; i<2; i++) {
                 //ypos = new Array([this["y"+i]]); //How is this different as 
oppose to the next line?
                 _root.attachMovie("box", "box_mc"+i, 110+i);
                 _root["box_mc"+i]._y = (ypos);

 I get the values 400 and 200 in the output screen, but need help assinging 
them to the objects x and y position.

 This is the contents of the text file

 Any ideas? where are the AS tags in these forums?

3.Trouble using variable to get mc property

I'm creating a rollover effect for a collection of 12 mcs so that on mouseover 
the clip grows a little bit. This involves locating the x and y coordinates 
each clip, and to do so I've tried to farm the job out to a few variables and 
one function, so that the onRollOver event simply sets the variables and calls 
the function.

 It's not working. Flash seems to be implying that I can't use a variable 
(string type) to get a property -- ie. variable._x rather than myInstanceName._x

 Is this correct, or is my error elsewhere?
 Hope you can help.

 (By the way, there will of course be an onRollOut event as well. Just getting 
this bit to work first.)


 (Here's the code):

 var clipPositionx:Number = 0;
 var clipPositiony:Number = 0;
 var clipName:String = "";

 function rolloverClip() {
 	clipPositionx = clipName._x;
 	clipPositiony = clipName._y;
 	clipName._xscale = 110;
 	clipName._yscale = 110;
 	clipName._x = clipPositionx - 4;
 	clipName._y = clipPositiony - 4;

 claire_mc.useHandCursor = true;
 claire_mc.onRollOver = function() {
 	clipName = "claire_mc";

4._x & _y of mc relative to stage and not parent mc

Good Morning all,

 I?m trying to get the _x and _y of a movieclip relative to the stage where 
said movieclip is nested inside several others, which have been dynamically 

 I?m hoping there is an easy way to get this rather then taking the route of 
reverse engineering the position and rotation of each parent movieclip in order 
to calculate it.

 Thanks in advance


5.Controlling an mc timeline with a mc._x

6. Motion tween stopping when property is changed

7. Tween with changing alpha properties and motion

8. loop throug mc on stage and change properties?

Return to FLASH


Who is online

Users browsing this forum: No registered users and 95 guest