Solved

problems playing sound object in a loaded swf

Posted on 2006-07-17
4
170 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
Comment Utility
these should work..

_root.loaderblog.firstSound.start();

or

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

Z
0
 

Author Comment

by:mediatimebomb
Comment Utility
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
Comment Utility
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
Comment Utility
ok figured it out thank you for your help
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
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…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

772 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

10 Experts available now in Live!

Get 1:1 Help Now