ActionScript 2.0 :: Sound In Frame 2 Not Getting Skipped?

Dec 25, 2009

I've imported a sound into the library. Normally it would have to have 'export for actionscript' and 'export in first frame' selected to make attachSound work. When using a preloader however, I would have to deselect the 'export in first frame' option, otherwise the preloader would start as from 60% or something. So I deselected that one and instead dragged the sound file to the stage between the preloader on frame 1 and the main movie as from frame 3.

When the preloader is finished it would use gotoAndPlay(3) the skip frame 2 with the sound in it. Because the sound file isn't using 'export in first frame' but is included in frame 2, it is not playing, but loaded nevertheless. That way later on as from frame 3 I still could use attachSound. I've tested it with attached file, but it isn't working like expected. In frame 1 (which would be the preloader bit), I just used gotoAndPlay(3).

Frame 2 is the keyframe with the sound dragged on stage. This should be skipped by frame 1. Frame 3 has some comment lines so isn't doing anything yet (just placed some typical attachSound lines, but with comment slashes). Now, although frame 1 is skipping frame 2 and the soundfile isn't using 'export in first frame', the sound is playing nevertheless? How is this possible?

To make it more weird: if I shift these 3 frames to the right, let's say frame 2, 3, and 4, it is working like expected and the sound isn't playing because a gotoAndPlay(4) is skipping frame 3? Why the sound is playing when it is skipped with a gotoAndPlay(3) in the first frame? I know how to make it work, but I'm interested in why it doesn't work when the swf starts from frame 1.

View 2 Replies


Similar Posts:


Timeline Sound Isn't Skipped?

Dec 24, 2009

To make a preloader work on frame 1 I can't use 'export to first frame' on a library sound file. This would mess up my preloader. So I deselected that option and instead dragged the sound file (with 'export for actionscript' still selected) to frame 2. Frame 1 would include the preloader part but for testing purposes I just placed gotoAndPlay(3) there. This would immediately skip frame 2 (with the sound file) and continue from frame 3. Frame 3 would later be the start for the main movie. But for now I just placed this code:
 
var my_sound:Sound = new Sound(); my_sound.attachSound("soundfile.mp3"); my_sound.start(); Testing the movie I found out that the sound played twice on top of each other. So I replaced above code with comment lines:

[Code]...

View 7 Replies

ActionScript 3.0 :: External SWF Frame Rate Jumps And Skipped Frames

Feb 2, 2009

I seem to be having a very weird issue with AS3/Flash 9.

Let me paint the picture: we have a website that loads in 6 different icon buttons, each with their own animation for rollover/rollout. EVERY flash file and embedded timeline video for the icons is 30FPS. However, flash seems to sometimes make it's own decision on frame rate and suddenly the icons will speed up to what seems like 5x the normal frame rate (for example, running through the rollover animation in .5 seconds instead of 3 seconds.

View 0 Replies

Preloader Skipped When Simulate Download?

Oct 31, 2011

I'm using Flash CS5 with AS2. However, there's this project I'm working on right now. When I simulate a download, the preloader is somehow skipped. I'm staring at a blank screen for a minute instead of a preloader and then the main menu pops up. You just see the preloader for one single frame.

Now the code for my preloader is really the standard code:
Actionscript Code:
stop();onEnterFrame = function(){
p = getBytesLoaded()/getBytesTotal();
percent_txt.text = String(Math.round(100*p)) + " %";
if(p == 1){ nextFrame();
delete onEnterFrame;
}}

I have some code on frames 2 and 3, but I tried to see what would happen if I left it out, and the same thing occurs regardless of there being code on frames 2 and 3. All I can really tell you that may mean something is the file size is 2.9 MB. Why Flash Player doesn't just display the preloader, especially since I've never encountered this before.

View 8 Replies

ActionScript 3.0 :: Event.ENTER_FRAME Skipped To The End?

Apr 15, 2009

I am facing a problem where I have a listener listening to Event.ENTER_FRAME:

