2 Replies Latest reply: Apr 23, 2011 12:11 PM by barpos RSS

    Error on abode webpage

    barpos Community Member

      http://www.adobe.com/devnet/flash/articles/as3_debugger.html

       

      The code provided for the second sample .FLA file does not work.  There's something missing, as one needs to instantiate the custom class.  I also tried to do that, but failed.  I'm at loss here.

       

      StringUtils.reverse("Flash CS3 makes debugging fun!");

        • 1. Re: Error on abode webpage
          Lee Burrows Community Member

          hi

           

          you need to save:

           

          package {

                public class     StringUtils {

                     public     function StringUtils() {}

           

                    public static     function reverse(s:String):String {

                          var     tmp_array:Array = s.split("");

                          tmp_array.reverse();

                          var     tmp_string:String = tmp_array.join("");

                         return     tmp_string;

                     }

                }

          }

           

          as "StringUtils.as" in same folder as your fla file

          • 2. Re: Error on abode webpage
            barpos Community Member

            Hi,

             

            Ah, I had already saved the .AS file, but didn't bother saving the UNTITLED.FLA file. It works now!

             

            Thanks,

             

            Ron