Articulate Community Forums

Articulate Community Forums » Articulate Product Forums » Articulate Presenter » No Audio in SWF

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 06-14-2006, 02:55 PM   # 1
Pharmakon
Member
 
Join Date: Jun 2006
Location: Gainesville, FL
Posts: 12
No Audio in SWF


I have an interactive SWF inserted in a AP that uses the sound property. In the SWF itself, the audio is attached like this:

Code:
var voiceOver:Sound = new Sound();
voiceOver.attachSound("step1.mp3");
voiceOver.start();
The audio isn't playing at all. It will work if launched in an external browser, but not when it is embedded. Is there a way to make the sound object work within the AP and not have to launch an external window? Thanks.
Pharmakon is offline  
Reply With Quote
Old 06-14-2006, 03:27 PM   # 2
Spectre
Member
 
Spectre's Avatar
 
Join Date: Mar 2006
Location: Silver Spring, MD
Posts: 1,444
Default Re: No Audio in SWF


I don't know exactly how all of your code is working in the file, but this is how I attach and start audio files in MX 2004:

voiceOver = new Sound(this);
this.voiceOver.attachSound("step1.mp3");
voiceOver.start();

If you need additional info, I would check out Adobe's Flash Forum, which I have found to be very helpful when learning the programming aspects of Flash.

HTH,
Phil
Spectre is offline  
Reply With Quote
Old 06-14-2006, 03:30 PM   # 3
Pharmakon
Member
 
Join Date: Jun 2006
Location: Gainesville, FL
Posts: 12
Default Re: No Audio in SWF


i was wondering if attaching to audio to a specific object would make a difference or not. I'll have to give it a try.

like i said, it works fine as a SWF file in a browser, just not in the AP.
Pharmakon is offline  
Reply With Quote
Old 06-14-2006, 03:42 PM   # 4
brianosmi
Member
 
brianosmi's Avatar
 
Join Date: Mar 2006
Location: Springfield, OH
Posts: 1,603
Default Re: No Audio in SWF


Due to the fact that you are using relative links in Flash for your .mp3 files, it could also be the location of the .mp3 file in relationship to the .swf file after publishing. The .swf file could be working correctly but just can't find the .mp3.

The .mp3 file needs to be relative to the player.html file in your published files for the .swf to find the .mp3.

For example, in your case, you would want to make sure to physically place the step1.mp3 file in the same folder as player.html, after you publish from AP.
__________________
Brian
brianosmi is offline  
Reply With Quote
Old 06-14-2006, 03:50 PM   # 5
Spectre
Member
 
Spectre's Avatar
 
Join Date: Mar 2006
Location: Silver Spring, MD
Posts: 1,444
Default Re: No Audio in SWF


That is very true if the MP3 is outside the file...but the attachSound function is intended for sounds inside the Flash file's library (if that is what he's trying to do).

Phil
Spectre is offline  
Reply With Quote
Old 06-14-2006, 03:52 PM   # 6
Pharmakon
Member
 
Join Date: Jun 2006
Location: Gainesville, FL
Posts: 12
Default Re: No Audio in SWF


yes, the audio files are in the library and marked for export to actionscript.

Adding this to the sound object worked!

there was no need to include the this to the attachSound command. Having it in the variable declaration was enough.

Thanks!
Pharmakon is offline  
Reply With Quote
Old 06-14-2006, 03:58 PM   # 7
Spectre
Member
 
Spectre's Avatar
 
Join Date: Mar 2006
Location: Silver Spring, MD
Posts: 1,444
Default Re: No Audio in SWF


Glad to hear it worked. What you experienced is a quirk in Flash where embedded audio files do not work on a local level. This should work on both a local and web level.

BTW, you are right...the extra "this" is normally not necessary (but doesn't hurt)...but once in a blue moon, I need it.

Phil


Last edited by Spectre : 06-14-2006 at 04:00 PM.
Spectre is offline  
Reply With Quote
Old 06-14-2006, 05:34 PM   # 8
brianosmi
Member
 
brianosmi's Avatar
 
Join Date: Mar 2006
Location: Springfield, OH
Posts: 1,603
Default Re: No Audio in SWF


Quote:
Originally Posted by Spectre
That is very true if the MP3 is outside the file...but the attachSound function is intended for sounds inside the Flash file's library
Doh! :o Guess I should've taken the time to read more carefully...

I'm glad that did the trick, though!
__________________
Brian
brianosmi is offline  
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On