Solved

problems playing sound object in a loaded swf

Posted on 2006-07-17
4
171 Views
Last Modified: 2010-04-03
Senerio

I have a swf file that loads another swf file using the loader component. The swf file loaded is called "postBlog" and the instance name givien to the loader control is "loaderblog"

In the loaded swf "postBlog" i have the following sound object defined on the first frame of the movie

firstSound=new Sound();
firstSound.attachSound("intro01");

then on frame 30 i tell the time line to play this sound object using the following action script

_root.firstSound.start()


This works fine when the movie clip is run alone however the sounds does not play when the clip is loaded into another clip

I have tried changing the action script to as follows but have had no luck

_level1.firstSound.start(0,0);

and

this.firstSound.start(0,0);

But these do now work. I am obviously targeting this sound object incorrectly but am at aloss on the correct syntax to target sounds objects defined in loaded movie clips using the loader component

any insite would be greatly appreciated
0
Comment
Question by:mediatimebomb
  • 3
4 Comments
 
LVL 23

Accepted Solution

by:
Zeffer earned 250 total points
ID: 17125646
these should work..

_root.loaderblog.firstSound.start();

or

this._lockroot = true;
firstSound= new Sound();
firstSound.....etc

Z
0
 

Author Comment

by:mediatimebomb
ID: 17126020
what's going on in the second method?

i would like to find a solution that would allow the sound to play from the original swf or from the loaded swf
0
 

Author Comment

by:mediatimebomb
ID: 17126118
ok i tried the first method with no success.  What is happening in the second suggestion i am confused on what

this._lockroot = true is doing

0
 

Author Comment

by:mediatimebomb
ID: 17126161
ok figured it out thank you for your help
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now