Sound loader issue

Help for using specific functions

Sound loader issue

Postby Robert Stevenson » Sat Apr 11, 2015 11:43 pm

I usually have no problem with getting this to work but in this case can't seem to get audio buttons to play on export to server (despite .mps files being flagged and actually in the exported "sounds" folder. In this particular case I have an organism image (sponge) with the parts name and function available when the students clicks on the buttons on the image page. The caption shows the name and the soundloader is to play the audio file that gives the function. All of these buttons are part of a group. Curious if that might be my issue. On enterpage I have in the AE

--------------------------------------------------------------------------------
Actions for Page "generalized anatomy"
--------------------------------------------------------------------------------

-- On load page... -------------------------------------------------------------
Delay 2000 ms
Set visible of Group "buttons" to true
Set caption of Button "1" to ""
Set caption of Button "amoeboid cell" to ""
Set caption of Button "canals" to ""
Set caption of Button "central cavity" to ""
Set caption of Button "collar cells" to ""
Set caption of Button "collar" to ""
Set caption of Button "epidermal cells" to ""
Set caption of Button "flagella" to ""
Set caption of Button "nucleus" to ""
Set caption of Button "osculum 2" to ""
Set caption of Button "osculum" to ""
Set caption of Button "pores" to ""


--------------------------------------------------------------------------------
Actions for Group "buttons" of Page "generalized anatomy"
--------------------------------------------------------------------------------

-- On unload page... -----------------------------------------------------------
Set visible of Self to false


--------------------------------------------------------------------------------
Actions for Button "canals" of Page "generalized anatomy"
--------------------------------------------------------------------------------

-- On load page... -------------------------------------------------------------
Set checked of Self to true
Set caption of Self to ""


-- On click... -----------------------------------------------------------------
Set caption of Self to "canals"


--------------------------------------------------------------------------------
Actions for Button "central cavity" of Page "generalized anatomy"
--------------------------------------------------------------------------------

-- On load page... -------------------------------------------------------------
Set checked of Self to true
Set caption of Self to ""


-- On click... -----------------------------------------------------------------
Set caption of Self to "central cavity"
Execute Script pgSoundLoader (HTML)


--------------------------------------------------------------------------------
Actions for Button "pores" of Page "generalized anatomy"
--------------------------------------------------------------------------------

-- On load page... -------------------------------------------------------------
Set checked of Self to true
Set caption of Self to ""


-- On click... -----------------------------------------------------------------
Set caption of Self to "pores"
Execute Script pgSoundLoader (HTML)


--------------------------------------------------------------------------------
Actions for Button "amoeboid cell" of Page "generalized anatomy"
--------------------------------------------------------------------------------

-- On load page... -------------------------------------------------------------
Set checked of Self to true
Set caption of Self to ""


-- On click... -----------------------------------------------------------------
Set caption of Self to "amoeboid cells"
Execute Script pgSoundLoader (HTML)


--------------------------------------------------------------------------------
Actions for Button "epidermal cells" of Page "generalized anatomy"
--------------------------------------------------------------------------------

-- On load page... -------------------------------------------------------------
Set checked of Self to true
Set caption of Self to ""


-- On click... -----------------------------------------------------------------
Set caption of Self to "epidermal cells"


--------------------------------------------------------------------------------
Actions for Button "1" of Page "generalized anatomy"
--------------------------------------------------------------------------------

-- On load page... -------------------------------------------------------------
Set checked of Self to true
Set caption of Self to ""


-- On click... -----------------------------------------------------------------
Set caption of Self to "spicules"
Execute Script pgSoundLoader (HTML)


--------------------------------------------------------------------------------
Actions for Button "collar cells" of Page "generalized anatomy"
--------------------------------------------------------------------------------

-- On load page... -------------------------------------------------------------
Set checked of Self to true
Set caption of Self to ""


-- On click... -----------------------------------------------------------------
Set caption of Self to "collar cells"
Execute Script pgSoundLoader (HTML)


--------------------------------------------------------------------------------
Actions for Button "nucleus" of Page "generalized anatomy"
--------------------------------------------------------------------------------

-- On load page... -------------------------------------------------------------
Set checked of Self to true
Set caption of Self to ""


-- On click... -----------------------------------------------------------------
Set caption of Self to "nucleus"


--------------------------------------------------------------------------------
Actions for Button "collar" of Page "generalized anatomy"
--------------------------------------------------------------------------------

-- On load page... -------------------------------------------------------------
Set checked of Self to true
Set caption of Self to ""


-- On click... -----------------------------------------------------------------
Set caption of Self to "collar"
Execute Script pgSoundLoader (HTML)


--------------------------------------------------------------------------------
Actions for Button "osculum 2" of Page "generalized anatomy"
--------------------------------------------------------------------------------

-- On load page... -------------------------------------------------------------
Set checked of Self to true
Set caption of Self to ""


-- On click... -----------------------------------------------------------------
Set caption of Self to "Osculum"
Execute Script pgSoundLoader (HTML)


--------------------------------------------------------------------------------
Actions for Button "osculum" of Page "generalized anatomy"
--------------------------------------------------------------------------------

-- On load page... -------------------------------------------------------------
Set checked of Self to true
Set caption of Self to ""


-- On click... -----------------------------------------------------------------
Set caption of Self to "Osculum"
Execute Script pgSoundLoader (HTML)


--------------------------------------------------------------------------------
Actions for Button "flagella" of Page "generalized anatomy"
--------------------------------------------------------------------------------

