Announcement

Collapse
No announcement yet.

Unload a regular SWF uscript

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Unload a regular SWF uscript

    I have made a menu that do not use clikwidgets and everything work as intended except that no matter what i can not get it to unload.

    Once used i want it gone completely out of memory and out of sight until called again.

    I am using the october release

    #2
    That is achieved with the following:

    Code:
    MyMovie.Close(true);
    MyMovie = None;

    Comment


      #3
      thank you very much mr Doyle!

      Comment


        #4
        heh, found my issue, the movie doesnt send my console commands
        So i change my question

        Flash:
        Code:
        case "Select Heavy Gunner":
        			ExternalInterface.call("FlashToConsole","chooseclass Rikochet.PawnHeavyGunner");
        			break;
        result: absolutely nothing at all. Doesnt show in my log and it do not call the function. If i type it manually in console it works

        Comment


          #5
          You must include this on the frame where the external interface is called, first:

          Code:
          import flash.external.ExternalInterface
          Also be sure your "Select Heavy Gunner" case is occurring with a trace statement:

          Code:
          case "Select Heavy Gunner":
              trace("Select Heavy Gunner occurred");

          Comment


            #6
            mine is import flash.external.ExternalInterface;
            Should there not be a ; at the end?

            With or without it when i test with fxmediaplayer they both work the same.
            Callback! FlashToConsole, nargs = 1
            arg(0) = chooseclass Rikochet.PawnHeavyGunner

            But once in udk there is nothing

            Comment


              #7
              same, never logs in udk only in flash

              Comment


                #8
                I just tested it and it works on my end. Semi-colon after the import statement is fine.

                My UnrealScript works:

                Code:
                function FlashToConsole(string message)
                {
                	`log("###### ExternalInterface Call Received: "@message);
                	ConsoleCommand(message);
                }
                It logs the message, but my console command fails of course.

                Comment


                  #9
                  Should i wait or just admit now that i did not add the FlashToConsole function in my unrealscript?

                  Thought it was in there allready

                  All works just fine now, thanks Matt!

                  Comment

                  Working...
                  X