2017년 3월 26일 일요일

set max value of slider


I need to set Mid and max value of slider which depends on Ibresult text for making mp3 sound because I have many files of mp3 and each file has different duration some of them has one hour and other has half an hour. My question is how can I set the max value of slider and update each time?


--
From you blocks and description I do not have enough information to help you. Please prepare a small example and post the .aia

--
I attached the file. I tried so many times to set max value but unfortunately I could not do it. Also the thumbPosition can not move.


--
There is a problem with handling the slider in the way you try to do it. Each time you set the thumb position, also the thumb position changed event will be fired and because of that the player restarts every time the timer fires, because you try to set the tumb to the current position. This chokes the app very quicly. It ran out of memory or I had to restart my phone.
The only way this can be solved is by having two sliders, one showing the progress (without thumb), the other allowing a drag of the thuimb and then restart at that place.
I will post the corrected example tomorrow, I need improve some small things first.

--
I tried hard to improve the app, but still I can not set Min and max value of slider and also make the slider move every time the timer move. Please see the attached aia.


-- 
You do not have to shout at me. I told you to wait!!
I cannot even load your app, so I cannot look at it.

Here is an app that almost works.
- You can select a chapter and it will start playing.
- it will show a yellow progress bar.
- You can move the thumb of the second slider and the player will move to that position
- You can stop.
- sometimes you can pause

There are problems with the play button, I will look at this later today.

--
Here is a better version.
I think that there is a problem in TaifunPlayer, which means that isPlaying is not set to true when playing is resumed after pause. I will try to find out.

This version should work however. If you have question, please ask (in the forum!!)

--
I really appreciate of your great help and supporting.
Every things is ok, but I have noticed that when I press pause button then play button, I can move the slider but the time can not be changed. 

--
This is an App Inventor issue. I have some tips for a workaround, but no time today. Be patient. 

--
The problem with Pause cannot be solved right now. It is an AI2 problem. I suggest you take it out.
The tips i recieved to use one slider instead of two, unfortunately do not work either. I am still in discussion about this.
So for now, be happy with what you have got, it is the best I can do.

--
Thank you so much Ghica for all of your efforts to solve all problems I had faced. Without your help after God,I Would not succed to publish my app.

--

댓글 없음:

댓글 쓰기