Hi Stevensacks,

I ended up at your site through the flashcoders-list.
As I do enjoy having an efficient workflow, or wish that I have - I got
your jsfl-scripts.

but I wonder why you, as you are a coder want the same name of
the libraryitem also on the instance - since one libraryitem can
be having mutiple instances.

This is what I have done (having two input alerts):

if (fl.getDocumentDOM().selection.length > 0)
{
        var libraryName = prompt("Library Name", "");
        var mcName = prompt("MC Name", "");
        if(mcName == "") mcName = libraryName;
        if (libraryName != null)
        {
                var newMc = fl.getDocumentDOM().convertToSymbol("movie
clip", libraryName, "top left");
                fl.getDocumentDOM().selection[0].name = mcName;
                fl.getDocumentDOM().enterEditMode("inPlace");
                var tl = fl.getDocumentDOM().getTimeline();
                tl.insertFrames(2);
                tl.convertToKeyframes(0, 2);
                tl.addNewLayer("LABELS");
                tl.convertToKeyframes(0, 2);
                tl.layers[tl.currentLayer].frames[0].name = "_up";
                tl.layers[tl.currentLayer].frames[1].name = "_over";
                tl.layers[tl.currentLayer].frames[2].name = "_down";
                tl.addNewLayer("AS");
                tl.layers[tl.currentLayer].frames[0].actionScript =
"stop();n";
                fl.getDocumentDOM().exitEditMode();
        }
}
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to