1081 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $500,000+ on Envato Market
  • Has been part of the Envato Community for over 6 years
  • Has referred 500+ members
+9 more
damojo says

I personally started using caurina tweener with my last file. Im really happy with the features and performance :)

83 posts
  • Has been part of the Envato Community for over 6 years
  • Has sold $1,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Sells items exclusively on Envato Market
biyified says

Thanks guys

3 posts
  • Has been part of the Envato Community for over 5 years
  • Has collected 50+ items on Envato Market
cumenda says

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

584 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 10+ items on Envato Market
+3 more
SparkyFlash says

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.

by
by
by
by
by
by