Announcement

Collapse
No announcement yet.

basic scaleform menu problem

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

    basic scaleform menu problem

    hi i was creating a basic scaleform menu for my game but i got one problem when trying to call a unrealscript function from the flash file

    this is what im using to call the function


    case "New Game":
    ExternalInterface.call("FlashToConsole,open MG-MyGameMainMenu2backup");
    break;

    but after i import it to udk add the kismet sequence what open the gfx movie it shows perfect but when i click on the New Game button nothing happends

    i have alredy try it on the scaleform launcher in adobe flash editor cs4 and when i click on the button it say

    Callback! open MG-MyGameMainMenu2_backup, nargs = 0

    and yes i have read the udn tutorial about scaleform so plz help

    and ExternalInterface.call("FlashToConsole,open MG-MyGameMainMenu2backup"); this is the function what im using to open my map and i have alredy assigned it to the New Game button

    PD: if i write someting wrong is becouse MY FIRST LENGUAGE IS NOT ENGLISH

    #2
    Duno if your still having a problem, but are you running from editor? Cause the "open" consol command doesn't work if you are just testing the map through play in editor.

    Comment


      #3
      ohhhh so i had to open the map via unreal fronted to make the command work?

      well i start the map on unreal fronted but it dont work but if i write the command in the console it works

      Comment


        #4
        Your syntax is wrong

        ("FlashToConsole","open YourLevelNameGoesHere");

        Comment


          #5
          Hey I'm having the same problem and my syntax seems to be corrrect.


          import flash.external.ExternalInterface;


          function OpenOptionsScreen()
          {
          gotoAndPlay("OptionsScreen");
          }

          function StartNewGame()
          {
          ExternalInterface.call("FlashtoConsole", "open Prison_Prototype_3");
          }

          function ExitGame()
          {
          ExternalInterface.call("FlashtoConsole","quit");
          }

          Exit_mc.addEventListener("click",this,"ExitGame");
          NewGame_mc.addEventListener("click",this,"StartNew Game");
          OptionsButton.addEventListener("click",this,"OpenO ptionsScreen");
          NewGame_mc.focused = true;


          stop();

          Comment


            #6
            I got my start menu button work via a round about unrealscipt method. I would much rather work in actionscript primarily. Let me know if somethings wrong with my flashtoconsole commands....

            Comment


              #7
              To be able to help you, we need more information. What is your UnrealScript? The External Interface calls must be intercepted by UnrealScript. I assume you have:

              1. An UnrealScript class for this SWF that extends GFxMoviePlayer
              2. A function in UnrealScript called 'FlashtoConsole' that expects a single parameter.
              3. This function fires off a console command using the parameter.

              Does that sound right?

              Comment

              Working...
              X