[screenweaver] help.map and customactions helpid

Muzak p.ginneberge at telenet.be
Mon Sep 5 03:43:08 PDT 2005


Unless it has changed in the upcoming version, I'm afraid there's no way around it :/

I'm about to write a parser now though. One that takes the customactions.xml and spits out the help.map and injects the correct 
helpid values in .xml file.
For that to work we'll have to make a few assumptions/rules.

Here's a stripped down customactions.xml

<folder VERSION="7" id="SWMX" index="true" name="Screenweaver" tiptext="Screenweaver API">
    <folder VERSION="7" id="ActionScript API" index="true" name="ActionScript API" tiptext="ActionScript API">
        <folder VERSION="6" id="swApplication" index="true" name="swApplication" tiptext="application object" >
            <string OBJECT="swApplication" TEXT="swApplication.call()" name="call" helpid="6001"  />
            <string OBJECT="swApplication" TEXT="swApplication.closeWindow()" name="closeWindow" helpid="6002" />
        </folder>
    </folder>
</folder>

The 2 string nodes correspond with these html files that need to be defined in the help.map (paths are relative to help.map)

ActionScript_API\swApplication\call.html
ActionScript_API\swApplication\closeWindow.html

So those paths can be created using the 'id' values of the folder nodes and the 'name' values of the string nodes.
The only different thing is the space in 'ActionScript API' which needs to be an underscore in the actual path.

So what the parser app needs to do is read all the 'string' nodes and assign them helpid's, starting at 6001 and at the same time 
make the help.map file for each 'string' node entry. This will ensure that there's no duplicate helpid's (they have to be unique) 
and that each helpid matches the right html file (which is a nightmare doing it manually).

I'll see if I can get that working today (or in the upcoming days).
Should be fun with Flash and Screenweaver ;-)

regards,
Muzak



----- Original Message ----- 
From: "Edwin van Rijkom" <swos at vanrijkom.org>
To: <screenweaver at osflash.org>
Sent: Monday, September 05, 2005 8:52 AM
Subject: Re: [screenweaver] help.map and customactions helpid


> Thanks for the hard work, Muzak!
>
> It sounds like a terrible situation to maintain. I guess there's no way to circumvent this, right?
>
> Chees,
> Edwin
>
> Muzak wrote:
>
>>To get that 'show help' option to work in the Actions Panel, the customactions.xml needs a helpid attribute defined.
>>And then a help.map file is needed to map the helpid values to the correct .html page.
>>The thing is Macromedia decided to make one value numeric (customactions) and the other hexadecimal (help.map).
>>But there's more.. The hex value in the help.map file needs to be prefixed with 'x2' (another nice MM decision).
>>
>>helpid = 6000 --> hex = 1770 --> map id = x21770
>>
>>As we need about 300 id's, I put together a swf file that calculates a specified range of hex values, displays them in a datagrid
>>(Number, Hex, Map values) and allows you to copy them to the clipboard (all at once, or one at a time).
>>
>>http://muzakdeezign.com/swos/number_to_hex.html
>>
>>here's the .swf in case someone else needs it when working on the docs.
>>http://muzakdeezign.com/swos/customactions_helpid.zip
>>
>>regards,
>>Muzak






More information about the screenweaver mailing list