ActionScript 2.0 :: How To Get Sound To Work In Movie

Jun 14, 2003

I'm totally stuck on getting a sound to work in my movie. Here's my code:
s = new Sound();
s.attachSound("hibee");
_root.menu_flyin.admin_mc.onRollOver = function(){
s.start();
}

I created a test movie to see if there is someting wrong with the way I am scripting. But the test worked and my real movie doesn't! The sound is being targetted to a movie clip within a movie clip (_root.menu_flyin.admin_mc) and all instances are there on the stage. I linked the "hibee" sound file to export to 1st frame for Actionscripting and all.

View 6 Replies


Similar Posts:


ActionScript 1/2 :: Sound Control Adding Text Into The Linkage Field But Still Sound Doesn't Work

Jan 21, 2010

How to import sound with AS? Cuz i have tried it and my sound just wount play. Can you explain me where my sound should be and what is the as code for importing cuz i use

mysound = new Sound();
mysound.attachSound("SoundOn");
mysound.start();

and this SoundON from where i get it, i try to add linkage to the sound file but in CS4 i cant find the option;. I do it from the library, adding text into the linkage field but still my sound doesn't want to play?

View 15 Replies

ActionScript 3.0 :: Sound Channel - Sound Doesn't Work?

Dec 5, 2010

The code seems OK but I can't hear the sound. I have it in the fla/swf and exported etc... I suppose something in this code is wrong. Haven't coded for ages - bit rusty I'm afraid.

[Code].....

View 3 Replies

ActionScript 2.0 :: Movie And Sound - Make The Sound Fade Away When The Mouse Is Rolled Away?

May 18, 2007

I use Flash MX 6.0

1) I have a button and when I put cursor over it, it must start looping a sound. When I drag away, the sound must stop. I would be even cooler if it was possible to make the sound fade away when the mouse is rolled away. I have no problem creating another sound file that fades my current sound away.

2) I have a button which represents a knife, that should stab something (a panel) once pressed. So fist the knife must be clean. but after one or more presses, the blood should remain as a movie clip (as I want to animate the dripping blood)

3) once rolled over a button, the sound must start looping (as I wrote in 1.) AND the knife should slowly go backwards (MC). BUT when I roll mouse away, the sound fades away (as in 1. again) PLUS the knife should slowly move back to its place in stead of just jump from one place to another.

View 1 Replies

IDE :: Can't Seem To Get Sound To Work

Mar 8, 2006

