View unanswered posts | View active topics



Reply to topic  [ 4 posts ] 
Copy Class Name patch 
Author Message
Member

Joined: Thu Mar 29, 2007 9:32 am
Posts: 244
I have created a patch that adds "Copy Qualified Class Name" menu item to class's context menu. This is convenient when you have to copy class names' to insert them into flash IDE as a linkage.

http://dl.dropbox.com/u/9443658/fd/copyclass.patch

Image


Last edited by ir73 on Wed Aug 04, 2010 7:34 am, edited 3 times in total.



Tue Jun 29, 2010 12:18 pm
Profile
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 11666
Location: Paris, France
Nice, I'll check it.


Tue Jun 29, 2010 8:04 pm
Profile WWW
Member

Joined: Mon Oct 16, 2006 12:02 am
Posts: 336
Location: Lviv, Ukraine
Code:
This is convenient when you have to copy class names' to insert them into flash IDE as a linkage.


I use another approach for such task. First I organize movieclips in folders (in flash library panel).
Folders structure in library represents package structure.
Then I apply jsfl script on root folder (or not root, or just on selected items).
Script configures linkage identifiers on selected clips.
For instanse: assets\items\McFooItem becomes linked as assets.items.McFooItem

jsfl script: It can be not working, because it is a part of custom FashCS panel and might have some dependencies.
That panel (with sources) can be downloaded from
http://code.google.com/p/flashcspanel/downloads/list
Instalation: copy swf to WindowSWF folder in flash CS configuration dir.
On my PC it is c:\Users\{username}\AppData\Local\Adobe\Flash CS4\en\Configuration\WindowSWF

Code:
            var items = getLibrary().getSelectedItems();
            for each (var item in items)
            {
               if (item.itemType == "folder")
                  continue;
                  
               var className = "";
               for (var i = 0; i < item.name.length; i++)
               {
                  var char = item.name.charAt(i);
                  if (isAlphanum(char))
                     className += char;
                  else if (char == "/")
                     className += ".";
               }
               
               var baseClass = '';
               if (item.itemType != 'movie clip'
                  && item.itemType != 'button'
                  && item.itemType != 'bitmap'
                  && item.itemType != 'font'
                  && item.itemType != 'sound'
               )
               {
                  continue;
               }
               
               if (item.linkageImportForRS == true)
               {
                  item.linkageImportForRS = false;
               }
               item.linkageExportForAS = true;
               item.linkageExportForRS = false;
               item.linkageExportInFirstFrame = true;
               item.linkageClassName = className;
               
               //trace(item.name);
               //trace(className);
            }
            
            libRefreshSelection();


Code:
         function libRefreshSelection()
         {
            var lib = getLibrary();
            var items = lib.getSelectedItems();
            lib.selectNone();
            for each (var item in items)
            {
               lib.selectItem(item.name, false);
            }
         }

         var getDocument = function()
         {
            return fl.getDocumentDOM();
         }
         
         var getLibrary = function()
         {
            return getDocument().library;
         }
         
         var getTimeline = function()
         {
            return getDocument().getTimeline();
         }



Wed Jun 30, 2010 11:43 am
Profile WWW
Member

Joined: Thu Mar 29, 2007 9:32 am
Posts: 244
updated for the latest trunk


Mon Jul 26, 2010 3:11 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.