1 Reply Latest reply on May 20, 2008 8:51 PM by Newsgroup_User

    What is wrong with this code please?

    duneglow
      Please I need help I dont know what else to try.

      before converting to As 2.0 from as 1.0 and fp 6 this code laoded an image just fine

      see code:



      if (_root.templatedir ne "") {
      loadMovie(_root.templatedir add "/" add _root.category add "/" add _root.theme add ".swf", "loadmoviebottom");
      } else {
      if (_root.templatedir1 ne "") {
      loadMovie(_root.templatedir1 add "/" add _root.category add "/" add _root.theme add ".swf", "loadmoviebottom");
      } else {
      loadMovie(theme add ".swf", "loadmoviebottom");
      }
      }





      after converting to as 2.0 and fp 8 and 9 the code wont load anymore

      see code:


      if (_root.templatedir != "") {
      loadMovie(_root.templatedir + "/" + _root.category + "/" + _root.theme + ".swf", "loadmoviebottom");
      } else {
      if (_root.templatedir1 != "") {
      loadMovie(_root.templatedir1 + "/" + _root.category + "/" + _root.theme + ".swf", "loadmoviebottom");
      } else {
      loadMovie(theme + ".swf", "loadmoviebottom");
      }
      }

      I've experimrnted with both "==" operator and 'ne" and nothing happens.

      the only way that I can get the images to load i if I publish in flash player 6.

      please what is wrong with this code
        • 1. Re: What is wrong with this code please?
          Level 7
          duneglow,

          > if (_root.templatedir ne "") {
          > loadMovie(_root.templatedir add "/" add _root.category add "/" add
          > _root.theme add ".swf", "loadmoviebottom");

          Flash Player 8 dropped support for the (very old) "add" string
          concatenator. Replace all those "add"s with plus signs (+) and that may do
          it. While you're at it, I recommend you also replace "ne" (not equal) with
          the more modern != operator. (Just look up "Operators" in the Help panel
          ... it's not an especially long read, and really useful.)

          There may be more, but those are the absolute basics.


          David Stiller
          Co-author, Foundation Flash CS3 for Designers
          http://tinyurl.com/2k29mj
          "Luck is the residue of good design."