7 Replies Latest reply on Jul 18, 2007 12:32 AM by farhanakhan

    problem geting the filename...

    farhanakhan Level 1
      hi

      i m getting the filename of the exe peoject file of director...
      i use this script

      serial_no = _movie.name


      but when i rename the file name then scipt get the old name until when i publish the project....

      for example...

      filename ---abc.dir or abc.exe

      when i rename the file liek this

      abc.exe to xyz.exe then nothing happen....scipt get teh old of file...(abc.exe)

      tell me what i do

      thx a lot
        • 1. Re: problem geting the filename...
          aldus Level 1
          Hello
          what about using the application name instead of the moviename like:

          serial_no = _player.applicationName

          hih
          Aldus
          • 2. Re: problem geting the filename...
            neeks
            what you need is
            _player.applicationName

            the one you are using gives you the name of the movie file that you used to create the projector.
            This property gives you the name of the projector which is running the movie.
            • 3. Re: problem geting the filename...
              farhanakhan Level 1
              _player.applicationName----this get the player name..like Director
              is not working...

              i need the file name....like abc.exe.....

              reply me plz

              • 4. Re: problem geting the filename...
                aldus Level 1
                In the author mode it is returning the application name: director.
                So you will have to check the authormode, f.ex.
                if (_system.environmentPropList[#runMode] = "Author") then
                serial_no = _movie.name
                else
                serial_no = _player.applicationname
                end if

                Regards
                Aldus
                • 5. Re: problem geting the filename...
                  farhanakhan Level 1
                  hi
                  is not working
                  ..listen guys
                  i want to take filename...
                  if i change the filename...then exe must take the new name which i change...

                  suppose that my dir file name is abc.dir then i publish the exe file then exe file is abc.exe now project is ready ...i gave my exe file to my client..if he chnage hte exe file name from abc.exe to xyz.exe then exe file must get teh new name of exe file of director but is not happening it get same old name like abc,exe not getting xyz.exe

                  if i publish again script get the new namee. i dont want to publish agin agin ..if i rename the filename byr preswing f2 on file

                  tell me the solution pl z
                  • 6. Re: problem geting the filename...
                    aldus Level 1
                    Ok - here it is still working:
                    placed a textmember on the stage with
                    a little behavior:

                    on beginSprite (me)
                    sprite(me.spriteNum).member.text = _movie.moviename & Return & _player.applicationname
                    end

                    after publishing _player.applicationname holds the
                    renamed projectorname while _movie.moviename holds the orginal name as
                    you describe. To avoid runtime-errors in the author-mode you must
                    test the runmode as descibed

                    --
                    if (_system.environmentPropList[#runMode] = "Author") then
                    mo_serial = _movie.moviename
                    else
                    mo_serial = _player.applicationname
                    end if
                    --

                    That's all.
                    Regards
                    Aldus
                    • 7. Re: problem geting the filename...
                      farhanakhan Level 1
                      thx guys.....

                      now is done....
                      i m getting the exact name of the project file after rename the exe file name after publishing of director ..
                      ---------mo_serial = _player.applicationname---i used this code