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.
|
|
|
|
|
![]() |
||
Sound problem when switching frame
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
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. |
|
|
![]() |
| Tags |
| sound, problem, switching, frame |
| Thread Tools | |
|
|
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 |