PDA

View Full Version : pls chk this script



yaziii
10-29-2010, 03:29 PM
pls chk this script nd tell me where is the error???

but my prblm is tht c in script which i bold, is not working whn my main come then when i click on settings its not moving to settings menu???


import flash.external.ExternalInterface;

import com.forecourse.SettingsManager;

var SettingsManager:SettingsManager = new SettingsManager();


DMHolder_mc.BindMenu("MainMenu");
DMHolder_mc.BindMenu("Settings");
DMHolder_mc.SwitchToMenu("MainMenu");


SettingsManager.Resolution_txt = DMHolder_mc.GetButtonMC("Settings","Resolution").textField;


ExternalInterface.call("SetUpSettings");

function SetResolutionByString(newRes:String):Void
{
SettingsManager.SetResolutionByString(newRes);
}

SettingsManager.UpdateResolutionText();

DMHolder_mc.Handlepress = function (pressName:String)
{
switch (pressName)
{
case "New Game":
ExternalInterface.call("FlashToConsole","open DM-Deck");
break;

case "Settings":
fscommand ("Settings");
DMHolder_mc.SwitchToMenu("Settings");
break;
case "Exit":
ExternalInterface.call("FlashTOConsole","quit");
break;

case "Resolution":
SettingsManager.ShiftResIndex(1);
break;

case "Save Settings":
SettingsManager.ApplyChanges();
break;

case "back":
DMHolder_mc.SwitchToMenu("MainMenu");
break;
}
}

Matt Doyle
10-29-2010, 03:52 PM
Hard to say what's going wrong. The code looks ok. I'd use some trace statements to see if anything is happening.

Try adding: trace(pressName); above the switch statement to see if the name is being sent properly that you expect for case "Settings".

yaziii
10-29-2010, 03:55 PM
ok nd can u tell me how i can attach any file if its not work with trace thn i will snd u my actual file.

right???
coz i m in very tens for 1 week.

Matt Doyle
10-29-2010, 04:00 PM
You can send me your files to mdoyle [ at ] scaleform.com

Be sure to send all files needed, including any class files. I can't promise a fast turnaround time, as I'm quite busy.

yaziii
10-29-2010, 04:05 PM
i mail u pls only chk it once nd rply me tht u have software which i mention.

Matt Doyle
10-29-2010, 04:37 PM
Ok - I've looked at your files. This is probably your problem:

1. In Flash, go to File (at the top), then Publish Settings
2. Click on the Flash tab of the Publish Settings window.
3. Click on the Settings button next to Script: ActionScript 2.0
4. Your Classpaths should look like this:

C:\UDK\UDK-2010-09\Development\Flash\ForecourseUI
C:\UDK\UDK-2010-09\Development\Flash\CLIK
$(LocalData)/Classes

Of course, your path to UDK may look slightly different than mine. The menu will then work, assuming you have everything saved in the right place.

Bear in mind that we do not support forecourse UI, as that is a user created extension to Scaleform GFx. I recommend you watch all our video tutorials in the Getting Started with GFx sticky thread and try those out to help you.

yaziii
10-29-2010, 05:01 PM
which videos sir???

yaziii
10-29-2010, 05:12 PM
still not working sir :confused: nd the black screen open with fx mediaplayer so in tht screen this is written:


callback! setupsettings, nargs = 0
load: _leve10.DMHolder_mc
load: _leve10.MainMenu_mc
load: _leve10.Settings_mc
load: _leve10.MainMenu_mc.New Lesson_mc
load: _leve10.MainMenu_mc.Settings_mc
load: _leve10.MainMenu_mc.Exit_mc
load: _leve10.Settings_mc.Resolution_mc
load: _leve10.Settings_mc.save settings_mc
load: _leve10.Settings_mc.back_mc