A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: move on resize

  1. #1
    Junior Member
    Join Date
    Jun 2007
    Posts
    3

    move on resize

    Im using flash 8.

    I have an mc on the center on my screen. when i resize my movie i want this mc goes automatically to the center of my flash movie without resizing the movi itself... I mean, i want a movie clip always centerer in the swf even whe anyone use different monitor resolution.

    Thanks

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    Assuming the mc registration point is at 0,0, the center would be:

    mc._x = Stage.width/2 - mc._width/2; //same for _y

    if you put this in the onResize, it should update.

    gparis

  3. #3
    Junior Member
    Join Date
    Jun 2007
    Posts
    3

    Not what i wanted.

    Thanks a lot but it does not work the way i want

    The perfect example is here

    http://www.metropolis-media.com

    when you resize your browser window things always move to get alligned

    look at the "H" in the bottom left corner and resize the browser window.

    Thans

  4. #4
    \\___unPossible
    Join Date
    Jul 2004
    Posts
    188
    The site you referenced as an example doesn't have a full screen flash movie.
    They put the flash movie inside a div and made the CSS for the margins "auto"
    so the div with the flash inside it is what gets centered.
    Cause that's just who I am this week.

  5. #5
    Junior Member
    Join Date
    Jun 2007
    Posts
    3
    I posted the wrong url...it is:

    http://www.metropolis-media.com.pl

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