mirror of
https://github.com/scratchfoundation/scratch-flash.git
synced 2024-12-04 21:21:06 -05:00
Added "record..." to sound menu
This commit is contained in:
parent
18172ebf1b
commit
77b3788187
1 changed files with 12 additions and 1 deletions
|
@ -386,13 +386,24 @@ public class BlockMenus implements DragClient {
|
|||
}
|
||||
|
||||
private function soundMenu(evt:MouseEvent):void {
|
||||
var m:Menu = new Menu(setBlockArg, 'sound');
|
||||
function setSoundArg(s:*):void {
|
||||
if (s is Function) s()
|
||||
else setBlockArg(s);
|
||||
}
|
||||
var m:Menu = new Menu(setSoundArg, 'sound');
|
||||
if (app.viewedObj() == null) return;
|
||||
for (var i:int = 0; i < app.viewedObj().sounds.length; i++) {
|
||||
m.addItem(app.viewedObj().sounds[i].soundName);
|
||||
}
|
||||
m.addLine();
|
||||
m.addItem('record...', recordSound);
|
||||
showMenu(m);
|
||||
}
|
||||
|
||||
private function recordSound():void {
|
||||
app.setTab('sounds');
|
||||
app.soundsPart.recordSound();
|
||||
}
|
||||
|
||||
private function spriteMenu(evt:MouseEvent, includeMouse:Boolean, includeEdge:Boolean, includeStage:Boolean, includeSelf:Boolean):void {
|
||||
function setSpriteArg(s:*):void {
|
||||
|
|
Loading…
Reference in a new issue