Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 87530

Re: fromID action descriptor doesn't work in HTML5 panels

$
0
0

Pulled from Configurator 4's template jsx:

 

function getToolCharStringID(indescIDFromSWF)
{
    try {
        //convert the string from SWF to a number
        var id = Number(indescIDFromSWF);
       $.writeln("id:" + id);
        var desc = new ActionDescriptor();
        desc.fromID(id);
        var idNull = charIDToTypeID('null');
        var ref = desc.getReference(idNull);
        var toolID = ref.getDesiredClass();
        $.writeln("toolID:" + toolID);
        //use this to compare against spotHealingBrushTool
        var stringID = typeIDToStringID(toolID);
        $.writeln("stringID:" + stringID);
        //use this to compare against other tool codes
        var charID = typeIDToCharID(toolID);
        $.writeln("charID:" + charID);
        return (charID!=null && charID.length > 0) ? charID : stringID;;
    }catch(err){
        $.writeln ("error:" + err);
    }
}

 

It worked for me.  I haven't dissected it to see why it worked where others didn't, but the important thing is that it worked.

 

Sam


Viewing all articles
Browse latest Browse all 87530

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>