EOS Code Enquiry
Posted: Fri Sep 24, 2021 11:42 pm
Hi Code geek,
I am writing a tease these days and wondering is it possible to show the pictures/play the audio by a function.
Say, in the File/Galleries, I have two images and two different audio tracks:
"test.jpg""test_premium.jpg"
"Easy.mp3""Hard.mps"
Now, I would like to write two functions somehow like this:
function showImage(ImageID, isPremium) {
if isPremium = 0
show ImageID.jpg
else
show ImageID + "_premium.jpg"
}
function playAudio(AudioID) {
if var difficulty = 0
play "Easy.mp3"
if var difficulty = 1
play "Hard.mp3"
}
I've realized there are some API provided in the EOS editor but I'm somehow new to the coding. and, I didn't find such one to implement the show/play module above. Anyone have any ideas or suggestions?
IreliaDenial
I am writing a tease these days and wondering is it possible to show the pictures/play the audio by a function.
Say, in the File/Galleries, I have two images and two different audio tracks:
"test.jpg""test_premium.jpg"
"Easy.mp3""Hard.mps"
Now, I would like to write two functions somehow like this:
function showImage(ImageID, isPremium) {
if isPremium = 0
show ImageID.jpg
else
show ImageID + "_premium.jpg"
}
function playAudio(AudioID) {
if var difficulty = 0
play "Easy.mp3"
if var difficulty = 1
play "Hard.mp3"
}
I've realized there are some API provided in the EOS editor but I'm somehow new to the coding. and, I didn't find such one to implement the show/play module above. Anyone have any ideas or suggestions?
IreliaDenial