Colorized syntax for ActionScript

Colorized syntax for ActionScript

2
NewbieNewbie
2

    Oct 21, 2006#1

    Hello,
    I've prepared the wordfile.txt file especially for the ActionScript language.
    I used to select the php language to work because it's similar for many functions ... but rarely for the properties.
    So after few hours, I have set up something which is not perfect but which would suit not too bad, because I have collected many datas from the help of flash, I have dispatched the words in different groups, sorted them according to what UE expect, be careful with duplicates ...
    I thought it should be ok, but it doesn't work for many words and I don't know what's happening, of course !
    So this is the interesting part of the file and I hope you will let me know if you have improved it ( no attachment possible ... )
    I use the 12.00 version

    Code: Select all

    /L12"ActionScript" Nocase HTML_LANG Line Comment = // Line Comment Alt = # Block Comment On = /* Block Comment Off = */ Block Comment On Alt = <!-- Block Comment Off Alt = --> Escape Char = \ String Chars = "'  File Extensions = AS
    /Delimiters = ~!@%^&*()+-=|\{}[]:;"'<> ,	.?_
    /Function String = "%[^t ]++function[^t ]+^([a-zA-Z0-9_&]+*^){"
    /Function String 1 = "%[^t ]++function[^t ]+^([a-zA-Z0-9_&]+*^)^p*{"
    /Indent Strings = "{"
    /Unindent Strings = "}"
    /C1"Bibs" STYLE_TAG
    accessibility behaviors containers controls core data effects events lang managers mx screens services skins styles
    transitions utils video xpath
    /C2"Properties" STYLE_ATTRIBUTE
    UTC VPixels __proto__ __resolve _accProps _alpha _currentframe _droptarget _focusrect _framesloaded _global _height
    _highquality _level _listeners _lockroot _name _parent _quality _root _rotation _soundbuftime _target _totalframes _url
    _visible _width _x _xmouse _xscale _y _ymouse _yscale a accName actionScript activeEffect activityLevel aliasText align
    alignment allowSmoothing alpha alphaMultiplier alphaOffset alphas angle antiAliasSharpness antiAliasThickness antiAliasType
    attributes autoExpand autoKern autoLabel autoReplace autoSize avHardwareDisable available b background backgroundColor
    bandwidth bias bitRate bits blendMode blockIndent blueMultiplier blueOffset blurX blurY bold border borderColor bottom
    bottomRight bottomScroll breakAtCorners brightness bufferLength bufferTime builtInItems bullet buttonTracking bytesLoaded
    bytesTotal c cacheAsBitmap callee caller capType caption category characterPosition characterSpacing characters childNodes
    childScreens clamp color colorAlphaAmount colorAlphaPercent colorArray colorBlueAmount colorBluePercent colorGreenAmount
    colorGreenPercent colorMode colorRedAmount colorRedPercent colorTransform colors componentX componentY componentsPanel
    compressionType concatenatedColorTransform concatenatedMatrix condenseWhite configDirectory configURI constructor
    contactSensitiveSelection contentType contours contrast convertStereoToMono createNewDocList createNewDocListType
    createNewTemplateList creationDate creator currentFps currentFrame currentLayer currentPublishProfile currentScreen
    currentTimeline curve customItems d dash1 dash2 deblocking defaultItem density depth description display displayName distance
    divisor docTypeDecl documents dotSize dotSpace drawingLayer duration edges effectName elementType elements embedFonts
    embedRanges embeddedCharacters enabled exactSettings face fileList fillColor filters firstChild firstFrame focalPoint
    focusEnabled font fontFamily fontRenderingMode fontSize fontStyle fontWeight forceSimple fps frameCount frameRate frames gain
    getDate getDay getFullYear getHours getMilliseconds getMinutes getMonth getSeconds getTime getTimezoneOffset getUTCDate
    getUTCDay getUTCFullYear getUTCHours getUTCMilliseconds getUTCMinutes getUTCMonth getUTCSeconds getUTCYear getYear
    greenMultiplier greenOffset gridFitType groupName hPixels hasAccessibility hasAudio hasAudioEncoder hasCustomEase
    hasEmbeddedVideo hasIME hasMP3 hasPrinting hasScreenBroadcast hasScreenPlayback hasStreamingAudio hasStreamingVideo
    hasVideoEncoder hatchThickness height hidden hideObject highlightAlpha highlightColor hitArea hscroll html htmlText hue
    iconID id id3 idMap ignoreWhite indent index inner instanceName instanceType interior isDebugger isDrawingObject isGroup
    isLine isMissing italic itemType itemURI items jiggle joinType kerning knockout labelType language languageCodeArray
    lastChild layer layerCount layerType layers leading left leftMargin length letterSpacing library libraryItem lineSpacing
    lineType linearRGB linkageClassName linkageExportForAS linkageExportForRS linkageExportInFirstFrame linkageIdentifier
    linkageImportForRS linkageURL list listIndex livePreview loaded localFileReadDisable localName locked loop manufacturer
    mapBitmap mapPoint marginLeft marginRight matrix matrix matrixX matrixY maxCharacters maxChars maxLevel maxhscroll maxscroll
    menu message miterLimit mode modificationDate motionLevel motionTimeOut motionTweenOrientToPath motionTweenRotate
    motionTweenRotateTimes motionTweenScale motionTweenSnap motionTweenSync mouseWheelEnabled mruRecentFileList
    mruRecentFileListType multiline muted name names namespaceURI nextScreen nextSibling nodeName nodeType nodeValue
    objectDrawingMode opaqueBackground orientation os outline outputPanel overflow pageHeight pageWidth paperHeight paperWidth
    parameters parentLayer parentNode parentScreen password path pattern pixelAspectRatio pixelBounds playerType posArray
    position prefix preserveAlpha prevScreen previousSibling projectURI prototype publishProfile publishProfiles quality rate
    ratios rectangle redMultiplier redOffset reload renderAsHTML restrict rgb right rightMargin rootScreen rotation sampleRate
    sandboxType saturation scale9Grid scaleMode scaleType scaleX scaleY scalingGrid scalingGridRect screenColor screenDPI
    screenOutline screenResolutionX screenResolutionY scrollRect scrollable selectable selected selection selectionEnd
    selectionStart separatorBefore serverString setDate setFullYear setHours setMilliseconds setMinutes setMonth setSeconds
    setTime setUTCDate setUTCFullYear setUTCHours setUTCMilliseconds setUTCMinutes setUTCMonth setUTCSeconds setYear shadowAlpha
    shadowColor shapeFill shapeTweenBlend sharpness shortcut showMenu silenceLevel silenceTimeOut silent size size smoothing
    soundEffect soundLibraryItem soundLoop soundLoopMode soundName soundSync sourceAutoUpdate sourceFile sourceFilePath
    sourceLibraryName space startFrame status strength stringIDArray strokeHinting style styleSheet symbolType tabChildren
    tabEnabled tabIndex tabStops target text textAlign textAttrs textColor textDecoration textHeight textIndent textRuns textType
    textWidth thickness time timeline timelines tools top topLeft trackAsMenu transform transparent tweenEasing tweenType tx ty
    type underline url useCodepage useDeviceFonts useEchoSuppression useHandCursor useImportedJPEGQuality useImportedMP3Quality
    useSingleEaseCurve useXMLToUI value valueType variable variableName variation verbose version vertices videoType viewMatrix
    visible waveHeight waveLength width wordWrap xmlDecl xmlui y zoomFactor
    /C3"Components" STYLE_STATEMENT
    #include Accordion Alert Array Boolean Button Camera CellRenderer CheckBox Collection Color ComboBox ComponentMixins
    ContextMenu ContextMenuItem CustomActions CustomFormatter CustomValidator DataGrid DataGridColumn DataHolder DataProvider
    DataSet DataType Date DateChooser DateField Delta DeltaItem DeltaPacket DepthManager EndPoint Error EventDispatcher
    FLVPlayback FocusManager Form Function Interface Iterator Key Label List LoadVars Loader LocalConnection Log Media
    MediaController MediaPlayback Menu MenuBar MenuDataProvider Microphone Mouse MovieClip MovieClipLoader NetConnection
    NetStream Number NumericStepper Object PendingCall Point PopUpManager PrintJob ProgressBar RDBMSResolver RadioButton
    RectBorder SOAPCall Screen ScrollPane Selection SharedObject SimpleButton Slide Sound Stage String StyleManager System
    SystemManager TextArea TextField TextFormat TextInput TextSnapshot TransferObject TransitionManager Tree TreeDataProvider
    Tween TypedValue UIComponent UIEventDispatcher UIObject UIScrollBar Video WebService WebServiceConnector Window WindowXML XML
    XMLConnector XUpdateResolver
    /C4"Operators" STYLE_OPERATOR
    |
    "
    :
    &
    *
    +
    ,
    -
    .
    /
    %
    <
    !
    >
    ^
    =
    ~
    &&
    ()
    /*..*/
    ++
    --
    //
    ?:
    <<
    <<=
    !=
    %=
    <=
    |=
    +=
    ^=
    >=
    &=
    -=
    *=
    ==
    /=
    ===
    !==
    >>
    <>
    >>=
    >>>
    >>>=
    []
    add
    ge
    ne
    le
    new
    and
    instanceof
    void
    not
    eq
    or
    lt
    gt
    ||
    {}
    /C5"events" STYLE_EXTENSION
    Error allowDomain allowInsecureDomain on onActivity onCancel onChanged onClipEvent onClose onComplete onConnect onData
    onDragOut onDragOver onEnterFrame onHTTPError onHTTPStatus onID3 onIOError onKeyDown onKeyUp onKillFocus onLoad
    onLoadComplete onLoadError onLoadInit onLoadProgress onLoadStart onMetaData onMouseDown onMouseMove onMouseUp onMouseWheel
    onOpen onPress onProgress onRelease onReleaseOutside onResize onRollOut onRollOver onScroller onSecurityError onSelect
    onSetFocus onSoundComplete onStatus onXML
    /C6"Constants" STYLE_KEYWORD
    ALPHANUMERIC_FULL ALPHANUMERIC_HALF BACKSPACE CAPSLOCK CASEINSENSITIVE CHINESE CONTROL DELETEKEY DESCENDING DOWN E END ENTER
    ESCAPE HOME INSERT JAPANESE_HIRAGANA JAPANESE_KATAKANA_FULL JAPANESE_KATAKANA_HALF KOREAN LEFT LN10 LN2 LOG10E LOG2E
    MAX_VALUE MIN_VALUE NEGATIVE_INFINITY NUMERIC NaN PGDN PGUP PI POSITIVE_INFINITY RETURNINDEXEDARRAY RIGHT SHIFT SPACE SQRT1_2
    SQRT2 TAB UNIQUESORT UNKNOWN UP true false
    /C7"Functions" STYLE_FUNCTION
    Accessibility Binding BitmapInstance BitmapItem CompiledClipInstance ComponentInstance Contour Document Edge Effect Element
    FLfile Fill Filter Frame Instance Item Layer MMExecute Math Matrix Parameter Path Project ProjectItem ScreenOutline Shape
    SoundItem Stroke SymbolInstance SymbolItem Text TextAttrs TextRun Timeline ToolObj Tools Vertex VideoItem XMLUI abstract add
    and asfunction break byte case catch catch char chr class clearInterval continue debugger default delete do double dynamic
    else elseif enum eq escape eval export extends finally finally flash float folderItem fontItem for fscommand function ge get
    getProperty getTimer getURL getVersion goto gt halfEdge if ifFrameLoaded implements import in instanceof int interface
    intrinsic isFinite isNaN le loadVariables loadVariablesNum long lt mbchr mblength mbord mbsubstring ne new not on onClipEvent
    or ord parseFloat parseInt print printAsBitmap printAsBitmapNum printNum private protected public return set setInterval
    setProperty setvariable short showRedrawRegions static super switch synchronized targetPath tellTarget this throw throws
    toggleHighQuality trace transient try typeof unescape unloadMovie unloadMovieNum updateAfterEvent var void volatile while with
    /C8"Methods" STYLE_METHOD
    BitmapData BitmapFilter BlurFilter ColorMatrixFilter ConvolutionFilter Delegate DropShadowFilter FileReference
    FileReferenceList GlowFilter GradientBevelFilter Void abs accept acos activeTool addCallback addCubicCurve addCurve addData
    addDataToDocument addDataToSelection addDelayedInstance addFile addFilter addItem addItemToDocument addListener
    addMotionGuide addNewItem addNewLayer addNewLine addNewOval addNewPublishProfile addNewRectangle addNewScene addPage addPoint
    addProperty addRequestHeader addXMLPath allowDomain allowInsecureDomain altIsDown appendChild apply applyFilter asin atan
    atan2 attachAudio attachBitmap attachMovie attachSound attachVideo beginBitmapFill beginDraw beginEdit beginFill beginFrame
    beginGradientFill broadcastMessage browse browseForFileURL browseForFolderURL call canPublishProject canTestProject cancel
    ceil charAt charCodeAt checkXMLStatus clear clearFrames clearKeyframes clone cloneNode close closeAll closeDocument
    closeProject colorTransform concat concatMatrix connect constrainPoint contains containsPoint containsRectangle
    convertToBlankKeyframes convertToKeyframes copy copyChannel copyFrames copyPixels copyScreenFromFile cos createBox
    createDocument createElement createEmptyMovieClip createFolder createGradientBox createMotionTween createProject
    createTextField createTextNode ctlIsDown cubicCurveTo curveTo cutFrames decode deleteEdge deleteItem deleteLayer deleteScreen
    deltaTransformPoint dispose doConversion domain download draw drawPath duplicateItem duplicateMovieClip duplicateScreen
    editItem enableImmediateUpdates enablePIControl endDraw endEdit endFill endFrame equals exists exp expandFolder fileExists
    fillRect findDocumentIndex findItemIndex findLayerIndex findProjectItem findText floodFill floor flush fromCharCode
    generateFilterRect getAppMemoryInfo getAscii getAttributes getBeginIndex getBits getBounds getBytesLoaded getBytesTotal
    getCaretIndex getCode getColorBoundsRect getControl getControlItemElement getConversionMode getCount getCreationDate
    getCreationDateObj getCustomEase getData getDefaultLang getDepth getDocumentDOM getEdge getEnabled getEndIndex getFocus
    getFontList getFrameProperty getHalfEdge getInstanceAtDepth getItemProperty getItemType getKeyDown getLayerProperty getLocal
    getModificationDate getModificationDateObj getNamespaceForPrefix getNewTextFormat getNext getNextHighestDepth
    getOppositeHalfEdge getPan getPersistentData getPixel getPixel32 getPrefixForNamespace getPrev getProgress getProject getRGB
    getRect getSWFVersion getSelected getSelectedFrames getSelectedItems getSelectedLayers getSelectedScreens getSelectedText
    getSize getStyle getStyleNames getText getTextAttr getTextExtent getTextFormat getTextRunInfo getTextSnapshot getTextString
    getTransform getVertex getVisible getVolume globalToLocal gotoAndPlay gotoAndStop hasChildNodes hasData hasOwnProperty
    hasPersistentData hide hideBuiltInItems hitTest hitTestTextNearPos identity importEmbeddedSWF indexOf inflate inflatePoint
    initialize insertBefore insertBlankKeyframe insertFrames insertItem insertKeyframe insertNestedScreen insertScreen install
    interpolate intersection intersects invert invertMatrix isAccessible isDown isEmpty isPropertyEnumerable isPrototypeOf
    isToggled itemExists join lastIndexOf lineGradientStyle lineStyle lineTo listFolder load loadBitmap loadClip loadLanguageXML
    loadMovie loadMovieNum loadPolicyFile loadSound loadString loadStringEx localToGlobal log makeShape mapPlayerURL max merge
    min mouseIsDown moveScreen moveTo moveToFolder newContour newFolder newPath nextFrame nextScene noise normalize offset
    offsetPoint openDocument openProject openScript paletteMap parseCSS parseXML pasteFrames pause penDownLoc penLoc perlinNoise
    pixelDissolve play pointDistance polar pop pow prevFrame prevScene projectcanPublish projectcanTest projectpublish
    projecttest publishProject push quit random read registerClass reloadEffects reloadTools remove removeData removeFrames
    removeItem removeListener removeMovieClip removeNode removePersistentData removeTextField renameItem renameScreen
    reorderLayer replaceSel replaceText reverse reverseFrames revertDocument rotate round runScript save saveAll saveDocument
    saveDocumentAs scale scroll seek selectAll selectAllFrames selectItem selectNone send sendAndLoad setActiveWindow
    setAdvancedAntialiasingTable setAttributes setBits setBufferTime setClipboard setColor setCompositionString setControl
    setControlItemElement setControlItemElements setConversionMode setCurrentScreen setCursor setCustomEase setDefaultLang
    setEmpty setEnabled setFocus setFrameProperty setGain setIcon setItemProperty setLayerProperty setLoadCallback setLocation
    setMask setMenuString setNewTextFormat setOptionsFile setPI setPan setPersistentData setPixel setPixel32 setRGB setRate
    setScreenProperty setSelectColor setSelected setSelectedFrames setSelectedLayers setSelectedScreens setSelection
    setSilenceLevel setString setStyle setTextAttr setTextFormat setTextString setToolName setToolTip setTransform
    setUseEchoSuppression setVisible setVolume shift shiftIsDown show showIdleMessage showLayerMasking showPIControl showSettings
    showTransformHandles sin slice snapPoint sort sortOn splice split splitEdge sqrt start startDrag stop stopAllSounds stopDrag
    substr substring subtract swapDepths symbolconvertToCompiledClip symbolexportSWC symbolexportSWF tan testProject threshold
    toLowerCase toString toUpperCase toolObjs transform transformPoint translate uninstall union unloadClip unshift unwatch
    updateItem upload valueOf watch write
    I can join you the lists in separated files with each word on one line, if you don't know how to split the lists (I don't personnaly !)

    6,686585
    Grand MasterGrand Master
    6,686585

      Oct 22, 2006#2

      First there is already a wordfile for ActionScript 2.0 for downloading - see on this website Downloads - Extras - Wordfiles. I can see also other ActionScript wordfiles:

      ActionScript 2.0
      Flash ActionScript v5 - 10/12/2001
      Flash ActionScript - JavaScript - 10/12/2001
      Flash MX ActionScript 3 - 08/02/2002
      Flash MX ActionScript 2004 - 10/31/2003

      Second I see in your language definition the keyword HTML_LANG but no reason why you use this keyword with its special meaning (special handling for < and </ and > and multi-language support). However, make sure you don't have a second language with the keyword HTML_LANG because this is not possible and would cause problems as mentioned in syntax.txt in the UltraEdit program directory.

      Third your Operators section contains a lot of illegal "words" because for example &= are in real 2 "words" because both characters are delimiter characters according to your definition. Delete the words which contain more than 1 delimiter character.

      Fourth your words are not correct sorted. Use my ultimate word definitions sorting macro (set) to sort the words according to the syntax highlighting rules of UltraEdit.

      Fifth use my ultimate test for duplicate words macro (set) to find duplicate words in different groups and eliminate them manually. Then run the sort macro again.

      Both macros (macro sets) are in the same macro file.

      2
      NewbieNewbie
      2

        Oct 23, 2006#3

        Thank you
        :)