1 Reply Latest reply on Mar 18, 2009 8:18 AM by Webshark2000

    Rotation not working when SWF is loaded in html

    Webshark2000 Level 1
      I created a clock with an hour, minutes and seconds hand. The clock movieclip has two frames to it and on the first frame, the following code:

      seconds = _global.clockTime*6;
      minutes = (_global.clockTime/60)*6;
      hours = ((_global.clockTime*30)/3600) + 120;

      sec._rotation=seconds; // giving rotation property
      min._rotation=minutes; // giving rotation property
      hour._rotation=hours; // giving rotation property

      _global.clockTime += .41; //sets how fast the clock goes

      with "hour" being the instance name of the hours hand, "min" being the instance name of the minutes hand and "sec" being the instance name of the seconds hand. _global.clockTime is just a variable that I use to start the clock off at a specific time. Just to make it clear, this clock isn't supposed to run in real time (it's actually accelerated).

      Everything works perfectly fine when I export the swf and test it out from Flash, but as soon as I publish it and try running the swf from within an html file, the seconds hand it just frozen and doesn't rotate at all. The hours and minutes hands still work fine, just not seconds.

      Does anyone know why this would be?