Return to Starling Playback Library

Possible bug with repositioning nested movieclips

Questions related to Starling playback library should be asked here.

Possible bug with repositioning nested movieclips

Postby derek.lawrence » March 31st, 2015, 2:11 pm

It appears as the x and y value for GafMovieClips nested inside of other gaf movieclips are (0,0) but when I attempt to reposition it If I go mc.x += 5; and mc2.x += 5 even though the 2 movieclips are not in the same position they will always end up in the same position in this attempt. Is there any way to get the proper coordinates for the movieclip so I can change their position based on their current position.
User avatar
derek.lawrence
 
Posts: 12
Joined: September 29th, 2014, 3:25 pm

Re: Possible bug with repositioning nested movieclips

Postby vadym.mitin » April 1st, 2015, 1:54 am

You can get/set correct x/y/rotation/scaleX/scaleY/skewX/skewY only through transform matrix like this:
Code: Select all
mc.transformationMatrix.tx += 5;
mc.transformationMatrix.ty += 5;


The values x/y/rotation/scaleX/scaleY/skewX/skewY of the display object are not updated to decrease the number of the executed operations during playback (we update only transform matrix). In order to force the update please execute the following code before access to the properties:
Code: Select all
mc.transformationMatrix = mc.transformationMatrix;
mc.x += 5;
User avatar
vadym.mitin
 
Posts: 254
Joined: December 4th, 2013, 8:00 am

Re: Possible bug with repositioning nested movieclips

Postby Sergei Sorokin » April 1st, 2015, 2:11 am

Keep in mind that you can change position for mc inside 1 frame timeline, in other situations your changes will be overided in next animation frame. Also you can stop animation and change properties for inner movieClips.
User avatar
Sergei Sorokin
 
Posts: 39
Joined: December 18th, 2013, 11:46 am

Return to Starling Playback Library

Who is online

Users browsing this forum: No registered users and 3 guests