ActionScript 3.0 :: Loading Sound On Onload?

Jan 14, 2010

I want to load a function/sound to play ONLY on the first load.eg/I have four pages, one page has a sound that loads every time I click back to that page. Is there a way to make it only load the first time that page is loaded?

View 5 Replies


Similar Posts:


ActionScript 2.0 :: Sound.onLoad + OnError

Dec 23, 2004

i'm making somekind of music / video player in flashmx2004. it plays streaming mp3 en flv files. random people can put a link into the players database. of course there will be some that insert a dead link, now i want to check with actionscript (1.0) if the link is dead and if so, the player automaticly will skip this track.this is what i've got allready to load te streaming sound:

_root.playSound = new Sound();
_root.playSound.loadSound(trackurl,true)

trackurl is the link to the file. link to the player atm: [url]

View 1 Replies

ActionScript 2.0 :: Calling A Function From Within Sound.onLoad()

Sep 11, 2007

So I'm trying to call a function from the onLoad method of my sound object and something is wrong with my scope.

see my example...

Code:
class com.infect.SoundController{
private var soundObject:Sound
private var soundMC:MovieClip

[Code].....

View 2 Replies

Actionscript 2.0 :: Access Sound Duration Outside Onload Function?

Jan 21, 2009

How to access the sound duration outside the onload function....im trying to diaply the duartion of each song in the playlist by loading them one after the other...but am not able to access duartion of all the mp3 files....i want to knw if there is any way to access the sound duration outside the sound.onload function.

View 3 Replies

ActionScript 2.0 :: [FMX] Custom Sound Class Not 'inheriting' OnLoad?

Jun 28, 2004

have read the brilliant OOP for actionscript 1 tutorial from cover to cover and it has me enormouslyMy problem is with a class i wrote called frameSound which extends the Sound object. Well that was the plan but.. it doesn't seem to react to the onLoad event. Here's the code:

Code:
//custom frameSound class constructor.
frameSound = function(){

[code].....

View 4 Replies

ActionScript 2.0 :: [FMX] Custom Sound Class Not 'inheriting' OnLoad

Jun 28, 2004

My problem is with a class i wrote called frameSound which extends the Sound object. Well that was the plan but.. it doesn't seem to react to the onLoad event. Here's the code:

Code:
//custom frameSound class constructor.
frameSound = function(){
frameSound.count++;

[Code].....

View 4 Replies

ActionScript 2.0 :: Sound.onLoad + OnError - Making Music / Video Player In Flashmx2004

Dec 23, 2004

i'm making somekind of music / video player in flashmx2004. it plays streaming mp3 en flv files. random people can put a link into the players database. ofcourse there will be some that insert a dead link, now i want to check with actionscript (1.0) if the link is dead and if so, the player automaticly will skip this track. this is what i've got allready to load te streaming sound:

[Code]...

View 1 Replies

ActionScript 2.0 :: Loading Jpg With LoadMovie + OnLoad?

Jul 5, 2009

I've been sitting here for the last 2 hours trying to figure this one out.I have an empty movieclip on stage, and I'm loading external images in it using loadMovie()The problem is as following; I want it to resize when the image has fully loaded.I've been googling and googling non-stop, but found nothing that works.

View 1 Replies

Loading With Sound Only Played Once But Keeping Hover Over Menu Item Sound Intack?

May 21, 2010

I have a flash header that was never completed because the guy I hired took people's money and ran. So now I even wonder if what he said could work with my flash header is true or not. But, usually there is always a way to make it work.

I have a flash header that does two important things: 1) Upon entering the site, it loads and plays an audio track 2) Makes an animal noise when you hover over each animal menu item. (not sure if I'm able to give a link to it or not on here. If I able to and someone would like to see it let me know)

I want to know if my flash header can support the following additional functionality/changes:

1) Currently, it loads everytime a page is selected. I only want it to load the one time of entering the site because the audio gets annoying. Set a cookie maybe?

2) But, I do not want to turn the audio off completely because I still want the hover over each menu item sound.

3) Have a link on it to allow them to select to turn on / off the sound completely. It currently has that, but only for the current page. Once you select another page, the audio is back to on.

