22 Replies Latest reply on Jun 8, 2009 2:49 PM by kglad

    html file

    mlbe8

      hi i have created an animation and when saved in notepad as an html file everything looks as it should when previewed in any browser, however when i paste the code into my site via dreamweaver the animation dose not appear.

        • 1. Re: html file
          kglad Adobe Community Professional & MVP

          you're not including all the code needed to embed your swf.  in particular, you probably need a js file AC_RunActiveContent.js in the same directory as your html file.

          • 2. Re: html file
            mlbe8 Level 1

            But how come it appears fine through a .html saved in a simple notepad.

            • 3. Re: html file
              kglad Adobe Community Professional & MVP

              because everything needed is in that html file and/or available in that file's directory.

              • 4. Re: html file
                mlbe8 Level 1

                so do i paste the code into dreamweaver, then what?

                • 5. Re: html file
                  kglad Adobe Community Professional & MVP

                  i've not used dreamweaver for many years when i saw no point to using it.  (and i still see no point in using it except for use by designers that are not comfortable with html code.)

                  • 6. Re: html file
                    Ned Murphy Adobe Community Professional & MVP

                    -You should be able to load the notepad file to the server.  You just need to be sure you also load all of the supporting files with it, primarily the swf file.  That may also include the js file that kGlad mentioned.  If you show your embedding code for the Flash that you have in the html file, it may help resolve what might be missing.

                    • 7. Re: html file
                      mlbe8 Level 1

                      I dont have Adobe Flash I created this annimation on notepad using HTML code, so I dont have any other files only the one named clock.html.  I thought it was just a case of pasting the code into my Dreamweaver page for the annimation to appear. Is it possibe for me to attatch the html file so you can look at the code.

                      • 8. Re: html file
                        mlbe8 Level 1

                        hi I have attatched the annimation clock.html, this was done in notepad so im unsure how to get this working in dreamweaver.

                        • 9. Re: html file
                          kglad Adobe Community Professional & MVP

                          so, you have no swf file and you're not using flash?  and you're posting to this forum because..., why?

                          • 10. Re: html file
                            mlbe8 Level 1

                            I am posting here because flash is used to make annimation, only i done it through code but regardless I thought here I would find someone with the experience of dealing with Images. 

                            • 11. Re: html file
                              kglad Adobe Community Professional & MVP

                              you made animation using flash but that's not in a swf file?  you made image files?

                              • 12. Re: html file
                                Ned Murphy Adobe Community Professional & MVP

                                I'm really curious to see what this html code looks like, but unfortunately your file isn't uploaded.  If you could just show the code in a posting that might help.

                                • 13. Re: html file
                                  mlbe8 Level 1

                                   

                                   

                                  dCol='#006231';//date colour.

                                  fCol='#CA0065';//face colour.

                                  sCol='#F3400C';//seconds colour.

                                  mCol='#620062';//minutes colour.

                                  hCol='#620062';//hours colour.

                                  cCol='#008040';//centre point colour.

                                   

                                  ClockHeight=35;

                                  ClockWidth=35;

                                   

                                  d=new Array("SUNDAY","MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY");

                                  m=new Array("JANUARY","FEBRUARY","MARCH","APRIL","MAY","JUNE","JULY","AUGUST","SEPTEMBER","OCTO BER","NOVEMBER","DECEMBER");

                                   

                                  date=new Date();

                                  day=date.getDate();

                                  year=date.getYear();

                                  if (year < 2000) year=year+1900;

                                  TodaysDate=" "d" "day" "m" "+year;

                                  D=TodaysDate.split('');

                                   

                                  H=3;

                                  M=4;

                                  S=5;

                                   

                                  Face='1 2 3 4 5 6 7 8 9 10 11 12';

                                  font='Arial';//Best found for this script.

                                  size=1;

                                   

                                  var n4=(document.layers);

                                  var n6=(document.getElementById&&!document.all);

                                  var ie=(document.all);

                                  var O=(navigator.appName.indexOf("Opera") != -1)?true:false;

                                  var _d=(n4||ie)?'document.':'document.getElementById("';

                                  var _a=(n4||n6)?'':'all.';

                                  var _n6r=(n6)?'")':'';

                                  var _s=(n4)?'':'.style';

                                   

                                  Face=Face.split(' ');

                                  n=Face.length;

                                  a=size*10;

                                   

                                  props="<font face="font" size="size" color="fCol">";

                                  props2="<font face="font" size="size" color="dCol">";

                                  Split=360/n;

                                  Dsplit=360/D.length;

                                  HandHeight=ClockHeight/4.5

                                  HandWidth=ClockWidth/4.5

                                  HandY=6;

                                  HandX=6;

                                  scrll=0;

                                  Y=0;

                                  X=0;

                                   

                                  if (n4){

                                  for (i=0; i < D.length; i++)

                                  document.write('<layer name="Date'i'" top=0 left=0 height=15 width=15>

                                  'props2D++'</font></center></layer>');

                                  for (i=0; i < n; i++)

                                  document.write('<layer name="Face'i'" top=0 left=0 height=15 width=15>

                                  'propsFace++'</font></center></layer>');

                                  for (i=0; i < S; i++)

                                  document.write('<layer name=Seconds'i' top=0 left=0 bgcolor='sCol' clip="0,0,2,2"></layer>');

                                  for (i=0; i < M; i++)

                                  document.write('<layer name=Minutes'i' top=0 left=0 bgcolor='mCol' clip="0,0,2,2"></layer>');

                                  for (i=0; i < H; i++)

                                  document.write('<layer name=Hours'i' top=0 left=0 bgcolor='hCol' clip="0,0,2,2"></layer>');

                                  }

                                  else{

                                  for (i=0; i < D.length; i++)

                                  document.write('<div id="Date'i'" style="position:absolute;top:0px;left:0;width:15px;height:15px;text-align:center">'props2D++'</B></font></div>');

                                  for (i=0; i < n; i++)

                                  document.write('<div id="Face'i'" style="position:absolute;top:0px;left:0;width:15px;height:15px;text-align:center">'propsFace++'</B></font></div>');

                                  for (i=0; i < H; i++)

                                  document.write('<div id="Hours'i'" style="position:absolute;top:0px;left:0;width:2px;height:2px;font-size:2px;background:'hCol'"></div>');

                                  for (i=0; i < M; i++)

                                  document.write('<div id="Minutes'i'" style="position:absolute;top:0px;left:0;width:2px;height:2px;font-size:2px;background:'mCol'"></div>');

                                  for (i=0; i < S; i++)

                                  document.write('<div id="Seconds'i'" style="position:absolute;top:0px;left:0;width:2px;height:2px;font-size:2px;background:'sCol'"></div>');

                                  }

                                   

                                  (n4)?document.layers["Seconds"0].bgColor=cCol:document.getElementById("Seconds"0).style.background=cCol;

                                   

                                  function ClockAndAssign(){

                                  if (n4||n6||O){

                                  Y=window.pageYOffset+window.innerHeight-90;

                                  X=window.pageXOffset+window.innerWidth-100;

                                  }

                                  if (ie){

                                  Y=document.body.scrollTop+window.document.body.clientHeight-90;

                                  X=document.body.scrollLeft+window.document.body.clientWidth-90;

                                  }

                                  time = new Date ();

                                  secs = time.getSeconds();

                                  sec = -1.57 + Math.PI * secs/30;

                                  mins = time.getMinutes();

                                  min = -1.57 + Math.PI * mins/30;

                                  hr = time.getHours();

                                  hrs = -1.575 + Math.PI * hr/6+Math.PI*parseInt(time.getMinutes())/360;

                                   

                                  for (i=0; i < n; i++){

                                   var F=eval(_d_a"Face"i_n6r+_s);

                                   F.top=Y + ClockHeightMath.sin(-1.0471 + iSplit*Math.PI/180);

                                   F.left=X + ClockWidthMath.cos(-1.0471 + iSplit*Math.PI/180);

                                   }

                                  for (i=0; i < H; i++){

                                   var HL=eval(_d_a"Hours"i_n6r+_s);

                                   HL.top=YHandY(iHandHeight)Math.sin(hrs);

                                   HL.left=XHandX(iHandWidth)Math.cos(hrs);

                                   }

                                  for (i=0; i < M; i++){

                                   var ML=eval(_d_a"Minutes"i_n6r+_s);

                                   ML.top=YHandY(iHandHeight)Math.sin(min);

                                   ML.left=XHandX(iHandWidth)Math.cos(min);

                                   }

                                  for (i=0; i < S; i++){

                                   var SL=eval(_d_a"Seconds"i_n6r+_s);

                                   SL.top=YHandY(iHandHeight)Math.sin(sec);

                                   SL.left=XHandX(iHandWidth)Math.cos(sec);

                                   }

                                  for (i=0; i < D.length; i++){       

                                   var DL=eval(_d_a"Date"i_n6r+_s);

                                   DL.top=Y + ClockHeight1.5Math.sin(-sec+iDsplitMath.PI/180);

                                   DL.left=X + ClockWidth1.5Math.cos(-sec+iDsplitMath.PI/180);

                                   }

                                  setTimeout('ClockAndAssign()',50);

                                  }

                                  if (n4||ie||n6||O)window.onload=ClockAndAssign;

                                  //-->

                                  </script>

                                  </body>

                                  </html

                                  • 14. Re: html file
                                    kglad Adobe Community Professional & MVP

                                    all your html failed to paste.  retry.

                                    • 15. Re: html file
                                      mlbe8 Level 1

                                      be better to send to an email address, here it is again

                                       

                                       

                                      dCol='#006231';//date colour.

                                      fCol='#CA0065';//face colour.

                                      sCol='#F3400C';//seconds colour.

                                      mCol='#620062';//minutes colour.

                                      hCol='#620062';//hours colour.

                                      cCol='#008040';//centre point colour.

                                       

                                      ClockHeight=35;

                                      ClockWidth=35;

                                       

                                      d=new Array("SUNDAY","MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY");

                                      m=new Array("JANUARY","FEBRUARY","MARCH","APRIL","MAY","JUNE","JULY","AUGUST","SEPTEMBER","OCTO BER","NOVEMBER","DECEMBER");

                                       

                                      date=new Date();

                                      day=date.getDate();

                                      year=date.getYear();

                                      if (year < 2000) year=year+1900;

                                      TodaysDate=" "d" "day" "m" "+year;

                                      D=TodaysDate.split('');

                                       

                                      H=3;

                                      M=4;

                                      S=5;

                                       

                                      Face='1 2 3 4 5 6 7 8 9 10 11 12';

                                      font='Arial';//Best found for this script.

                                      size=1;

                                       

                                      var n4=(document.layers);

                                      var n6=(document.getElementById&&!document.all);

                                      var ie=(document.all);

                                      var O=(navigator.appName.indexOf("Opera") != -1)?true:false;

                                      var _d=(n4||ie)?'document.':'document.getElementById("';

                                      var _a=(n4||n6)?'':'all.';

                                      var _n6r=(n6)?'")':'';

                                      var _s=(n4)?'':'.style';

                                       

                                      Face=Face.split(' ');

                                      n=Face.length;

                                      a=size*10;

                                       

                                      props="<font face="font" size="size" color="fCol">";

                                      props2="<font face="font" size="size" color="dCol">";

                                      Split=360/n;

                                      Dsplit=360/D.length;

                                      HandHeight=ClockHeight/4.5

                                      HandWidth=ClockWidth/4.5

                                      HandY=6;

                                      HandX=6;

                                      scrll=0;

                                      Y=0;

                                      X=0;

                                       

                                      if (n4){

                                      for (i=0; i < D.length; i++)

                                      document.write('<layer name="Date'i'" top=0 left=0 height=15 width=15>

                                      'props2D++'</font></center></layer>');

                                      for (i=0; i < n; i++)

                                      document.write('<layer name="Face'i'" top=0 left=0 height=15 width=15>

                                      'propsFace++'</font></center></layer>');

                                      for (i=0; i < S; i++)

                                      document.write('<layer name=Seconds'i' top=0 left=0 bgcolor='sCol' clip="0,0,2,2"></layer>');

                                      for (i=0; i < M; i++)

                                      document.write('<layer name=Minutes'i' top=0 left=0 bgcolor='mCol' clip="0,0,2,2"></layer>');

                                      for (i=0; i < H; i++)

                                      document.write('<layer name=Hours'i' top=0 left=0 bgcolor='hCol' clip="0,0,2,2"></layer>');

                                      }

                                      else{

                                      for (i=0; i < D.length; i++)

                                      document.write('<div id="Date'i'" style="position:absolute;top:0px;left:0;width:15px;height:15px;text-align:center">'props2D++'</B></font></div>');

                                      for (i=0; i < n; i++)

                                      document.write('<div id="Face'i'" style="position:absolute;top:0px;left:0;width:15px;height:15px;text-align:center">'propsFace++'</B></font></div>');

                                      for (i=0; i < H; i++)

                                      document.write('<div id="Hours'i'" style="position:absolute;top:0px;left:0;width:2px;height:2px;font-size:2px;background:'hCol'"></div>');

                                      for (i=0; i < M; i++)

                                      document.write('<div id="Minutes'i'" style="position:absolute;top:0px;left:0;width:2px;height:2px;font-size:2px;background:'mCol'"></div>');

                                      for (i=0; i < S; i++)

                                      document.write('<div id="Seconds'i'" style="position:absolute;top:0px;left:0;width:2px;height:2px;font-size:2px;background:'sCol'"></div>');

                                      }

                                       

                                      (n4)?document.layers["Seconds"0].bgColor=cCol:document.getElementById("Seconds"0).style.background=cCol;

                                       

                                      function ClockAndAssign(){

                                      if (n4||n6||O){

                                      Y=window.pageYOffset+window.innerHeight-90;

                                      X=window.pageXOffset+window.innerWidth-100;

                                      }

                                      if (ie){

                                      Y=document.body.scrollTop+window.document.body.clientHeight-90;

                                      X=document.body.scrollLeft+window.document.body.clientWidth-90;

                                      }

                                      time = new Date ();

                                      secs = time.getSeconds();

                                      sec = -1.57 + Math.PI * secs/30;

                                      mins = time.getMinutes();

                                      min = -1.57 + Math.PI * mins/30;

                                      hr = time.getHours();

                                      hrs = -1.575 + Math.PI * hr/6+Math.PI*parseInt(time.getMinutes())/360;

                                       

                                      for (i=0; i < n; i++){

                                       var F=eval(_d_a"Face"i_n6r+_s);

                                       F.top=Y + ClockHeightMath.sin(-1.0471 + iSplit*Math.PI/180);

                                       F.left=X + ClockWidthMath.cos(-1.0471 + iSplit*Math.PI/180);

                                       }

                                      for (i=0; i < H; i++){

                                       var HL=eval(_d_a"Hours"i_n6r+_s);

                                       HL.top=YHandY(iHandHeight)Math.sin(hrs);

                                       HL.left=XHandX(iHandWidth)Math.cos(hrs);

                                       }

                                      for (i=0; i < M; i++){

                                       var ML=eval(_d_a"Minutes"i_n6r+_s);

                                       ML.top=YHandY(iHandHeight)Math.sin(min);

                                       ML.left=XHandX(iHandWidth)Math.cos(min);

                                       }

                                      for (i=0; i < S; i++){

                                       var SL=eval(_d_a"Seconds"i_n6r+_s);

                                       SL.top=YHandY(iHandHeight)Math.sin(sec);

                                       SL.left=XHandX(iHandWidth)Math.cos(sec);

                                       }

                                      for (i=0; i < D.length; i++){       

                                       var DL=eval(_d_a"Date"i_n6r+_s);

                                       DL.top=Y + ClockHeight1.5Math.sin(-sec+iDsplitMath.PI/180);

                                       DL.left=X + ClockWidth1.5Math.cos(-sec+iDsplitMath.PI/180);

                                       }

                                      setTimeout('ClockAndAssign()',50);

                                      }

                                      if (n4||ie||n6||O)window.onload=ClockAndAssign;

                                      //-->

                                      </script>

                                      </body>

                                      </html

                                      • 16. Re: html file
                                        kglad Adobe Community Professional & MVP

                                        there must be lines above:

                                         

                                         

                                        dCol='#006231';//date colour.


                                        • 17. Re: html file
                                          mlbe8 Level 1

                                          Ye bellow i have listed the missing code.

                                           

                                           

                                          just add the above to what you already have, so the end should be </html

                                          • 18. Re: html file
                                            kglad Adobe Community Professional & MVP

                                            i don't see the rest of that code.

                                             

                                            and your html file ends in "</html>", correct?

                                            • 19. Re: html file
                                              mlbe8 Level 1

                                              kglad i set up a temp link where you can "cut" the code for the annimation http://mark.host56.com/links/info.html  Once you cut the code paste into notepad then save as clock.html, then when you double click on that the file will open on the browser the annimation will appear on the bottom right.

                                              • 20. Re: html file
                                                kglad Adobe Community Professional & MVP

                                                so, that has nothing to do with flash.

                                                 

                                                first, copy everything between the <script language...> and </script> tags (including those tags) and paste them into your html file.  don't use dreamweaver to do any of that.  test.

                                                 

                                                if that's not what you want and you think dreamweaver should be used somehow:

                                                 

                                                you probably should post a message on a dreamweaver forum saying something like:

                                                 

                                                i'm using javascript to animate a clock in an html file.  i'd like to add this script to xxxx using dreamweaver.  help.

                                                • 21. Re: html file
                                                  mlbe8 Level 1

                                                  thanks kglad, you put what i was thinking in one sentence, cheers.

                                                  Stay Safe

                                                  Mark from Scotland

                                                  • 22. Re: html file
                                                    kglad Adobe Community Professional & MVP

                                                    you're welcome.