• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

AS 3.0 textField

Explorer ,
Dec 28, 2022 Dec 28, 2022

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

 

Views

593

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 28, 2022 Dec 28, 2022

Copy link to clipboard

Copied

Hi.

 

Can you show your actual code and possibly some visuals of what you're doing?

Regards,

JC

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 28, 2022 Dec 28, 2022

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);
}

}

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 28, 2022 Dec 28, 2022

Copy link to clipboard

Copied

fla file cannot be attached

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 28, 2022 Dec 28, 2022

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 28, 2022 Dec 28, 2022

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 28, 2022 Dec 28, 2022

Copy link to clipboard

Copied

@Choi24652308akbg 

 

from where did you download that fla?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 31, 2022 Dec 31, 2022

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 31, 2022 Dec 31, 2022

Copy link to clipboard

Copied

LATEST

@Choi24652308akbg 

 

1. stop posting duplicate messages.

2. and for the third time, who shared that with you or where did you get that dropbox link?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 28, 2022 Dec 28, 2022

Copy link to clipboard

Copied

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 28, 2022 Dec 28, 2022

Copy link to clipboard

Copied

@Choi24652308akbg 

 

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

 

https://www.dropbox.com/basichttps://www.dropbox.com/basichttps://www.dropbox.com/basichttps://www.d...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 28, 2022 Dec 28, 2022

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 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 28, 2022 Dec 28, 2022

Copy link to clipboard

Copied

who shared that with you or where did you get that dropbox link?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 28, 2022 Dec 28, 2022

Copy link to clipboard

Copied

and what's the problem that you see?  an error message?  something else?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines