A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: web browser html layout issues

  1. #1
    Junior Member
    Join Date
    Jun 2009
    Posts
    7

    web browser html layout issues

    I am working on a flash website. I'm using actionscript to calculate the stagewidth/2 to centre my content mc when the flash window is resized (this is working in flash player and browser). I also have a listener to set the position of the mc when the application starts (this only works in flash player).

    In short, when i open the swf in a web browser it doesn't work. In flash it does? any help would be much appreciated.

    link to html with flash embedded - http://www.maxisgraphic.com/ref/ref_testing1.html

  2. #2
    ___________________
    Join Date
    May 2004
    Posts
    3,174
    it appears to center fine...

  3. #3
    Junior Member
    Join Date
    Jun 2009
    Posts
    7
    Thanks for the reply. For me, when i open this in a web browser the centering doesn't work. Try making the browser window width smaller and then refreshing the page. is it still centered? what browser are you using? (i've been using firefox and safari).

  4. #4
    ___________________
    Join Date
    May 2004
    Posts
    3,174
    in FF, Safari, Chrome and IE the centering works on resize, but not onload (which is why it doesn't stay centered on refresh). Any easy fix is to dispatch a resize event onload
    PHP Code:
    stage.dispatchEvent(new Event("resize")); 

  5. #5
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    you might be cacheing either clear the browser cache or see if it works in a diffrent browser...sometimes after making changes i have to close all browser windows before the change takes affect..the .swf is cached.
    ~calmchess~

  6. #6
    Junior Member
    Join Date
    Jun 2009
    Posts
    7
    I think i sorted it. My set stage position function wasn't firing. Thanks for input.

Tags for this Thread

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