1085 posts
  • Trendsetter
  • Weekly Top Seller
  • Top Monthly Author
  • Elite Author
+12 more
damojo
says

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

83 posts
  • 7 Years of Membership
  • Author Level 3
  • Collector Level 3
  • Exclusive Author
+1 more
biyified
says

Thanks guys

3 posts
  • 6 Years of Membership
  • Collector Level 3
  • Italy
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

601 posts
  • 6 Years of Membership
  • Affiliate Level 1
  • Author Level 3
  • Collector Level 2
+2 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