Hi
I have come up against a problem that I hope someone can help me with I have 3 scenes I have a player with the usual stop start pause buttons.
I have the player working fine on scene one but when I try to place the player on scene 2 I get error codes :
How can I use music players on all scenes playing different sounds
This is my code :
What is soothing()?
You need to change isPlaying for something else (maybe, isPlayed, all of them) or you will have namespace conflict errors.
What other errors are you getiting.
It might even help to attach your *.fla and other associated files, music files are not necessary though.
What is soothing()?
You need to change isPlaying for something else (maybe, isPlayed, all of them) or you will have namespace conflict errors.
What other errors are you getiting.
It might even help to attach your *.fla and other associated files, music files are not necessary though.
Hi,
I have attached the fla as you suggested You asked what is soothing This is one of two pieces of music mp3 . Basically what I want to do is have a music player on both scene one and two playing different music Any help you can give would be appreciated Many thanks
Is there any particular reason for you to be using scenes?
How are you getting to and from each scene? the file says nothing about this bit.
Basically you have having errors with duplicate function names and namespace conflicts, if you rename the functions and vars difeerently for each scene the amount of errors with slowly drop.
Last edited by fruitbeard; 07-09-2015 at 06:51 AM.
Is there any particular reason for you to be using scenes?
How are you getting to and from each scene? the file says nothing about this bit.
Basically you have having errors with duplicate function names and namespace conflicts, if you rename the functions and vars difeerently for each scene the amount of errors with slowly drop.
Hi
What I will actually do once the music player is sorted will be make a new fla in air for andriod and use the swipe function to move backwards and forwards to the scenes with the swipe function
var playingScene1:Boolean = false; var musicScene1:Sound = new soothing(); var channelScene1:SoundChannel = new SoundChannel(); var positionScene1:Number = 0;
var playingScene2:Boolean = false; var musicScene2:Sound = new warmsound(); var channelScene2:SoundChannel = new SoundChannel(); var positionScene2:Number = 0;
Thank you so much it works beautifully It was very generous of you to spend the time . I have studied your as3 script and now understand where I was going wrong Thanks once again Regards