Code:
public function showAnimation():void {
var character:MovieClip = new Character();

[code]....

View 1 Replies

ActionScript 3.0 :: Does MP3 Stop Streaming Skipped Music?

Aug 12, 2010

Let's say I click next song, it starts loading the next song, then I click next song again before the first song finishes loading. Will the program continue streaming the first song as well as stream the second song?

Code:
private function NewSong (plus) {
if (sound.bytesLoaded / sound.bytesTotal < 1) {
sound.close ();
} sound = null;
songtimer.stop ();
songplaying = false;
channel.stop ();
[Code] .....

This is the code that handles when a new song is to be played. I would think that the first few lines of code would close the stream if it's still loading but I'm not sure. When I click next song like say 10 times, it takes a really long time for the song to stop buffering and start playing. The main question still remains: Will it continue loading songs I skipped over?

View 1 Replies

Part Of The Animation To Be Skipped When I Click One Specific Button?

Jun 29, 2009

I have a swf file "home" that has a series of animations that are button controled.I want part of the animation to be skipped when I click one specific button, for instance.Most of the time I want frame label:"1 out" to play all the way through to the last frame (20) and on frame (20) there is an action sending it back to frame 1and stopping, but I need to have a button that when hit plays frame label 1: "1 out" and continues to frame (19) and does not utilize the action on frame (20) sending it back to frame (1), or in other words playing through "1 out" and then playing "2 out" which occurs on frame 21 without returning to frame (1).

View 6 Replies

Actionscript 3 :: Skip An Optional Parameter And Assign Value To The Parameter After The Skipped One?

Dec 14, 2010

Can we skip an optional parameter and assign value to the parameter after the skipped one?

For example I have a function:

public function Dialog(message:String,title:String="Note",dialogsize:int=99):void
{
}

I can easily call the function with a message and a title:

Dialog("HELLO","Intro");

Is there a way to skip the title and just pass in the dialogsize? I've tried it but can't make it work:

Dialog("HELLO",,dialogsize);

Is it possible to skip some optional parameters without using (rest) parameter?

View 3 Replies

ActionScript 2.0 :: Go To Next Frame After Sound Is Done?

Oct 20, 2009

I'm currently trying to make a flash site for a school project, and I'm currently making the intro.

The intro is executed by pressing a button on the first frame and then a sound plays, after the sound is done, I'd like to make it go to frame 2, but I have no idea how to tell it that that's what I want, so far, the AS in frame 1 reads[code]...

View 3 Replies

ActionScript 3.0 :: Play A Sound At A Certain Frame?

May 30, 2009

I would like to play a sound every time I reach frame 2, but I'm a bit confused with the code. I read some tutorials, but they were about 2.0 and the 3.0 ones were poorly explained.

Let's assume I imported a sound named 'ping.wav'. What do I need to do to play that sound on frame 2?

View 1 Replies

ActionScript 2.0 :: Go To A Frame When A Sound Is Complete

Sep 9, 2010

I need a simple frame script that will track when a specific audio file is finsihed playing followed by a "go to" command that targets a marker or frame number after the sound is done.

View 7 Replies

How To Play A Sound At Specific Frame

May 13, 2009

I have the loading audio file at frame one. However, I want to play the audio only at specific frame or frame lable. How do I do that? Below are my codes:

[Code]...

The above plays the sound as soon as the .swf file is loaded. But I want to play at certain point in time, say frame number or frame lable.

View 17 Replies

Get Sound Volume Of Frame With Javascript API?

Jun 24, 2009

Is it possibleto get the sound volume of of a specific frame or specific time of sound item with the Flash Javascript API maybe together with Action Script?

View 1 Replies

ActionScript 3.0 :: Sound Repeating Every Frame

Sep 15, 2011

I built a Flash clock. The Clock working! Visible working! Sound working!  BUT the sound seems to be plays EVERY frame instead of just the very first frame one time. Stops great but multiple songs seems to be playing. Is it my ENTER_FRAME code causing the problem? If so, what should that line read?[code]...

View 3 Replies

Professional :: Stop Sound When Go To Other Frame ?

Feb 3, 2012

how to stop sound when go to other frame ?

View 2 Replies

ActionScript 3.0 :: How To Stop Frame Sound

Jun 29, 2009

I need to place a sound directly on the timeline to sync with an animation. But I was wondering how can I stop that sound with AS3?

View 5 Replies

IDE :: Stop Sound On Next Frame/page?

Apr 5, 2010

The website has buttons to navigate on each page. Each page has a sound. I tried the embed and external but when I click on a button to navigate to another page but the sound from the previous page is still there which overlaps on the next page's sound.

How can I make the music from the current page stop when going to the next page? I want the next page's sound to play and not have both sounds play at the same time.

I have tried whatever.stop();, SoundMixer, and everything in the Internet for the past 2 days and I still can't make something very basic as changing music work.

View 2 Replies

ActionScript 2.0 :: Stop Sound On Enter Frame?

Feb 17, 2009

Does anyone know how i can stop sound (background music) when i enter specific frame?

View 2 Replies

ActionScript 3.0 :: SWF With Sound On Frame - UnloadandStop Not Working

Feb 17, 2011

I have a loaded swf which contains sound on its frame. Even though I have unload it, the sound still playing. I cannot get rid of it. I've tried:
- _loader.unloadAndStop();
- SoundMixer.stopAll();
- System.gc();

View 1 Replies

ActionScript 3.0 :: Stop A Sound Place On A Frame?

Jun 26, 2009

I've got an animation and need to sync sound track over it. I put the sound on the timeline set as 'stream' but the only problem is that, how can I stop a sound placed manually?

View 0 Replies

ActionScript 2.0 :: Click On The First Frame Sound Starts?

Jul 12, 2009

Sound Exported to Actionscript with name: shoot onPress:shoot starts?

View 3 Replies

ActionScript 3.0 :: Sound And Frame Matching In Timeline

Feb 11, 2010

I have a time line, with 12 images in it, and fwd/rev buttons allowing me to walk thru the images. I've also got internal .mp3's that match each image and a background music bed - it's all working great.... except for one little thing....if you to too fast thru the images fwd/rev the sounds overlap each other and that's bad, so what I'm looking for is to be able to stop the previous sound before playing the next sound. Sounds so simple to do, but I've tried everything I can find to make it happen with no joy. I'm more of a designer than coder, however I really need to make this work. Do I need to create an array of some sort?

View 9 Replies

ActionScript 3.0 :: Ending Sound Automatically At Frame 50?

Dec 3, 2010

I have a splash screen that I am playing a nice waterfall in the background. I inserted into frames 1 through 50. No scripting....The noise will not shut up at frame 50. Do I have to script what is the newbie answer to my issue. I don't want buttons to stop sound I just want it to end at frame 50..

View 1 Replies

ActionScript 2.0 :: Sound Fade On Frame Variation?

Nov 10, 2008

I've created an MC to control the various sounds throughout my flash file. I'm sure this is an ugly way to do things (in AS 2.0) but barring that, here's what I'm trying to do, and what I got at the moment:I need one of several sound clips to play (1-4) depending on a particular frame that's reached. If, during the sound playback, a user clicks a navigation button, I need the sound to quickly fade out (and I'm assuming have the sound object stopped or destroyed to preserve resources?), so my _root mc targets a frame within my SOUND mc and creates the 'standard' sound object:

Code:
VO_mobile = new Sound(mobilesound);
VO_mobile.attachSound("vo_mobile");

[code].....

View 2 Replies

ActionScript 3.0 :: Play Sound File At Certain Frame Lablel?

May 14, 2009

I have the loading audio file at frame one. However, I want to play the audio only at specific frame or frame label. How do I do that? Below are my codes:

Quote:
//start of sound section is for sound
var soundReq:URLRequest = new URLRequest("FlashFiles/audioFiles/mySoundmp3");
var sound:Sound = new Sound();

[Code]....

The above plays the sound as soon as the .swf file is loaded. But I want to play at certain point in time, say frame number or frame label. I want to be able to put all my action script on frame one (or one location) instead of all over the time line.

View 1 Replies

ActionScript 2.0 :: Playing And Stopping Sound On Single Frame

May 20, 2010

I have a couple of sound clips that I'd like to be able to play. I want one clip to play per frame (the frames are timed to a certain length through a set interval action). When I advance to the next frame (either when the timer runs out or I click a button) I want the first frame's clip to stop and the second clip to begin. IE: I have clip A and clip B which correspond to Frame A and Frame B. I go to frame A and clip A plays, I go to Frame B and Clip B plays (Clip A having stopped).

View 3 Replies

ActionScript 2.0 :: Manage Volume Of More Than One Sound In Flash Per Frame?

Jun 27, 2007

In a code im currently working on, I have 3 sounds that I need to maintain constantly, but It seems flash can only manage 1 sound per frame.

How can I manage the volume of more than one sound in flash per frame?

View 10 Replies

ActionScript 3.0 :: Flash To Hold On Frame Till Sound Finishes

Apr 22, 2009

I'd like to know if there's a wait to have flash hold on a frame till a sound finishes playing. I'm guessing that this will require some sort of EventListener but I'm pretty new to AS 3.0 and I'm not sure how to do it. I've searched the forms but cant seem to find anything on how to achieve this either, but I think thats because I'm not sure of the correct terminology.

View 2 Replies

ActionScript 3.0 :: Loading A Sound File From The Library To Play It In One Frame?

Sep 23, 2009

I have a flash file with several frames. In each frame I need to play a sound file.I've added all the sounds to the library and done all the necessary steps to export for actionscript.Here's my code to play the sound in one frame.
 
var sound1:Sound = new Cal10101();
sound1.play();

This works great to play the sound. I am using buttons to move to the next frame. When I click the button to move to the next frame, I need the sound from frame 1 to stop and a new sound which would be Cal10102 to start playing.How do I stop the sound from frame 1 from playing when I go to the next frame?

View 3 Replies

ActionScript 2.0 :: Sound Flash - When The Audio Finishes It Goes To The Next Frame Automatically

Jan 28, 2010

I am trying to make a webinar in flash, I have frames and in those frames I need to insert audio and when the audio finishes it goes to the next frame automatically. but I also have a menu bar and when I click on a button to take me to a frame i get a whole load of audio going on. I just need it to go to that frame and play the audio Just want to be able to have it play though, when the audio finishes it goes to the next frame or if i click a button on the menu it takes me to the frame i need,

View 1 Replies







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