Announcement

Collapse
No announcement yet.

Scaleform Front End Menu System

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

  • replied
    Originally posted by ThePriest909 View Post
    OKay, I tried a couple of the things you suggested. If let's say the main menu extents MovieClip the error wont pop up so Like you said it must be something inside the front end. Trying to track it down atm.
    Thanks for helping out with this one Mavrik!
    If I comment this line libLoader.load(cursorPath); the error (error: argumenterror error: # 1063 ) no longer pops up :\ It must have something to do with the following function:

    Code:
    		public function SF_FrontEnd()
    		{
    			var url:String="../SF_Library.swf";
    			var cursorPath:URLRequest = new URLRequest(url);
    			var libLoader:Loader = new Loader();
    
    			libLoader.load(cursorPath);
    			libLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, CreateCursor);
    		}
    Yet, I can't figure it out.

    Leave a comment:


  • replied
    Rembember there's a list of eventListeners in , the Gfx folder !

    And maybe it uses a class wich functions are overwritten , and events don't trigger and maybe you will have to modify it little.

    Leave a comment:


  • replied
    The site is down, anybody has a backup?

    Leave a comment:


  • replied
    OKay, I tried a couple of the things you suggested. If let's say the main menu extents MovieClip the error wont pop up so Like you said it must be something inside the front end. Trying to track it down atm.
    Thanks for helping out with this one Mavrik!

    Edit:
    I don't get it :\ Just DLed your source. The code is identical. Also ticked "permit debugging" but nothing more gets logged besides that error. Well I guess since the menu works fine in UDK I could ignore this little error for the moment.

    Leave a comment:


  • replied
    If you remove the line
    Code:
    parentStage.addEventListener(MouseEvent.MOUSE_MOVE, MoveCursor);
    do you still get the error? I'm wondering if it's another function that's causing the issue, not the event handler, like the constructor maybe. Maybe Flash is trying to create an instance of a MenuCursor and doesn't pass in a DisplayObject. Try adding a default parameter of null to the constructor argument (and wrap the call to parentStage.addEventListener with a check for null) and see what that does. It could also maybe be one of the functions in the SF_FrontEnd class, unless you already narrowed it down to the MenuCursor.

    Leave a comment:


  • replied
    Originally posted by mavrik73 View Post
    Oh, you're seeing the error in the console log in UDK, not in Flash? Which version of Flash did you use to create the swfs? I just downloaded the code and content and tested it with the latest version of the UDK, but I'm not getting this error. My guess is that there might be a problem due to a different version of Flash?
    Ehm, sorry Mavrik my bad, I wasn't clear enough. The error pops up inside the Flash log when launching the movie, not in game. I use Adobe FLash Cs6. Maybe the version has something to do with that. After some googling I think it has to do with the way the MoveCursor function is called (http://forums.adobe.com/thread/576950). I tried a couple of things but no luck.
    Attached Files

    Leave a comment:


  • replied
    Oh, you're seeing the error in the console log in UDK, not in Flash? Which version of Flash did you use to create the swfs? I just downloaded the code and content and tested it with the latest version of the UDK, but I'm not getting this error. My guess is that there might be a problem due to a different version of Flash?

    Leave a comment:


  • replied
    Originally posted by mavrik73 View Post
    Flash error 1063 is an argument mismatch error, meaning that somewhere in the code there's the wrong number of arguments being passed to a function. There should be some more details in the error message, so check that out and see if you can track down where it's happening.
    Hey Mavrik thanks for replying!
    No luck figuring it out so far. The error pops up in the console log as soon the cursor object is used in a scene. No other details are available in the log or anywhere else. As far as I can tell at least.

    The cursor code is:
    Code:
    package lib
    {
    	import flash.display.MovieClip;
    	import flash.display.DisplayObject;
    	import flash.events.MouseEvent;
    
    	public class MenuCursor extends MovieClip
    	{
    		public function MenuCursor(parentStage:DisplayObject)
    		{
    			mouseEnabled = false;
    			mouseChildren = false;
    			parentStage.addEventListener(MouseEvent.MOUSE_MOVE, MoveCursor);
    		}
    		
    		private function MoveCursor(e:MouseEvent):void
    		{
    			x = e.stageX;
    			y = e.stageY;
    		}
    	}
    }
    Thankfully the menu scene works fine in game but still, that error is bugging me. I'm sure you know that feeling

    -John

    Leave a comment:


  • replied
    Flash error 1063 is an argument mismatch error, meaning that somewhere in the code there's the wrong number of arguments being passed to a function. There should be some more details in the error message, so check that out and see if you can track down where it's happening.

    Leave a comment:


  • replied
    I've been recently trying this tut. Great work btw, thanks for sharing!
    For some reason though I get a ArgumentError: Error #1063 which I think is related to the cursor. Any ideas?

    Leave a comment:


  • replied
    You can use any of the other Unrealscript editors mentioned in this post: http://forums.epicgames.com/threads/...lscript-Editor. Also, Visual Studio Express is free, and if you have the Visual Studio Shell Integrated (also free), it works with the nFringe plugin (free for non-commercial use) that I believe you're talking about.

    Leave a comment:


  • replied
    This tutorial calls for a Visual Studio plug-in. How can I follow this tutorial without Visual Studio because I don't want to buy it. I'm a beginner and am using a trial version of CS6 Flash pro with the November 2012 latest release of UDK. Thanks.

    Leave a comment:


  • replied
    Originally posted by milerk View Post
    i can only connect with unrealscript these textfields that were created and placed on a stage,
    is it possible that the Start function is fired before the library is loaded?
    I don't think so, but you could test it by making an Unrealscript function to log something and calling it from both the ActionScript CreateCursor function and the UnrealScript Start function to see which is firing first.

    Originally posted by milerk View Post
    cursor will only work if i put Cursor movie clip on every menu stage,
    looks like the GetVariableObject() works only to the objects that are on the stage, objects initialized later, like in scene class constructors wont work for me at least
    An older version of the tutorial had this issue on some machine's due to asynchronous loading, but the latest version waits until the library swf is loaded before trying to use the cursor object it contains. I've tested it on several machines and with a couple of different projects and haven't seen any problems. If you're still having this issue, there might be a problem with how you have the resource sharing set up.

    Originally posted by milerk View Post
    i see now that my cursor after importing to UDK loses its alpha channel,
    the cursor i see moving has a white background (in flash i dont see the background)
    whats up with that?
    I've never seen that with any of the menus I've tested, so something might be wrong with either the image or some settings. Maybe try going over the steps for using images and make sure everything is set correctly.

    Libraries can be a pain in Flash, so another test you could do is get rid of the library swf and just plug everything into each scene. That would cause each swf to be bigger, so you probably don't want to do that as a final solution, but it might help you track down where the problem is.

    Leave a comment:


  • replied
    yep the setFloat its just a typo, mMouseCursor is a class im using for the cursor, ill check with changing it tomorrow (im on a phone right now) also I will create some textfields, movieclips on the stage and see if I can initialize them in uscript. thanks for your help and the tutorial


    @edit

    i can only connect with unrealscript these textfields that were created and placed on a stage,
    is it possible that the Start function is fired before the library is loaded?

    @edit2

    cursor will only work if i put Cursor movie clip on every menu stage,
    looks like the GetVariableObject() works only to the objects that are on the stage, objects initialized later, like in scene class constructors wont work for me at least

    i see now that my cursor after importing to UDK loses its alpha channel,
    the cursor i see moving has a white background (in flash i dont see the background)
    whats up with that?

    Leave a comment:


  • replied
    Is this a typo or is this actually how this variable is declared?:

    Originally posted by milerk View Post
    public var Cursor:mMouseCursor;
    I only ask because the capitalization is a little off from ActionScript convention (class names usually start with a capital letter) and I wanted to make sure that that's how you actually have it written. Also, it looks like the variable in ActionScript is named "Cursor" and not "cursor" as in the tutorial, is that right? Unlike Unrealscript, ActionScript is case sensitive, so if the capitalization of the variable name in Unrealscript doesn't match the variable name in Actionscript, maybe that could possibly cause the problem you're seeing depending on how the GetVariableObject function works. Just a thought, but it might be worth looking into.

    Originally posted by milerk View Post
    also MC_Cursor.SetFloat("x") either doesnt work
    MC_Cursor.SetFloat("x") won't work because you need a second argument: MC_Cursor.SetFloat("x", 5.3). Probably just a typo, but I wanted to check.

    Leave a comment:

Working...
X