13 Replies Latest reply on Nov 1, 2012 10:35 AM by Bit Crusher

    Dynamic TextField (with content in String) compiles on PC, dies on Mac.

    Bit Crusher Level 1

      I have some banners that have extensive copy within an auto-scrolling movieclip.

       

      The player works just dandy on a PC. When I have a co-worker use the same file it dies out - nothing loads into the textfield.  What's worse is that on a PC, the .swf scrolls to the end just fine. On a Mac (Safari) the end of the copy doesn't stop the scrollbar.

       

      Below is the code used (on main timeline):

       

      import TextField.StyleSheet;

       

       

      var styles = new TextField.StyleSheet();

      styles.parseCSS(css);

      styles.setStyle("body", {fontFamily:'Arial,Helvetica,sans-serif', fontSize:'9px', color:'#000000', leading:'-1px;'});

      styles.setStyle("h1",{fontFamily:'Arial,Helvetica,sans-serif', fontSize:'9px', color:'#3870B7', fontWeight:'bold'});

      styles.setStyle("li",{fontFamily:'Arial,Helvetica,sans-serif', fontSize:'9px', color:'#000000', marginLeft:'-20px'});

      styles.setStyle("subBul",{fontFamily:'Arial,Helvetica,sans-serif', fontSize:'9px', marginLeft:'38px'});

      styles.setStyle("subBulPad",{fontFamily:'Arial,Helvetica,sans-serif', fontSize:'9px', marginLeft:'48px'});

      styles.setStyle("a",{fontFamily:'Arial,Helvetica,sans-serif', fontSize:'9px', color:'#424FA5', textDecoration:'underline', fontWeight:'bold'});

       

       

      var copy:String = "<h1>Title Copy</h1>"

      + "<br><p>Chapter</p>"

      + "<li>Lorem ipsum dolor sit amet, in nec et nunc, lectus eget arcu duis, natoque proin non quam quis diam, non lorem cursus at, ac eu phasellus in pulvinar nulla et. Euismod bibendum aliquam feugiat maecenas, integer mi vivamus purus aliquam odio, aliquam sit lobortis, vitae proin placerat euismod mauris condimentum sapien, vel nonummy potenti. Duis et sint laoreet, condimentum dignissim, orci ac, potenti mi non taciti cum integer, ut aenean etiam lorem sed erat. Vulputate molestie wisi molestie integer rhoncus, felis sed elementum a lorem venenatis, dictum suspendisse odio. Sagittis euismod erat, bibendum quisque pede tempor, arcu lobortis. Lorem lacus risus non turpis sed felis, turpis potenti vivamus. Libero wisi erat tempus, velit in sit lectus nonummy vitae nec, cras nec nec sagittis taciti sagittis amet. Ac nam massa vestibulum, natoque etiam nec phasellus suscipit lobortis. Vulputate interdum in tristique, vestibulum vel, quis phasellus gravida sed vel, luctus varius laoreet a vehicula. Torquent cras, magna tristique eu congue vestibulum arcu. Id per netus platea lacus in orci, fusce in mauris et in purus exercitation.</li>"

      + "<li>Quisque amet ac mauris. Hac nibh in iaculis, elit vel a fringilla lectus quam aenean. Aenean in dui. Mi delectus sit ut est enim. Quis vestibulum curabitur in vestibulum libero, in non. Nulla tempus ligula id augue cubilia, adipiscing velit dolor venenatis id diam, neque vel aliquam ac, ultrices sem cum aenean sem wisi dis, risus blandit quisque aliquam vestibulum.</li>"

      + "<br><p>Chapter</p>"

      + "<p></p>";

       

       

      closedCopy();

       

       

      function closedCopy(){

                var contentHeight = copy.length/3.55;

                var copyContent:TextField = copyMC.scroll_content.createTextField("copyContent", this.getNextHighestDepth(), 0, 0, 265, contentHeight);

                copyMC.scroll_content.copyContent.multiline = true;

                copyMC.scroll_content.copyContent.selectable = false;

                copyMC.scroll_content.copyContent.wordWrap = true;

                copyMC.scroll_content.copyContent.styleSheet = styles;

       

       

                cH=contentHeight;

                copyMC.scroll_content.copyContent._height = cH;

                copyMC.scroll_content.copyContent.html = true;

                copyMC.scroll_content.copyContent.htmlText = isi;

       

       

      };

       

      **this is a condensed version of the script, but the main part is here

       

      I've spent a ton of time searching to see if anyone else has had a similar issue and it doesn't look like it, so any suggestions as to why this dies out on a Mac (both compile and view) I'd really appreciate it.

       

      THANKS!!