| QUOTE (koldfuzion @ Nov 3 2003, 03:12 PM) |
| Great to see more and more actionscripts being made.. truely displays the power of MXM.. power the users can control. Alphabet Soup is a an actionscript im working on to allow dynamic text editing of actionscript text elements. For the most part it is working great, just need more tweaking. to use it. you will just have to define the values/strings/colors you want and use a callfile to include it in your script, it will pass back the editied information to your script so you can save the value to xml, manipulate some it more or whatever your plans are for the users input. Working it without arrays to some sort of character object makes the script a little longer than i could have been.. but that isnt the problem. the problem is.. what do we do to make callfile for support scripts foolproof? users might place the scripts in different areas on their hard drive... so how could this be fixed? maybe pull the path of the current script (not declaring it..or setting it manually, but pull the path that it is currently located in) and set that as the default path for the scripts it calls? any ideas? |
| QUOTE |
Well, callscripts can be included in the MXM.xml (in the |
| QUOTE |
| I'm thinking of a few different ways of doing it, and I would like to settle on one that allows "Pulg-n-play" so users merely drop in their scripts. My thought was a "magic" directory, where the file would be gobbled up into an XML file that would actually have the script file. After updating the XML, it would delete the original, or move it into another directory. |
| QUOTE |
;######################################## ;# Name: Alphabet Soup ;# Author:koldfuzion ;# Date: 11-6-2003 ;# Filename: alphabetsoup.xas ;# Version: 1.0 ;# Purpose: A text input script uses the following values ;# to define input, message and button options. ;# -Editable text can only be 23 characters long ;# -A Default value should be given so the user has an idea of what they are editing. ;# -Cursor is defined as brackets. [] its unsightly but allows the editable text to appear anywhere on screen ;# without having to worry about the "cursor" being off.. or having to be set to specific coordinates. ;# ;# -asoupLocation ="c:\mxmscripts\alphabetsoup.xas" defines the path so multiple calls can be made ;# during the main script executions (only needs to be set once) ;# ;# -THE FOLLOWING VARS ARE TO BE USED TO DEFINE BUTTON ACTIONS TO LABELS (GOTO) ;# -Thumb DN, UP, LEFT, RIGHT are not assignable, used by the script for editing. ;# asoupQUIT -PREDEFINED LABEL ;# asoupACCEPTED -PREDEFINED LABEL ;# asoupCASECHANGE -PREDEFINED LABEL ;# asoupA - SET asoupA _asoupACCEPTED ;# asoupB ;# asoupX - SET asoupA _asoupCASECHANGE ;# asoupY ;# asoupWHITE ;# asoupBLACK - SET asoupA _asoupQUIT ;# asoupTRGRT ;# asoupTHUMBLF ;# asoupTRGLT ;# asoupTHUMBRT ;# asoupBACK ;# asoupSTART ;# ;# -Message BEFORE editable text ;# asoupMSGPRE - SET asoupMSGPRE "Fill in the blank. Big " ;# ;# -EDITABLE INPUT IS DEFINED BY ;# asoupIN - SET asoupIN "mother" -can be predifined text, system variable or another variable value. ;# ;# -Message AFTER editable text ;# asoupMSGPOST - SET asoupMSGPOST " trucker" ;# ;# ;# -the before, after and input text are combined to a single sentence, all special tags, $eol$, can be used as normal. ;# the displayed message in this case would be ;# - "Fill in the blank. Big [m]other trucker" = mother would be editable. ;# ;# -RETURNED VALUE for write out to xml or to set variable is ;# %_asoupBOWL% - would return "mother" if canceled or accepted. or whatever value the user changes it to. ;###################################################### |
| QUOTE |
SET asoupLocation c:mxmscriptsalphabetsoup.xas ; location of alphabetsoup script SET asoupIN "$NAME$" ;default value to provide (will return same value if canceled by user) SET asoupMSGPRE "LEFT-RIGHT thumbpad to move cursor$eol$UP-DOWN thumbpad to change values$eol$Press X to Change Case$eol$Press A to Accept$eol$$eol$" SET asoupMSGPOST " <<- Edit your Name." SET asoupBLACK asoupQUIT ;asoupQuit - CANCEL INPUT AND RETAIN DEFAULT VALUE SET asoupA soupACCEPTED ;asoupACCEPTED - to accept value of input SET asoupX asoupCASECHANGE ;asoupCASECHANGE - to change case of letter. Callfile %asoupLocation% :TELLNAME BeginDraw UseCurrent MessageBox "Your new name is %_asoupBOWL%" EndDraw Input If %_GP_A% == "1" GOTO QUIT GOTO ACCEPTED :QUIT QUIT |
| QUOTE (koldfuzion @ Nov 8 2003, 12:44 PM) |
| ok BJ, I think i ran into a problem that will most likely need to be dealt with internally. the script works fine.. but if i was to read in a value like "c:mxmskins" there is no way for me to escape the to allow the path to be edited. I know i can use SET thisvar "c:\mxmskins" to actually set it.. but i'm refering to a value that is already set. I havent checked what would happen if I did an xml read and the skinpath value was "c:mxmskins" but i am assuming it would return "c:mxmskins" with no way to escape the for editing. Any ideas? |
| QUOTE |
| ;# -Editable text can only be 23 characters long |