home *** CD-ROM | disk | FTP | other *** search
/ PC Extra 07 & 08 / pca1507.iso / Software / psp8 / Data1.cab / prod_tour.swf / scripts / frame_1 / DoAction.as
Encoding:
Text File  |  2003-04-22  |  8.2 KB  |  103 lines

  1. _global.menu = _root.menu;
  2. var theXML = "<mainSettings expansionDurationInFrames=\"2\" h=\"475\" w=\"160\" /><parentSettings unpressedcolor=\"0x000000\" hoverunpressedcolor=\"0x636363\" pressedcolor=\"0x000000\" hoverpressedcolor=\"0x636363\" /><childSettings unpressedcolor=\"0x636363\" hoverunpressedcolor=\"0x800000\" hoverpressedcolor=\"0x800000\" pressedcolor=\"0x800000\"labelX =\"20\" labelY =\"0\" labelW =\"120\" labelH =\"24\" fontsize =\"12\" /><parent expansionDurationInFrames=\"2\" label=\"Tools Overview\"><child label=\"Tool Palette\" id=\"tool_palette\" movie=\"tool_palette.swf\" /><child label=\"Tool Options Palette\" id=\"tool_options_palette\" movie=\"tool_options_palette.swf\" /><child label=\"Materials Palette\" id=\"materials_palette\" movie=\"materials_palette.swf\" /><child label=\"Layer Palette\" id=\"layer_palette\" movie=\"layer_palette.swf\" /><child label=\"Customize the Interface\" id=\"customize_interface\" movie=\"customize_interface.swf\" /><child label=\"Create a Custom Toolbar\" id=\"custom_toolbar\" movie=\"custom_toolbar.swf\" /><child label=\"Preferences\" id=\"preferences\" movie=\"preferences.swf\" /></parent><parent label=\"Automate Your Work\"><child label=\"Presets\" id=\"presets\" movie=\"presets.swf\" /><child label=\"Automated Productivity Scripts\" id=\"scripts\" movie=\"scripts.swf\" /><child label=\"Batch Process\" id=\"batch_process\" movie=\"batch_process.swf\" /><child label=\"Batch Rename\" id=\"batch_rename\" movie=\"batch_rename.swf\" /></parent><parent label=\"Photo Features\"><child label=\"Digital Cameras\" id=\"digital_cameras\" movie=\"digital_cameras.swf\" /><child label=\"Scan Images\" id=\"scan\" movie=\"scan.swf\" /><child label=\"Rotate a Photo\" id=\"rotate\" movie=\"rotate.swf\" /><child label=\"Straighten a Photo\" id=\"straighten\" movie=\"straighten.swf\" /><child label=\"Crop a Photo\" id=\"crop\" movie=\"crop.swf\" /><child label=\"Resize a Photo\" id=\"resize\" movie=\"resize.swf\" /><child label=\"Easy Photo Correction\" id=\"photo_correction\" movie=\"photo_correction.swf\" /><child label=\"Remove Red-eye\" id=\"redeye\" movie=\"redeye.swf\" /><child label=\"Repair Scratches\" id=\"repair_scratches\" movie=\"repair_scratches.swf\" /><child label=\"Perspective Correction\" id=\"perspective_correction\" movie=\"perspective_correction.swf\" /><child label=\"Clone Brush\" id=\"clone_brush\" movie=\"clone_brush.swf\" /><child label=\"Warp Brush\" id=\"warp_brush\" movie=\"warp_brush.swf\" /><child label=\"Photo Effects\" id=\"photo_effects\" movie=\"photo_effects.swf\" /><child label=\"Background Eraser\" id=\"background_eraser\" movie=\"background_eraser.swf\" /><child label=\"Tinting a Photo\" id=\"tinting\" movie=\"tinting.swf\" /><child label=\"Photo Collage\" id=\"photo_collage\" movie=\"photo_collage.swf\" /><child label=\"Picture Frames\" id=\"picture_frames\" movie=\"picture_frames.swf\" /><child label=\"Print Templates\" id=\"print_templates\" movie=\"print_templates.swf\" /><child label=\"Online Photo Services\" id=\"photo_sharing\" movie=\"photo_sharing.swf\" /></parent><parent label=\"Painting and Drawing\"><child label=\"Paint Brush\" id=\"paint_brush\" movie=\"paint_brush.swf\" /><child label=\"Picture Tubes\" id=\"picture_tubes\" movie=\"picture_tubes.swf\" /><child label=\"Preset Shapes\" id=\"preset_shapes\" movie=\"preset_shapes.swf\" /><child label=\"Vector Drawing\" id=\"vector_drawing\" movie=\"vector_drawing.swf\" /><child label=\"Add a Text Caption\" id=\"add_text\" movie=\"add_text.swf\" /><child label=\"Text on a Path\" id=\"text_path\" movie=\"text_path.swf\" /></parent><parent label=\"Web Graphics\"><child label=\"Seamless Tiling\" id=\"seamless_tiling\" movie=\"seamless_tiling.swf\" /><child label=\"Buttons\" id=\"buttons\" movie=\"buttons.swf\" /><child label=\"Optimizing Images\" id=\"optimize\" movie=\"optimize.swf\" /><child label=\"Image Mapping\" id=\"mapping\" movie=\"mapping.swf\" /><child label=\"Image Slicing\" id=\"slicing\" movie=\"slicing.swf\" /></parent><parent label=\"Learning Resources\"><child label=\"Quick Guides\" id=\"quick_guides\" movie=\"quick_guides.swf\" /><child label=\"Help and User Guide\" id=\"psp_help\" movie=\"psp_help.swf\" /><child label=\"Tutorials at Jasc.com\" id=\"jasc_com\" movie=\"jasc_com.swf\" /></parent>";
  3. _global.numberID2stringID = new Object();
  4. _global.numberID2stringID["1"] = "welcome";
  5. _global.numberID2stringID["2"] = "tool_palette";
  6. _global.numberID2stringID["3"] = "tool_options_palette";
  7. _global.numberID2stringID["4"] = "materials_palette";
  8. _global.numberID2stringID["5"] = "layer_palette";
  9. _global.numberID2stringID["6"] = "customize_interface";
  10. _global.numberID2stringID["7"] = "custom_toolbar";
  11. _global.numberID2stringID["8"] = "preferences";
  12. _global.numberID2stringID["9"] = "presets";
  13. _global.numberID2stringID["10"] = "scripts";
  14. _global.numberID2stringID["11"] = "batch_process";
  15. _global.numberID2stringID["12"] = "batch_rename";
  16. _global.numberID2stringID["13"] = "digital_cameras";
  17. _global.numberID2stringID["14"] = "scan";
  18. _global.numberID2stringID["15"] = "rotate";
  19. _global.numberID2stringID["16"] = "straighten";
  20. _global.numberID2stringID["17"] = "crop";
  21. _global.numberID2stringID["18"] = "resize";
  22. _global.numberID2stringID["19"] = "photo_correction";
  23. _global.numberID2stringID["20"] = "redeye";
  24. _global.numberID2stringID["21"] = "repair_scratches";
  25. _global.numberID2stringID["22"] = "perspective_correction";
  26. _global.numberID2stringID["23"] = "clone_brush";
  27. _global.numberID2stringID["24"] = "warp_brush";
  28. _global.numberID2stringID["25"] = "photo_effects";
  29. _global.numberID2stringID["26"] = "background_eraser";
  30. _global.numberID2stringID["27"] = "tinting";
  31. _global.numberID2stringID["28"] = "photo_collage";
  32. _global.numberID2stringID["29"] = "picture_frames";
  33. _global.numberID2stringID["30"] = "print_templates";
  34. _global.numberID2stringID["31"] = "photo_sharing";
  35. _global.numberID2stringID["32"] = "paint_brush";
  36. _global.numberID2stringID["33"] = "picture_tubes";
  37. _global.numberID2stringID["34"] = "preset_shapes";
  38. _global.numberID2stringID["35"] = "vector_drawing";
  39. _global.numberID2stringID["36"] = "add_text";
  40. _global.numberID2stringID["37"] = "text_path";
  41. _global.numberID2stringID["38"] = "seamless_tiling";
  42. _global.numberID2stringID["39"] = "buttons";
  43. _global.numberID2stringID["40"] = "optimize";
  44. _global.numberID2stringID["41"] = "mapping";
  45. _global.numberID2stringID["42"] = "slicing";
  46. _global.numberID2stringID["43"] = "quick_guides";
  47. _global.numberID2stringID["44"] = "psp_help";
  48. _global.numberID2stringID["45"] = "jasc_com";
  49. _global.childCallBack = function(child)
  50. {
  51.    mainwindow.stop();
  52.    mainwindow.unloadMovie();
  53.    mainwindow.loadMovie(child.movie);
  54. };
  55. menu.init(theXML,childCallback);
  56. loadMovie("welcome.swf","_root.mainwindow");
  57. _global.helpSyncerExe = "tourSync.exe";
  58. this.onEnterFrame = function()
  59. {
  60.    _global.helpSyncerIDFile = _level0.ssStartDir + "\\tourTopic.id";
  61.    _global.syncSWFToHelp();
  62.    setInterval(_global,"syncSWFToHelp",750);
  63.    delete this.onEnterFrame;
  64. };
  65. _global.syncHelpToSWF = function(id)
  66. {
  67.    fscommand("Run.Mode","HIDDEN");
  68.    fscommand("Run.App",_global.helpSyncerExe + " synchelp " + id);
  69. };
  70. _global.lastHelpID = "";
  71. _global.syncSWFToHelp = function()
  72. {
  73.    fscommand("Arg","_level0.swfStudioResult");
  74.    fscommand("Arg",_global.helpSyncerIDFile);
  75.    fscommand("FileSys2.FileExists");
  76.    if(_level0.swfStudioResult == "TRUE")
  77.    {
  78.       _level0.swfStudioResult = null;
  79.       delete _level0.swfStudioResult;
  80.       fscommand("Arg","_level0.swfStudioNewHelpID");
  81.       fscommand("Arg",_global.helpSyncerIDFile);
  82.       fscommand("FileSys2.ReadFile");
  83.       if(_level0.swfStudioNewHelpID != null && _level0.swfStudioNewHelpID != "" && _level0.swfStudioNewHelpID != _global.lastHelpID)
  84.       {
  85.          _global.lastHelpID = _level0.swfStudioNewHelpID;
  86.          var c = _global.menu.selectItem(_global.numberID2stringID[_level0.swfStudioNewHelpID]);
  87.          if(c != null)
  88.          {
  89.             _global.childCallBack(c);
  90.             _global.nukeSyncFile();
  91.          }
  92.       }
  93.       _level0.swfStudioNewHelpID = null;
  94.       delete _level0.swfStudioNewHelpID;
  95.    }
  96. };
  97. _global.nukeSyncFile = function()
  98. {
  99.    fscommand("Arg","_level0.swfStudioDelResult");
  100.    fscommand("Arg",_global.helpSyncerIDFile);
  101.    fscommand("FileSys2.DeleteFile");
  102. };
  103.