4) Lastlly, is there a way for it to detect that someone doesn't support flash and to display an html version of it? And can flash create a html version from my fla file?

I don't know much about flash (but am learning) so I'm not sure if I'll be able to do this myself. However, I want to find out if my flash header will even work this way before I invest the time learning it just for these changes. I know it will be pretty deep with script code, but I'm hoping I could find base code already available for these features. Not sure I can afford help now because of being laid off and two different scammers taking advantage of me. So I'm going to try to do myself and see if there is any suggestions/support on here that can help. I have Flash CS4.

View 2 Replies

IDE :: Loading With Sound Only Played Once But Keeping Hover Over Menu Item Sound Intact?

May 21, 2010

I have a flash header that was never completed because the guy I hired took people's money and ran. So now I even wonder if what he said could work with my flash header is true or not. But, usually there is always a way to make it work.I have a flash header that does two important things: 1) Upon entering the site, it loads and plays an audio track 2) Makes an animal noise when you hover over each animal menu item. I want to know if my flash header can support the following additional functionality/changes:

1) Currently, it loads everytime a page is selected. I only want it to load the one time of entering the site because the audio gets annoying. Set a cookie maybe?

2) But, I do not want to turn the audio off completely because I still want the hover over each menu item sound.

3) Have a link on it to allow them to select to turn on / off the sound completely. It currently has that, but only for the current page. Once you select another page, the audio is back to on.

4) Lastlly, is there a way for it to detect that someone doesn't support flash and to display an html version of it? And can flash create a html version from my fla file?

I don't know much about flash (but am learning) so I'm not sure if I'll be able to do this myself. However, I want to find out if my flash header will even work this way before I invest the time learning it just for these changes. I know it will be pretty deep with script code, but I'm hoping I could find base code already available for these features. Not sure I can afford help now because of being laid off and two different scammers taking advantage of me. So I'm going to try to do myself and see if there is any suggestions/support on here that can help. I have Flash CS4.

View 4 Replies

Professional :: Loading With Sound Only Played Once But Keeping Hover Over Menu Item Sound Intack?

May 21, 2010

I have a flash header that was never completed because the guy I hired took people's money and ran. So now I even wonder if what he said could work with my flash header is true or not. But, usually there is always a way to make it work.I have a flash header that does two important things: 1) Upon entering the site, it loads and plays an audio track 2) Makes an animal noise when you hover over each animal menu item. (not sure if I'm able to give a link to it or not on here. If I able to and someone would like to see it let me know)I want to know if my flash header can support the following addionalunctionality/changes:1) Currently, it loads everytime a page is selected.  I only want it to load the one time of entering the site because the audio gets annoying.  Set a cookie maybe?2) But, I do not want to turn the audio off completely because I still want the hover over each menu item sound.

3) Have a link on it to allow them to select to turn on / off the sound completely. It currently has that, but only for the current page. Once you select another page, the audio is back to on.4) Lastlly, is there a way for it to detect that someone doesn't support flash and to display an html version of it? And can flash create a html version from my fla file?I don't know much about flash (but am learning) so I'm not sure if I'll be able to do this myself. However, I want to find out if my flash header will even work this way before I invest the time learning it just for these changes. I know it will be pretty deep with script code, but I'm hoping I could find base code already available for these features.

View 2 Replies

ActionScript 2.0 :: XML Loads Other XML Files, Onload Function In Onload Function?

Nov 20, 2006

I am writting an image gallery that loads one intial xml file named galleries.xml.From this point each xml node loads a XMl file for that gallery that holds all the images.The problem arises in the fact that to do this I need a onload function within an onload function.Onload functions dont accept parameters so I can pass down the variable that shows what loop the gallery loop is on as I need that in the function that holds the images.

View 4 Replies

Flex :: Loading Sound Gives Exception On Sound.id3?

Feb 15, 2010

When loading a MP3 to a flash.media.Sound object the id3 property gives an error:

SecurityError: Error #2000: No active security context.

Offcourse, like many errors in Flex, the Flex documentation doesn't mention a thing about this, except that it exists...