-- On load page... -------------------------------------------------------------
Set checked of Self to true
Set caption of Self to ""


-- On click... -----------------------------------------------------------------
Set caption of Self to "flagellum"
Execute Script pgSoundLoader (HTML)
Robert Stevenson
 
Posts: 138
Joined: Wed May 14, 2014 11:46 am

Re: Sound loader issue

Postby Clifton » Sun Apr 12, 2015 6:19 am

Sounds like pgSoundLoader() is not correctly setup to find your sounds.

In your scenario you need to make sure that your button caption string is properly pointing to a real file location.

So, in pgSoundLoader() you need code something like this for the url_playLIst parameter:
Code: Select all
url_playList = "../sounds/" & caption of self & ".mp3"

... the above parameter setting will resolve, for example, a button caption "canals" to "../sounds/canals.mp3" which will play the audio file "canals.mp3" in your "sounds" folder.
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am

Re: Sound loader issue

Postby Robert Stevenson » Sun Apr 12, 2015 1:53 pm

Dang! I can't seem to make this work. You're suggesting I need to get rid of the soundloader script for each of the individual buttons on the page and then select everything on the page (well all the buttons at least) and add the url_playlist as you have suggested. My problem may be that the file names don't perfectly correspond to the captions ... which is why I have the soundloader function coded to point to each of the actual sound files in the "sounds" folder. I'm still not sure why that isn't a workable option?
Robert Stevenson
 
Posts: 138
Joined: Wed May 14, 2014 11:46 am

Re: Sound loader issue

Postby Clifton » Sun Apr 12, 2015 2:58 pm

Whatever you do, pgSoundLoader() needs a path to a real file if it is located in a "sounds" folder. Somewhere along the way you have to prepend the path ( "../sounds/" ) to your name. In addition, you will have to append the file extension of a valid audio file ( ".mp3" ). Unless you set url_playLIst to some valid file path, the function doesn't magically know what you want to do.

If you post the parameters you are using with pgSoundLoader() it would probably be more clear what is going on. But if your sound files exist, I can guarantee that, if they do not play, the function is not getting a valid file reference.

Please remember also that on web servers case senitivity is critical as well as with the JavaScript language. So if you want to play a file that has a path like this "../sounds/mysound.mp3" it will not work if the url_playLIst = "../sounds/mySound.mp3"
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am

Re: Sound loader issue

Postby Robert Stevenson » Sun Apr 12, 2015 5:43 pm

Which is why this is so frustrating. As far as I can see each button on the page is pointing to the actual .mp3 in the "sounds" folder. I have, for example the button "pores" that is caption less until the student clicks the button. At that point the script is as follows:

Set caption of self to "pores"
url_playList = "../sounds/pore.mp3"

On export the caption, of course shows ... but no sound plays.
Robert Stevenson
 
Posts: 138
Joined: Wed May 14, 2014 11:46 am

Re: Sound loader issue

Postby Clifton » Sun Apr 12, 2015 6:50 pm

Check the following:
  1. Look in the folder tree of the export using Windows Explorer or some other file manager. You should see the following in the export tree:
    [export] > [sounds] > pore.mp3
    • If the above is not true then you may need to remove and re-add the sounds folder to your export tree.
  2. Try and run the export in Firefox if the problem is occurring in Internet Explorer.
    • If the content plays in Firefox but not Internet Explorer, then consider the next item a possible reason for this.
  3. Try and put your export on a web server and see if the sound plays.
    • If the sound plays when on a web server, then a security restriction is preventing the sound from loading from a hard disk location.
    • OR, your Flash player installation has become corrupted and the Flash player should be reinstalled.
  4. Try visiting the Flash player security panel (in any web browser) and verify that web content can play local files. The link to the Flash security control panel is provide below and it looks like the image provided. The option to "Always allow" should be checked to ensure your sound plays from files on your hard drive.
    http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
    Image 1.png
    Flash player security settings
    Image 1.png (42.2 KiB) Viewed 22916 times
  5. If none of the above makes any difference, please zip the tbk and the sounds folder with two or three mp3 files in it and send it to us for review.
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am

Re: Sound loader issue

Postby Robert Stevenson » Sun Apr 12, 2015 7:14 pm

I have confirmed all of the above ... "pore.mp3" in export sounds folder ... Chrome and Firefox tested negative for the page in question (page 7 of 11) ... all testing has been on a webserver ... Flash is set to "always allow". I would love to send you the files ... where ?
Robert Stevenson
 
Posts: 138
Joined: Wed May 14, 2014 11:46 am

Re: Sound loader issue

Postby Clifton » Sun Apr 12, 2015 7:19 pm

Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am

Re: Sound loader issue

Postby Clifton » Sun Apr 12, 2015 7:40 pm

Thank you for the files.

The problem is your sounds are referenced as "..sounds/name.mp3"
... and should be "../sounds/name.mp3"

That should fix the problem.
Clifton
Site Admin
 
Posts: 732
Joined: Tue Jan 14, 2014 1:04 am

Re: Sound loader issue

Postby Robert Stevenson » Mon Apr 13, 2015 9:32 am

Wow! That didn't take you long. So much appreciated ... I never would have noticed in a million years.
Robert Stevenson
 
Posts: 138
Joined: Wed May 14, 2014 11:46 am


Return to Function Help

Who is online

Users browsing this forum: No registered users and 4 guests

cron