Announcement

Collapse
No announcement yet.

Scaleform Front End Menu System

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

  • replied
    no, its a different thing, something is probably wrong with the connection between them in unrealscript and actionscript,
    in the cursor class i placed
    Code:
    private function MoveMouse(evt:MouseEvent):void
    {
    	x = evt.stageX;
    	y = evt.stageY;
    	ExternalInterface.call("onMouseMove", x, y);
    }
    onMouseMove function, so everytime i move the mouse it logs its position

    Code:
    event onMouseMove(float x, float y)
    {
           `log("UDK POS" @ MC_Cursor.GetFloat("x") @ MC_Cursor.GetFloat("y"));
           `log("CSS POS" @ x @ y);   
    }
    UDK's are always 0 (however CSS are ok and i see the cursor moving on the screen), also MC_Cursor.SetFloat("x") either doesnt work

    im initializing the cursor inside the Start function
    MC_Cursor = GetVariableObject("Cursor");
    also in actionscript it is
    public var Cursor:mMouseCursor; (initialized in the scene movieclip constructor)
    so these names should be okay, MC_Cursor is not null but i cant really do anything with it ;/

    and also all the class files are linked to their swf movies as in the tutorial

    Leave a comment:


  • replied
    Off the top of my head, I'd say that you could be passing in the cursor object from the new screen to the SetMouseCoords function instead of the cursor object from the previous screen. As the tutorial mentions, whenever a new cursor is created in ActionScript, its coords are 0, 0. You should be passing in the cursor from the previous menu to set the mouse coords for the cursor in the new menu. Other than that, I couldn't tell you what else might be wrong without a little more information.

    Leave a comment:


  • replied
    thanks i missed that but
    for now i have few problems with that

    Code:
    function SetMouseCoords(GFxObject LastCursorMC)
    {
    	MouseCoords.X = LastCursorMC.GetFloat("x");
    	MouseCoords.Y = LastCursorMC.GetFloat("y");
    }
    for me these getFloat("x") functions fired on cursorMC were always returning 0, even if the cursor movieclip wasn't null

    and second problem is with the configuration file
    Code:
    [ScaleformMenu.SFMFrontEndOptionsMenu]
    +ResolutionList="800x600"
    +ResolutionList="1024x768"
    i somehow couldnt populate the ResolutionList array with these strings, array was always empty in the game and after running the game string quotations disappeared in the config file, but it happened only to that array,
    other properties i had in config file were loaded properly

    does anybody know how to fix these problems? thanks

    edit:

    removing the ' + ' before variables fixed the second problem

    Leave a comment:


  • replied
    Originally posted by milerk View Post
    can please someone upload the source files of the classes used in the tutorial?
    There is a link to the source files on the first page of the tutorials, but I'll re-link it here for you:

    ScaleformMenuTutorial.zip

    Leave a comment:


  • replied
    can please someone upload the source files of the classes used in the tutorial?
    it would be very helpful

    thanks much

    Leave a comment:


  • replied
    Originally posted by John J View Post
    Great tutorial but for some reason I can't get the mouse to show up.
    After some experimentation on different machines, I discovered that there was a concurrency bug in the original tutorial. There was a race between loading the actual image of the cursor and instantiating an object of the MenuCursor class. If the image wasn't loaded by the time the MenuCursor object got created, the image never got attached to the object and the mouse wouldn't show up. I fixed this by using an event listener to wait for the image to load before creating the MenuCursor object and as far as I can tell, it seems to be working properly now. Thanks, John, for bringing this to my attention.

    Leave a comment:


  • replied
    Originally posted by John J View Post
    Got things working Mavrik73... Thanks a lot for your help!
    Good to hear John, good luck!

    Leave a comment:


  • replied
    Originally posted by Phen0mM0dz View Post
    Can you explain the save system that is included with the source what states does it save?
    It's a simplified version of the Save Game States Gem on the UDN. It saves every actor in the level that implements the SaveGameStateInterface class to an array of JSON formatted strings. The Basic Save Game Tutorial on my site goes into greater detail about how it works and what I modified from the Gem, but basically I left out the code that saves Kismet and Matinee for simplicity's sake and adapted it to work for non UT type games (games that extend UDK classes and not UT classes).

    Leave a comment:


  • replied
    Got things working Mavrik73... Thanks a lot for your help!

    Leave a comment:


  • replied
    Can you explain the save system that is included with the source what states does it save?

    Leave a comment:


  • replied
    Setting the bShowHardwareMouseCursor to true just makes the OS cursor show up, which is fine too. I only included the custom MouseCursor class to show how to use ActionScript to take care of updating the UI and because it's common to want a custom mouse cursor for your game. If you'd rather just use the OS cursor, I don't think there's anything wrong with that.

    Leave a comment:


  • replied
    Library is working fine for buttons, just not mouse cursor. But if I add 'bShowHardwareMouseCursor=true;' to the *frontend.uc defaultproperties it works fine.

    So either that is needed or adding that bool is doing the cursor a different way than you intended. And if that is the case what's wrong with just adding in the bool?

    Leave a comment:


  • replied
    I meant that it wasn't showing up at all. But I figured out why.... because it wasn't getting pulled in from the library.fla. If I put the cursor symbol in the other screens fla then it works.

    So now I need to go find the disconnect between the cursor in the library.

    Leave a comment:


  • replied
    Originally posted by John J View Post
    ...the mouse isn't following to the next screen.
    Do you mean it's not showing up at all or it jumps back to the top left of the screen? Or does it not follow the mouse movement on the next screen? If it's the issue where it jumps back up to the top left of the screen, you have to save the mouse coords from the previous screen and assign them on the next. If not, I would guess you'd have to check your ActionScript again and make sure all the Menu Document Classes extend the SF_FrontEnd class and call "super()" in their constructors.

    Leave a comment:


  • replied
    Progress... I decided to start over from a clean slate and now the cursor shows up and works. No idea what the issue was other than a pathing one. Your instructions work in Flash 4 fine.

    However, the mouse isn't following to the next screen.

    Sorry to be a pain.

    Leave a comment:

Working...
X