- Sold between 250 000 and 1 000 000 dollars
- Has been a member for 5-6 years
- Author was Featured
- Item was Featured
- Author had a File in an Envato Bundle
- Author had a Free File of the Month
- Interviewed on the Envato Notes blog
- Referred between 200 and 499 users
I personally started using caurina tweener with my last file. Im really happy with the features and performance 
Thanks guys
Hi All, I’m totally new in Flash… I bought a player component to play a sound on a template. I would like to the sound looped but I’m not able.
Here what I found: //Imports the Caurina tweener import caurina.transitions.*;
//Imports the music file var snd:Sound = new Sound(); snd.load(new URLRequest(“music.mp3”)); var channel:SoundChannel = new SoundChannel();
//Setting the on/off buttonstate – used later in the script for controlling the if statemens var buttonState:int;
//Adds the speaker icon to actionscript through addChild var speakerOnOff:onOff; speakerOnOff = new onOff();
//Make the music play automatic when the song is loaded //This part of the script will only be loaded once, when the sound file is loaded the forst time for automatic playing snd.addEventListener(Event.COMPLETE, onLoadCompleted, false, 0, true); function onLoadCompleted(evt:Event):void { //Adding the on/off icon by using addChild, and controlling the x and y positions of it addChild(speakerOnOff) setChildIndex(speakerOnOff, 1); speakerOnOff.x = 15; speakerOnOff.y = 8; speakerOnOff.scaleX *= 0; speakerOnOff.scaleY *= 0; }
//Make the on/off icon appear on the stage, by using the caurina tweener
Tweener.addTween(speakerOnOff, {x:15, y:3, alpha:1, scaleX:1, scaleY:1,time:.9, transition:"easeOutBounce"});
buttonState = 1;
channel = snd.play();
genBackground.addEventListener(MouseEvent.CLICK, controlPlayer); function controlPlayer(event:MouseEvent):void { if(buttonState == 0) { //Adding the on/off icon by using addChild, and controlling the x and y positions of it addChild(speakerOnOff) setChildIndex(speakerOnOff, 1); speakerOnOff.x = 15; speakerOnOff.y = 8; speakerOnOff.scaleX *= 0; speakerOnOff.scaleY *= 0; }
//Make the on/off icon appear on the stage, by using the caurina tweener
Tweener.addTween(speakerOnOff, {x:15, y:3, alpha:1, scaleX:1, scaleY:1,time:.9, transition:"easeOutBounce"});
}
{
//Make the on/off icon disappear on the stage, by using the caurina tweener
Tweener.addTween(speakerOnOff, {x:15, y:8, alpha:1, scaleX:0, scaleY:0,time:.9, transition:"easeOut"});
}
buttonState = 0;
channel.stop();
//Setting the buttonmode true for mouseover genBackground.buttonMode = true;
Can someone help me? Tks
So you need one song to be looped around? You may want to contact the author of the file so he/she could help you with this.
Its simple enough and I’m sure they would help you out. If not, send me an email from my author’s page and I’ll see what I can do for you.