I know, I could get a better one for free, but this is easy and I'm no good at flash, etc. Anyway, everything's fine, except I can't seem to get the sound to work. There's a component parameter called "flip sound" (I think) - I put my sound in there (it's all in the same folder, so no path), and - no sound.

View 3 Replies

ActionScript 2.0 :: Sound Overlap And Mov Does Not Work?

Feb 26, 2009

Im using Flash CS3 with Action Script 2. I create a Flash file with few scenes in it. im using movie clip button in every scenes plus i embed .mov file in some of the scenes. I also have sound in every single scenes.

i create btnHDPage1 with instance name hd1 to be linked to scene1 and i create btn2 with instance name hd2 to be linked to scene2. (all these buttons are movie clip buttons). i have a sound and both scenes and a .mov file in scene1

The problem is, when i click on hd1 or hd2, yes it goes to appropriate scene. but the sound is overlapping and when im in scene2 and click on hd1 to go to scene1, my sound does not play and my .mov does not working.

[Code]...

View 4 Replies

ActionScript 3.0 :: Fading Sound Doesn't Work

Jan 9, 2012

I have this problem when I try to fade in sound with the function below. It just doesn't work and I can't figure out where the problem is. I would like to fade in a looping sound but nothing happens.

this is used to play a sound via events

Code:
dispatchEvent(new CustomEventSound(CustomEventSound.PLAY_SOUND, Main.SOUND_AMBIENT, false, true, false, 999999, 0, 0, setSoundVolume));

this is the function to play a sound. the stop-function is almost identical to this one.

Code:

public function playSound(soundName:String, isSoundTrack:Boolean = false, fadeIn:Boolean = false, fadeOut:Boolean = false,
loops:int = 1, offset:Number = 0, volume:Number = 1):void {

[Code].....

View 7 Replies

ActionScript 3.0 :: Stop(); - Should It Work On A Sound File?

Sep 16, 2011

I'm creating a flash of a piano in which you hit a button and it plays that key.  I have a single file of the entire scale, and I tried to put a stop(); command after each note- however it's not stopping.  Shouldn't the stop command respond to the actionscript since the sound file is in the timeline?
 
Here's a link to the FLA file- I've barely started working on it, so it's hardly coded except for the stop actionscript.
music_scale.fla

View 1 Replies

ActionScript 3.0 :: Flash Fading Sound Does Not Work

Jan 9, 2012

When I try to fade in sound with the function below. It just doesn't work and I can't figure out where the problem is. I would like to fade in a looping sound but nothing happens. This is used to play a sound via events
Code:
dispatchEvent(new CustomEventSound(CustomEventSound.PLAY_SOUND, Main.SOUND_AMBIENT, false, true, false, 999999, 0, 0, setSoundVolume));

This is the function to play a sound. the stop-function is almost identical to this one.
Code:
public function playSound(soundName:String, isSoundTrack:Boolean = false, fadeIn:Boolean = false, fadeOut:Boolean = false,
loops:int = 1, offset:Number = 0, volume:Number = 1):void {
if (fadeIn) {
tempSoundTransform.volume = 0;
[Code] .....

View 5 Replies

ActionScript 3.0 :: Sound Object - Event Complete Does Not Work

Apr 10, 2010

Sound object. Event complete doesn't work
function init() {
this.soundsArray[i-1].addEventListener(Event.COMPLETE, completeSoundHandler);
this.soundsArray[i-1].play();
this.blHit=false;
} function completeSoundHandler():void {
[Code] .....

View 1 Replies

ActionScript 1/2 :: Metronome - Put The Sound In The Timeline But It Didn't Work

Aug 28, 2011

I tried to build a metronome in Flash AS2 with a rather lousy result because it won't keep the pace which would have been a suitable feature for a metronome. I tried a few different methods to do the sync with actionscript. I even tried to put the sound in the timeline but it didnt work any better of course. Here is the code: AS2 with constant tempo 200 ms, based on the onEnterFrame handler, framerate set to 5 fps:

[Code]...

View 1 Replies

Actionscript 3 :: Flash Sound Doesn't Work In Most Browsers

Mar 1, 2011

I'm trying to play sound from url.

var s : Sound = new Sound();
s.load(new URLRequest("http://85.21.236.228:8000"));
s.play();

It's OK in Opera browser. But in IE, Chrome, Firefox there's no any sound.

View 2 Replies

ActionScript 3.0 :: Fade In A Looping Sound Doesn't Work

Jan 9, 2012

I would like to fade in a looping sound but nothing happens. this is used to play a sound via events.Code:dispatchEvent(new CustomEventSound(CustomEventSound.PLAY_SOUND, Main.SOUND_AMBIENT, false, true, false, 999999, 0, 0, setSoundVolume));this is the function to play a sound. the stop-function is almost identical to this one.[code]

View 2 Replies

ActionScript 2.0 :: (F5) Get A Button To Work By Pressing Keys And Sound

Dec 11, 2002

(Flash 5) Ok guys, I am trying to get a button to work by pressing keys. Problem 1) I want the keys that are pressed to be ,1,2,3,etc... and those keys aren't in Flash's actions, can they still work? Or do I have to use keys like SPACE, RETURN, etc...??? Problem 2) Here is the code I'm using. I also want a sound to be played while the button is going down. The sound is in the "down" of the button, but I linked it. THe linkage name is "sound1" here is the code;

[Code]...

View 1 Replies

ActionScript 2.0 :: Does Sound Object Work In Flash 5 Player

Dec 6, 2007

I'm trying to develop something for Flash 5 Player and nothing seems to work. Currently I'm having trouble with the following bit of AS which works fine if I export for Flash 6. But in Flash 5...no sound. Is there a specific way an mp3 needs to be encoded for Flash 5 or does it not even accept mp3s?

Code:
// sound object
_soundbuftime=10;

[code].....

View 4 Replies

ActionScript 3.0 :: Buttons In A Child Movie Won't Work While Loaded In Parent Movie

Jun 25, 2009

I have an external swf (sub.swf) that loads into my main swf. The external swf has buttons of its own...that I would like to use to load additional external swf's in its place. I click on the buttons and nothings happens.

My current code is as follows:

All of the following code is in my main.swf
================================
//Location where the external SWFs will load
var Xpos:Number=18;
var Ypos:Number=10;

[Code]...

External swf has no code except for a stop action.

I pieced this current code based on various articles I've found on the net.

View 4 Replies

ActionScript 2.0 :: Drag And Drop Movie Doesn't Work When Loaded On Another Movie

Jan 31, 2012

Greetings. I've been doing this tutorial. [URL] And worked pretty well. In order to adapt to my needs i made it a movie with a drag and drop parameter to be loaded in another movie (with loadMovie or loadMovieNum). The problem is than the movie loads, drags but doesnt drops. Even i tried with the example movie and nothing happens.

View 1 Replies

ActionScript 2.0 :: Targetting - Use LoadMovie() To Load Movie Into Main Movie - Buttons No Longer Work

Oct 1, 2003

I have a movie. In it are some buttons and a dynamic text field. When I press the buttons is should load text from a database into the dynamic text field. If I run the movie by itself (ie. not by LoadMovie()-ing it into a different movie) the dynamic text field gets filled with text and all is well and good. However, when I use LoadMovie() to load this very same movie into my main movie, the buttons no longer work; the text field stays empty.

[Code]...

View 9 Replies

Actionscript 3 :: Sound Latency - Set It For Any Silence Before The Actual Sound By Calling The Sound

Apr 16, 2011

I am triggering short sounds dynamically from the library for a game (Specifically Air for Android). When the user clicks a button the sound can take up to 600ms to actually play. I have set it for any silence before the actual sound by calling the sound like so:

[Code]...

All return the same results. I know there are threads here that talk about this but none have offered a real solution that I can find. Is there no way to cache the sound or store it in a buffer?

View 1 Replies

ActionScript 2.0 :: Actions On Movie Clip Inside Another Movie Clip (menu) Won't Work

May 15, 2009

I have a very simple problem but I can't find the very simple solution to it. I've create an animated menu with animated movie clips inside to work as buttons. All the main buttons work perfectely but I've got just on button with a sub-menu. On this sub-menu I've placed an invisible hitarea button in order to place some gotoAndStop action. The thing is, it seems to me like this submenu hitarea are underneath something else (even though is the seccond layers right about the actions layers). I've placed a simple trace action whenever the mouse rolls over this area but I get nothing... Am I doing something really wrong? I'm losing all my hair already.

View 2 Replies

Professional :: No Sound On Movie?

Oct 20, 2011

I am inporting a .mov file into flash, adding graphics then exporting it as a .swf.
 
the video looks great when I play it back but there is no sound from the original .mov
 
how do I get the sound to work

View 1 Replies

Lip Sync To Sound In Flash Movie

Jan 29, 2010

I have a sound in my flash movie and I'm trying to lip sync to it but for some reason when I try to move that red thing across the frames to play the sound across it so I can go to each syllable so I can work the lips to it. But when I run the red thing across the frames there is no sound going through the speakers. When I ctrl-enter and play the swf I hear the sound what should I do?

View 2 Replies

Flash :: Load Movie Which With Sound

Jun 9, 2009

I am doing a flash which with audio, the audio about 3-4 mins. But when i use another flash movie to load that flash mov with sound (using load movie function), cannot hear any voice. Why is it? The flash movie with sound is use actionscript to attach the sound, when i test the movie, it is work. When it comes to load from another movie, it doesn't work.

View 2 Replies

ActionScript 3.0 :: Looping Movie But Not Sound

Jan 6, 2010

I have set up a movie in which i have imported the music. the movie is about 1 min long and music about 3 min. I have imported the music--works great I have set up a mute/unmute button--works great But I want the movie to loop, but not the music. The movie loops naturally at frame 1, but the music starts again while playing the the music from the first loop.

[Code]....

View 2 Replies

ActionScript 1/2 :: Adding Sound To A Movie?

Sep 14, 2010

adding a simple sound to a movie with AS?  I'd prefer this, since I already have simple "Roll On", and "Roll Out" script in place.
 
I have imported the sound file. In Properties, under Label, I have named it "tire_squeal". (Also, created a layer within the movie, and dragged the file onto the stage - all done.)  Is this necessary when using Actionscript, or not?
 
The sound file loaded into my Library is named, "tire_screech.wav"
 
I want the sound to load "stopped", then play OnRollOver, and quit OnRollOut. (See previous AS code in string.)

View 7 Replies

ActionScript 3.0 :: No Sound In The Movie Imported?

Feb 20, 2011

I have created a new Actionscript 3 file, imported a video and have used the skin MinimaFlatCustom with volume seekbar. When I preivew (ctrl+enter) the file, it works fine. But when I publish the file and open the HTML document, the movies jumps 2 seconds ahead due to which THE VOLUME doesn't work, THERE IS NO SOUND IN THE MOVIE.

If I hit the playback button, the movie starts from zero seconds and volume works fine. Basically when I load the HTML window or refresh the HTML window, movie jumps to 2 seconds AND THERE IS NO SOUND.

View 5 Replies

ActionScript 3.0 :: Movie Clip That Contains Sound?

Sep 18, 2011

I have a movie clip that contains sound (I tried sound by code and sound in the time line) and when I go to next frame and back to it the sound plays without the movie content, and notice that I put stop action in the firest frame and the sound is not event type it is stream typeto stop the sound from playing, I do not wnat it to play unless I played the movie clip it contains.

View 1 Replies

Professional :: Sound Activated Movie?

Feb 21, 2012

anyone got an idea of how I can create sound or voice activated animations? What I want to do is set up a microphone so when a viewer speaks, a movie will either activate a sound clip or an animation?

View 3 Replies

ActionScript 2.0 :: Attached Sound To Movie?

Oct 8, 2004

What is the best way to attached sound to my movie. I used to used the sound obejct as such:

my_Sound_sound = new Sound();
mySound_sound.attachSound("soundID");

But by under the linkage menu I am only able to select export in the first frame. Which makes my first frame super huge. Than my preloader will not load until the sound, so it is no good.

View 4 Replies

ActionScript 2.0 :: How To Get Movie To Play Only Its Own Sound

Oct 27, 2006

I am having a problem with playing sound in flash, actually I have a main file say (a.swf) and in it a sound is playing, then when another movie is loaded by LoadMovie say b.swf (which also has its own sound) both the sounds play. And when I stop the sound in the main file and load the movie again the sound does not play. I want the main movie to play its own sound and when I load another movie inside the main movie then I want to play the loaded movie's sound and when I close the loaded movie then the sound of the main file to be played. My Logic : Will onClipevent (load) { } and onClipEvent (unload) { } work on this ???? when I load another movie on empty movie clip ..

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved