A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: symbol anchor point to Stage?

  1. #1
    Junior Member
    Join Date
    Aug 2011
    Posts
    10

    symbol anchor point to Stage?

    Is there a better way to have a symbol's anchor point default to the size of the stage? I'm having Huge problems because if two symbols are different sizes then I can't tell two objects to be in the same location.

    The workaround seems terrible.

    I have a guide layer for stage bounds. I'd have to duplicate that, add that to the objects that I'm going to want to convert to a symbol first, then remove it after it's converted.

    Is there anyway to automate any of that? That just seems like a terrible task to repeat over and over.

    I suppose one option is to have a blank symbol that is the correct size already, duplicate that in the library, rename it, put that on the stage, then put your objects in there. Wow, I'm not sure if that's better or worse!

    This can't be the right answer. What am I missing?

  2. #2
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    I'm not really sure what you want, but to find the coordinates for the center of the stage, use this:

    Actionscript Code:
    this._x = Stage.width/2;
    this._y = Stage.height/2;

    Stage.width and Stage.height finds the dimensions of your Flash movie (and the coordinates would be the Bottom-Right corner), and by dividing them by two, you can find the center of the stage. Is that what you want?
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center