2013-03-25 63 views
0

1)當你在編輯模式下爲一個符號,進入編輯下一個符號庫Flash Pro CS6有這些熱鍵嗎?

2)自動把光標在實例名稱框中選定的動畫片段

據我所知,有沒有辦法把shorcuts的走動

一個副本,並編輯快捷鍵將肯定是很好,雖然「庫面板內」。我甚至找不到自定義快捷方式中的位置。

回答

0

您列出沒有快捷鍵,因爲它們不是默認的IDE內任務的例子。這就是說,您可以創建方法來使用JSFL執行這些示例,以首先創建一個命令,然後爲該命令指定一個鍵盤快捷鍵。作爲例子,我將在列表中包含第二個項目的腳本。

2)自動把光標在實例名稱框中選定 的動畫片段

目前沒有一個方法來告訴IDE光標發送到實例名稱框在屬性面板,但你可以通過使用JSFL來解決這個問題。讓我們創建自己的實例名稱框。

這裏是要做到這一點所需的代碼:

// Assign Instance Name - Andrew Doll 

/* This code will provide a prompt for the user to assign an instance name to a selected symbol on the stage. The great thing about using a 
// prompt is that the focus is already in the input field of the prompt. To speed up your workflow I recommend assigning a keyboard 
// shortcut to this command. 
*/ 

// Check to see if there is a file open first. 
var dom = fl.getDocumentDOM(); 
if (dom == null) 
{ 
    alert("Please open a file."); 
} 
else 
{ 
    // Make sure to only select one symbol on the stage at a time. 
    if (dom.selection.length > 1) 
    { 
     alert("You can only select one symbol to assign an instance name to. Please make only a single selection on the stage."); 
    } 
    // Make sure that you have at least one symbol selected. 
    else if (dom.selection.length == 0) 
    { 
     alert("You need to select a symbol on the stage to assign an instance name."); 
    } 
    // Make sure that the symbol you have selected is a movie clip or a button. 
    else if (dom.selection[0].symbolType == "graphic" || dom.selection[0].elementType != "instance") 
    { 
     alert("Your selection needs to be a button or a movie clip symbol."); 
    } 
    else 
    { 
     // Pop up a prompt for the user to assign an instance name with. 
     var iName = prompt("Assign an instance name to the selected symbol."); 
     // If the user cancels then do nothing. 
     if (iName == null) 
     { 
      // Do Nothing. 
     } 
     else 
     { 
      // Assign the instance name to the selected symbol. 
      dom.selection[0].name = iName; 
     } 
    } 
} 

保存此命令在命令的腳本JSFL在您的Flash config目錄文件夾,然後分配鍵盤快捷方式。