The MP3 is valid (i've checked it with MediaPlayer and iTunes), the Sound object is in a good state (bytesTotal and bytesLoaded both reflect the correct amount of bytes).

View 1 Replies

Actionscript 3 :: Load SWF Data Without Loading Sound, Then Load Sound Later?

Jan 2, 2011

I have an SWF that's 30MB. Sound files (music) make up 25MB, art and other things make up the remaining 5MB.

Would it be possible for me to load the 5MB of necessary art and other things first to allow the user to operate the app, then after that's all loaded and they are operating the app, load the remaining 25MB of sound files in the background?

UPDATE: Loading SWF (or other entities) externally is not an option.

View 1 Replies

Sound Not Loading?

Aug 6, 2009

I have the following code:
myVars = new LoadVars();
myVars.load("http://charlesnewmanpubl.com/Sweethearts_On_Parade_BRGK.txt");

[code].....

View 1 Replies

IDE :: Loading Sound With URLLoader?

Feb 21, 2010

I am loading a sound file with the URLLoader class passed to the URLRequest class, just as one would load any other external content type.

Code:
var loader:URLLoader=new URLLoader;
loader.load(new URLRequest("file.mp3"));

When the loading is complete I would like to pass the data to a Sound Object.

Code:
var mySound:Sound=e.currentTarget.data

The object returned on the complete event is of type flash.net::URLLoader.

Code:
e.currentTarget

How can I turn this URLLoader into a Sound Object?

View 5 Replies

ActionScript 3.0 :: Getting Error When Loading In New Sound?

May 13, 2009

I'm working on improving the media player for my portfolio (www.robin.astedt.name) and I've run into a wall..

The problem I get is that I can play songs and pause them and resume etc, but when I want to select another song and play it I get an error. It works if I initiate the Sound (s) and SoundChannel (sc) variables in the musicPlay(); function but then I can't pause because I need it to be initiated twice that way which ofcourse also gives me an error.

Here's the error I get when I play another song:

Code:
Error: Error #2037: Functions called in incorrect sequence, or earlier call was unsuccessful.
at flash.media::Sound/_load()
at flash.media::Sound/load()

[Code]....

View 3 Replies

ActionScript 3.0 :: Loading Part Of A Sound?

Nov 21, 2009

I want to be able to play just a clip of a song, so it is wasteful to load the entire song.  Is there a way to just load say, 10 seconds of a song?

View 7 Replies

ActionScript 3.0 :: Loading A Sound Twice Causes Error?

Dec 12, 2009

I am trying to load a sound in an mp3 player based on the selection of a user whohas the .swf embedded in a web page. The first time the user makes a selectionthe selection loads with no problem. But if the user stops the sound or lets it playto the end and starts it again, I have to be careful not to callsound.load(URLRequest)again.If the user has chosen another selection to listen to, then load() has to be called again.The question is:how do I unload the sound Obj so another mp3 file can be loaded into it and played?I would think that load(another URLRequest) would overwrite the first and not complain.( a deeper question is where is the sound file stored, by the browser -- in the case ofhtml embed-- or does the Flash plugin maintain its own cache?)

View 7 Replies

ActionScript 3.0 :: Loading A Sound And Having It Muted?

Mar 12, 2012

i have a project that i'm working on for school in a multimedia class. everything in the project is essentially done except i need to load a few sounds into the project file all at the same time. as this would be rather unpleasent to listen to, i want them all to be muted when they are loaded (externally or internally, it doeesnt really matter) in. my professor doesn't seems to be very helpful so i decided to come to the source. the program i'm using is flash pro cs5.5 with as3. i think there is some code for controlling the volume, and optimally that is what i would like to use, like "setVolume = 0" and then later when i want the sound(s) to be heard "setVolume = 100", or something along those lines.

View 5 Replies

ActionScript 2.0 :: Loading Sound From Separate .SWF?

Dec 5, 2007

I know it has been done in Madness Interactive, which I did check up on and looked through the code and found nothing, as well as Googled a bunch of stuff, and still nothing.

View 3 Replies

IDE :: Loading Random Sound Clips?

Aug 26, 2009

I was wondering if somebody could point me in the right direction to be able to load in a random sound clip (from a set of 5 or more mp3s) when the user rolls over a button. I can't seem to find a way to do this.

View 14 Replies

ActionScript 3.0 :: Loading Sound From FileStream

Nov 27, 2009

Is there any way to load a sound from a FileStream class?[code]Is there a way to pass "Song.mp3" into a new Sound variable?

View 1 Replies

ActionScript 3.0 :: How To Clear Array Before Loading New Sound

Mar 31, 2009

I've got an application that has several slides. Each slide has a sound file that goes with it. I created a function on the root timeline that plays the audio sound. Each slide loads one after another and works great. However I have next and previous buttons for each slide. Each button makes the sound channel stop. If I press something too quickly the sound in the sound channel isn't overwritten with the new sound.

So basically I want to know how to remove all sounds from the sound channel so I can load a fresh new sound. Because the stop command only stops the soundchannel until the next sound is loaded and then it starts playing the sound again. It seems like the sound channel is an array of sounds and I don't know how to clear the array before pushing a new sound to it.

View 4 Replies

ActionScript 3.0 :: Loading Multiple Sound Files?

Jul 28, 2009

I am trying to put a few songs on a website, not as an .mp3 player, I just want to be able to assign individual buttons to control them.ow, and it works great. I would like to now how to add more and assign them to their own buttons seperate from the other songs.This is the code I have for one song

var url:String = "";var urlRequest:URLRequest = new URLRequest(url);var sound:Sound = new Sound();sound.load(urlRequest);var sc:SoundChannelvar startTime:uint=0;
playBtn.addEventListener(MouseEvent.CLICK,playF);stopBtn.addEventListener(MouseEvent.CLICK,s

[code]......

View 5 Replies

Actionscript 3 :: Load ID3 Tags Without Loading Sound In It?

Mar 1, 2010

Is there a way to load ID3 tags in AS3 without loading sound?

View 3 Replies

Actionscript 3 :: Sound Stream Stops Loading?

Jan 28, 2011

I have a little sound stream script here, but sometimes if you press play to the next track before the current has done loading the next track doesn't comeplete loading

package player {
import flash.events.Event;
import flash.display.Sprite;

[Code]....

View 1 Replies

ActionScript 2.0 :: Loading A Sound In A Level Other Then Level0

Jan 10, 2009

Does anyone know how I can load a movie into level1 that has sounds embeded in it and be able to play them? I would like to load the sounds using code on the timeline. I don't understand why my method is not working.Here is what I tried.I have a movie that I am loading into level 1.My sounds are inside the movie that I load into level1.So I ran a test and if I load the movie into level0 the following code works fine and plays the sound.[code]But then when I load the move into level1 and change the code to the following, it deosn't work.[code]

View 3 Replies

ActionScript 3.0 :: Loading Sound Variable From Within Function?

Jan 29, 2009

I have made a sound sequencer where users can record their own sounds and add them to the sequencer, my problem is that I want to be able to change the sounds during the running of the program. Here is the simplified code for importing and loading a sound in ready to be played.

var BASS:String = "bass.mp3";
function bassURL() {
var bass:Sound=new Sound(new URLRequest(BASS));
}

[Code].....

The reason I put the URLRequest and Sound in a seperate function is because I want to be able to change the var BASS to different mp3's during the program. Obviously when I run this it tells me that it can't find 'bass' because its a var inside another function. How can i get it to refer to 'var bass' inside bassURL?

View 0 Replies

ActionScript 3.0 :: Loading External SWF - Sound No Visual?

Jul 10, 2009

On a button click the page loads and external swf using the add child function. Once loaded the user can close the "pop up" at any time by clicking the close button. The swf appears without a problem first time round, it is if they go back to click again that causes the problem. If they then try and click the button to view the external swf for another time then no visuals appear - you can hear sound but the videos never appear. I have tried to see if it is hiding behind something to no avail.

Edited code is below!!

ActionScript Code:
var multiPlayer:Loader = new Loader();
var playerRequest:URLRequest = new URLRequest("vgallery_multi.swf");
function showQAMultiple(Event:MouseEvent) {

[Code].....

View 2 Replies







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