Sound problem when switching frame

This is a discussion on "Sound problem when switching frame" within the Flash & Multimedia Forum section. This forum, and the thread "Sound problem when switching frame are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Flash & Multimedia Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jul 29th, 2006, 18:04
New Member
Join Date: Jul 2006
Location: Sweden
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Sound problem when switching frame

This could be pretty hard to explain. I'm making a RPG and got stuck on a sound problem.

I have 3 frames. Frame 1 is a map (where the character walks around). Frame 2 is also a map (but a diffrent place). Frame 3 is a battle scene. Frame 1 & 2 share the same music frame while the battle scene ha one of its own.

http://img146.imageshack.us/my.php?image=picev6.jpg

When ever a random battle occurs, the map music will stop, the scene changes and a diffrent music starts. After the battle you'll go back to the scene you were on before the battle and the normal music (name of sound is "mysound") will restart. However if the battle takes place on map 2 (frame 2) the music wont restart since it's shared with the first frame (see picture above). I have already thought of giving each frame its own music frame, but that wont do, since I dont want the music to restart if you WALK from map1 to map2.

So my question is: Is there any way to check if a certain music file is already playing (the thought was that if a music file is already playing it will just keep doing so, If not it will just restart the the music) or anyother sollutions?

Somebody gave me a tip to do something like this:

Frame1:
var snd = new Sound();
snd.attachSound("mysound");
_root.snd.start(0, 99);

Frame2:
if (mySoundObj1.IsPlaying())
//do nothing
if (!mySoundObj1.IsPlaying())
_root.snd.start(0, 99);

But this doesn't seem to work. Do any of you see any errors in this code or have a diffrent sollution? I have asked around on diffrent forums, but non of their members replied.
Reply With Quote

Reply

Tags
sound, problem, switching, frame

Thread Tools

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
sound control problem alladeen Flash & Multimedia Forum 3 May 29th, 2008 13:39
EASY PEASY Displaying frame address in another frame question molotov JavaScript Forum 3 Nov 20th, 2007 17:29
Problem with loading sound.HELP!!! lizok Flash & Multimedia Forum 0 Nov 9th, 2007 14:59
God, another IE problem.. frame overhang weasel Web Page Design 1 Aug 18th, 2007 19:23
Very wierd problem with sound in IE and Firefox andynewbie Web Page Design 0 Jun 23rd, 2007 04:26


All times are GMT. The time now is 17:07.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43