A Flash Question.

Status
Not open for further replies.

bos

New member
Sep 15, 2006
11
0
0
TX
I just built an animated menu using multiple movie clips. I'll list an example of ActionScripting I used.

button1.onRollover = over;
button1.onRollout = out;
button1.text.buttonText.text = "HOME";

function over() {
this.gotoAndPlay(2);
}
function out() {
this.gotoAndPlay(6);
}

made a nice little animated menu, works fine at the moment. The problem I am having is sound. I want to add a little sound effect on the .onRollover state without messing it up. Any help would be greatly appreciated.
 


  1. Select the button in the Library panel.
  2. Select Edit from the options menu in the upper right corner of the panel.
  3. In the button's Timeline, add a layer for sound.
  4. In the sound layer, create a regular or blank keyframe to correspond with the button state to which you want to add a sound. For example, to add a sound that plays when you click the button, create a keyframe in the frame labeled Down.
  5. Click the keyframe you created.
  6. Select Window > Properties.
  7. In the Property inspector, select a sound file from the Sound pop-up menu. You can also bring in sounds that you imported to your library.
  8. Select Event from the Synchronization pop-up menu.
Remember to use the stop action to keep it from looping ;)
 
trigatch4 said:
I have heard Flash sites detractfrom SEO value because the search engines cannot read text in Flash movies.

What's the consensus on this?
I don't believe it detracts from SEO, it just doesn't add anything. For now I believe it is best to use flash to enhance a site, not build it. However, I think flash and interactive video will be a big part of the future of the web. Maybe around web 5.0? :)

bos - looking over the tutorial now...
 
Here you go my good man:

Code:
function over() {
    this.gotoAndPlay(2);
    overSound.start();
    }

function out() {
    this.gotoAndPlay(6);
}

overSound = new Sound();
overSound.attachSound("yoursoundclip");

Insert your sound clip where it says "yoursoundclip". Just put your sound clip in the library ;)

I tried it and it works fine.
 
lol, it's funny just as you posted this I managed to figure it out myself! thanks alot for helping. maybe you might be able to help me out with the next part though? I want to make the button call another movie clip on release, you know to open the corresponding pages content :)
 
lol just like last time, I was about to reply and say nevermind I got it, but you replied! I did it a little different than him but it works good thanks for the help :)
 
Haha, no problem. Flash can be a bitch sometimes. If you run into any more problems just post away and I'll try and help you out. :)

If your just learning flash and getting into actionscript I would recommend you go through the www.lynda.com training videos. They are actually really good. You have to pay for them but you can "try them out" by searching for them on some *cough* torrent *cough* sites.
 
Status
Not open for further replies.