Welcome Guest ( Log In | Register )

Bump Topic Topic Closed RSS Feed

Outline · [ Standard ] · Linear+

 flash mx help with sound file

views
     
TSsmokey
post Mar 15 2006, 07:02 PM, updated 20y ago

Infinity speed
*******
Senior Member
3,506 posts

Joined: Jan 2003
From: Lumpur
QUOTE
on (release) {
music = new Sound();
music.attachSound("mix1");
music.start(0, 999999);
// set the volume of the sound to zero
music.setVolume(0);
// set a variable named 'vol'
vol = 0;
// set another variable named 'fade', putting a setInterval function in it
fade = setInterval(fadeIn, 100);
// set the initial fade in function
function fadeIn() {
  // fade the sound in with an increment of 3 in the variable 'vol'
  vol += 3;
  music.setVolume(vol);
  // put an if condition to restrict the increment in volume after it reaches to 100
  if (vol>=100) {
  clearInterval(fade);
  // create the 'step' variable
  step = 1;
  // create the 'fade' variable
  Fade = 0;
  }
}
// create the fade in and out function
// function executed on onEnterFrame
_root.onEnterFrame = function() {
  // set fade out
  if (Fade == 1) {
  vol = vol-step;
  if (vol<0) {
    vol = 0;
  }
  music.setVolume(vol);
  // set fade in
  } else {
  vol = vol+step;
  if (vol>100) {
    vol = 100;
  }
  music.setVolume(vol);
  }
};
}
hi...im super noobie in flash...i have a button tat play the music when being clicked...but how do i add a script that will ignore mouse clicks on that button once the music is playing? above is the script i currently using...

thanks for reading
TSsmokey
post Mar 15 2006, 07:13 PM

Infinity speed
*******
Senior Member
3,506 posts

Joined: Jan 2003
From: Lumpur
here:

my work is very messy with alot of layers... sad.gif


Attached File(s)
Attached File  nizam.zip ( 1.55mb ) Number of downloads: 8
TSsmokey
post Mar 16 2006, 11:40 AM

Infinity speed
*******
Senior Member
3,506 posts

Joined: Jan 2003
From: Lumpur
QUOTE(fantagero @ Mar 15 2006, 09:16 PM)
u mean..
when the movie play.. the music is off.. then click to turn on the music...
after the music played.... we cant click the button nemore???
*
yes...

or we can click it but the music wont launch the song for a few times everytime click...
TSsmokey
post Mar 17 2006, 09:59 AM

Infinity speed
*******
Senior Member
3,506 posts

Joined: Jan 2003
From: Lumpur
yes...i have done it...
i jz need to give the play button a instance name (exp:play_btn)
then in the actionscript i put

QUOTE
on (release){ play_btn.enabled = false;}



hei...nice portpolio u have...can i ask a few questions? how to make the music visualization at the bottom right of ur page? and how do u set the 'movement of the underline' at ur button moves only once?(my 'shining part' is looping when u hover at my button...i have set my 'shining part' movie play once only but is still same)... do u have any link that can show me the tutorial?

10s for helping

This post has been edited by smokey: Mar 17 2006, 10:52 AM
TSsmokey
post Mar 18 2006, 12:00 AM

Infinity speed
*******
Senior Member
3,506 posts

Joined: Jan 2003
From: Lumpur
thanks a lot to everybody's help...this thread shall be closed now smile.gif

Topic ClosedOptions
 

Change to:
| Lo-Fi Version
0.0160sec    0.41    7 queries    GZIP Disabled
Time is now: 26th November 2025 - 04:30 PM