Welcome to Dream.In.Code
Getting Help is Easy!

Join 109,296 Programmers for FREE! Ask your question and get quick answers from experts. There are 1,235 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



Quick question about Stage

 
Reply to this topicStart new topic

Quick question about Stage

brandon_v
post 7 Jun, 2008 - 08:19 PM
Post #1


New D.I.C Head

*
Joined: 29 May, 2008
Posts: 14


My Contributions


Is it possible to resize the stage via Document Properties -> Size, and having the orientation point in the center, instead of the top left?
I want to resize it so that it crops from all sides, instead of the bottom and right. That way, I won't have to move everything.
User is online!Profile CardPM

Go to the top of the page


BetaWar
post 7 Jun, 2008 - 09:52 PM
Post #2


#include <soul.h>

Group Icon
Joined: 7 Sep, 2006
Posts: 1,235



Thanked 38 times

Dream Kudos: 775
My Contributions


If you are wanting to simply crop the sides put everything in a movieclip and enable the "Use runtime bitmap caching" checkbox (visible on the bottom right when you have a movieclip selected).

Sadly I don't believe there is any way to get things to go with a position from the middle by default. It always starts at the top left begin (0, 0). One thing you could do is try adding some code (something like that posted below) and see if you can get ti to tie into all the movieclips and other content automatically without you having to work at it.

CODE

var s_height = Stage.height;
var s_width = Stage.width;

//tie in positioning to something like so:
n_x = s_height-(s_width/2);
n_y = s_width-(s_width/2);


The above code basically sets it sow that n_x and n_y are 0 in the middle of the stage. Then you just have to place all other items relevent to n_x and n_y to have a standard graph layout.

If that is more than you want to do with code you could always just create a blank movieclip that you place in the center of your stage, that way (0, 0) is in the center of the stage (relevent to the movieclip) and you can place everything else inside the movieclip to make it easy to use adn have the standard graph layout again.

Hope that helps.
User is online!Profile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 9/6/08 09:33AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month