4 Replies Latest reply on May 10, 2006 11:08 AM by Newsgroup_User

    Bitmaps

    njuggy
      My project is multilingual.
      I need to find out how to load bitmaps at run time from an external folder(this folder is language specific).
      So when the user selects (english or spanish) the code will load the correct bitmap, store it a specified sprite number then display it.
      I have a code example below which is giving me an error.

      set newPath = the moviePath & "\pictures" & filePathName
      add the searchPaths, newPath

      repeat with i = 34 to 44
      importFileInto sprite(i), newPath
      sprite(i).visible = true
      end repeat
        • 1. Re: Bitmaps
          Level 7
          You do not load external bitmaps into sprites. You can set (at runtime or
          during authoring) the fileName property of a bitmap cast member such that it
          references an external file. You can either create those bitmap cast members
          dynamically or have bitmap cast members already created that serve as place
          holders, it's up to you.

          Bottom line, check out the fileName property in the lingo dictionary, I
          think that will help you.


          • 2. Re: Bitmaps
            njuggy Level 1
            This is what I have done so far, the castmember is empty after the lines are executed. Is there something I am missing?
            --
            set newPath = the moviePath & "\pictures" & "\" & filePathName
            add the searchPaths, newPath
            member(37).fileName = newPath &"right 3.bmp"
            member(38).fileName = newPath &"right 1.bmp"
            member(39).fileName = newPath &"right 2.bmp"
            • 3. Re: Bitmaps
              njuggy Level 1
              Never mind I fixed the problem
              Thanks.
              • 4. Re: Bitmaps
                Level 7
                What is filePathName? why are you appending it to newPath?

                If the bitmaps are located in a folder called pictures, and the folder is at
                the same level as the movie then it should just be

                newPath = the moviePath & "pictures\"

                Note that you do not need to add a slash before pictures, the MoviePath
                already ends in a slash. And adding newPath to the searchPath probably isn't
                doing anything for you either.



                "njuggy" <webforumsuser@macromedia.com> wrote in message
                news:e3t70s$5vk$1@forums.macromedia.com...
                > This is what I have done so far, the castmember is empty after the lines
                are
                > executed. Is there something I am missing?
                > --
                > set newPath = the moviePath & "\pictures" & "\" & filePathName
                > add the searchPaths, newPath
                > member(37).fileName = newPath &"right 3.bmp"
                > member(38).fileName = newPath &"right 1.bmp"
                > member(39).fileName = newPath &"right 2.bmp"
                >