Copy link to clipboard
Copied
Thank you always for your sincere answers
This is a question about AS3.0 textfield
-------------------------------------------------- --------------------
var n:Number;
var sm:Array; (sound list)
var completed:Array; (sound completed list)
1. textbox draw (width 200, height 400)
fieldType - dynamic
instance - textList
2. When the sound ends
completed. push(sm[n]);
3. When the button is clicked
completedList();
function completedList():void {
var tx:String;
var addTx:String;
for (var i:uint=0; i<completed.length; i++) {
tx = (i<9) ? String(" "+(i+1)) : String(i+1);
addTx = tx+ " - "+completed[i]+"\n";
if (i==0) textList.appendText("----- Music Played List ----- \n");
textList. appendText(addTx);
}
}
-------------------------------------------------- --------------------------
Click on one of the rows to play that list song again.
4. How can I select one of each row of the textList in this case
5. How to scroll when the number of rows is out of range of the textbox
Politely contact us to solve the problem
thank you
Copy link to clipboard
Copied
Hi.
Can you show your actual code and possibly some visuals of what you're doing?
Regards,
JC
Copy link to clipboard
Copied
When you click the music button, the list of played music is listed on the right.
How to select one of them and play it again...
And if the list has more textfield, you can scroll.
I would like to know how
* It's Google translation, so please understand if it's not enough
thank you
---------------------------------------------------------
var channel:SoundChannel;
var pausePosition:Number;
var sound:Sound;
var ptrans:SoundTransform;
var n:uint;
var p:uint;
var v:uint = 0;
var count:uint = 0;
var loopCount:uint = 0;
var completed:Array = [];
sm.sort();
for (var i:uint=0; i < sm.length; i++) {
cb.addItem({label:sm[i],data:i});
}
// Music Start ===================================================
function music_start(url:String):void {
if (channel) { channel.stop(); }
n = p = sm.indexOf(url);
url = dm + url + ".mp3";
var mySound:Sound = new Sound(new URLRequest(url));
var myChannel:SoundChannel = new SoundChannel();
myChannel = mySound.play(0);
sound = mySound;
channel = myChannel;
channel.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
}
var delayTimer:Timer = new Timer(500, 1);
function soundCompleteHandler(event:Event):void {
delayTimer.addEventListener(TimerEvent.TIMER, indexReplay);
delayTimer.start();
}
function indexReplay(event:TimerEvent):void {
completed.push(sm[n]);
if (completed.length>22) completed.shift();
if ((listOK) && (completed.length > 0)) {
textList.text = String(" ");
completedList();
}
music_start(sm[n]);
}
pList_btn.addEventListener(MouseEvent.CLICK,completedListOK);
pList_btn.buttonMode = true;
pList_btn.gotoAndStop(1);
var listOK:Boolean = false;
function completedListOK(evt:MouseEvent):void {
listOK = !listOK;
if (listOK) {
pList_btn.gotoAndStop(2);
completedList();
} else {
pList_btn.gotoAndStop(1);
textList.text = String(" ");
}
}
function completedList():void {
var tx:String;
var addTx:String;
for (var i:uint=0; i<completed.length; i++) {
tx = (i<9) ? String(" "+(i+1)) : String(i+1);
addTx = tx+ " - "+completed[i]+"\n";
if (i==0) textList.appendText(" ----- Music Played List ----- \n");
textList.appendText(addTx);
}
}
Copy link to clipboard
Copied
fla file cannot be attached
Copy link to clipboard
Copied
Thanks.
Please upload the FLA to a file sharing service like Creative Cloud, Google Drive, Dropbox, OnDrive, WeTransfer, and so on, and paste the link here.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
There seems to be a problem with the file sharing program.
Can you give me your email address to my email?
Copy link to clipboard
Copied
1. stop posting duplicate messages.
2. and for the third time, who shared that with you or where did you get that dropbox link?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
that pic is not helpful. start here if you don't understand how to use a file-sharing service (for free), https://www.dropbox.com/basic
Copy link to clipboard
Copied
https://www.dropbox.com/s/vq6ltgbc659dc1t/sound.fla?dl=0
When you click the music button, the list of played music is listed on the right.
How to select one of them and play it again...
And if the list has more textfield, you can scroll.
I would like to know how
Thank You
Copy link to clipboard
Copied
who shared that with you or where did you get that dropbox link?
Copy link to clipboard
Copied
and what's the problem that you see? an error message? something else?