A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: centering problem

  1. #1
    Flash Honkie
    Join Date
    Nov 2001
    Location
    Athens, Ga
    Posts
    212

    centering problem

    Hey, i have a video player, and I load videos inside it.

    based on the height and width, I can center the video and everything works really well for 75% of the tim

    however, sometimes the top left corner of the image is the focal point rather than the center of the video. There's no patter in this and sometimes it happens to the same video when loaded twice. roughly 1 in 10, sometimes less sometimes more.

    Does anyone have any thoughts or ideas as to why this might happen?

    - jeremy
    "Creativity is a virtue; Happiness is a reward."

  2. #2
    Senior Member Computer Dork's Avatar
    Join Date
    Mar 2001
    Location
    St. Louis
    Posts
    1,026
    its because the default position in flash when you load mcA inside of mcB is to put mcA's center at the top left corner of mcB. When you load a movie into another movie, the 2nd movie overwrites the 1st's timeline, therefore reseting the centerpoint, and throwing off your alignment. I think the best way to fix this is to make all of your movies line up with the top left corner of them in the center of the clip, instead of centering everything. Hope this isnt too confusing.

  3. #3
    Flash Honkie
    Join Date
    Nov 2001
    Location
    Athens, Ga
    Posts
    212
    well, i understand what you're saying but that would then throw things off.

    the screen size is 320 by 240, but not all the videos are that size. Some of them are smaller and if I align with the top left, I leave empty space on the bottom and the right.

    I went through all of them, and it only seems to happen on about 1 out of twenty times which is an acceptable loss at this point.

    Thank you for your help.

    - Jeremy
    "Creativity is a virtue; Happiness is a reward."

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