ActionScript 3.0 :: Stop Mp3player Swf When Another On The Same Page Starts

May 19, 2010

I've created a small mp3player which is to be used twice on one page (eg. songA.swf and songB.swf). Both are based off the one .fla file and use exactly the same code. My client has requested that only one player function at a time, so that if a user is listening to song A and then starts playing song B without pausing song A, song A will stop playing and reset, and vice versa.

I've been scouring the web for the past few days looking for an AS3 solution but I haven't found anything I've been able to successfully apply, as I'm really quite new to AS3 and only a basic background in javascript has helped me get this far. Attached is a zip folder containing .fla's and an html page as an example of how it will be used on the client's site. And a link to a live example page included in the zip file: [URL] Other notes ummm... I'm using swfobject to display the swfs, and currently they display across the top browsers.

[Code].....

View 0 Replies


Similar Posts:


ActionScript 3.0 :: Stop Class File From Automatically Starting And How To Stop It After It Starts?

Oct 13, 2011

How do I stop a class file from automatically inserting itself into the .fla file. I want to insert it manually into a frame, and then tell it to stop after I leave the frame.The following is the code included in my .as file.

ActionScript Code:
package {
import flash.display.*;
import flash.events.*;[code].........

View 3 Replies

ActionScript 3.0 :: Gallery Page With A Bunch Of Page Numbers - Click On A Page Number, The Over Script Should Stop Until Go To Another Page?

Jan 26, 2009

i'm trying to build a flash site and ran into a problem... i have a gallery page with a bunch of page numbers at the top. when you click on one, a movieclip loads of some images coming in.so the problem i'm having is that i made a little animation for when you roll the mouse over the page number (they scale up when the mouse is over, scale back when the cursor moves away)... what it's doing is when you roll over, it goes to a certain frame in the timeline and plays that animation.that's all working cool, but i need it to not do that once it's clicked on. so basically when you actually click on a page number, the over script should stop until you go to another page... here's the code i've written,

function over(event:MouseEvent):void {
this.gotoAndPlay(30);}
function out(event:MouseEvent):void {[code].....

View 0 Replies

Php :: Stop A Player When Another Starts?

Mar 23, 2011

I have multiple players on the same page (flash as3), but I would like, that when a player is playing, stops, when another player begins to play...

View 2 Replies

Flash :: Stop A Video Before It Starts?

Jun 12, 2011

I'm comfortable with PHP and Javascript but this is the first time I'm using flash. I have Flash CS5.

I've managed to import a movie file, however, as soon as it's downloaded it starts playing. I've tried using the Action stop(); coding, which works file in the export preview in CS5, but on a website it runs straight away.

I know I can't use the command because that stops the timeline but by then the video is already playing. My solution would be to use and have the video in frame 2, then get javascript to jump to frame 2 when I was ready. However, I can't find a way to import a video file to a frame in CS5. Is there a better way?

View 1 Replies

Flex :: Stop A Soundeffect Once It Starts?

Jun 10, 2009

Play a sound effect when the user mouses down on the HSlider. Stop or pause the sound when the user mousses up. The following code starts the sound but a mouseup does not stop it.[code]...

View 1 Replies

ActionScript 3.0 :: Hide/Stop MC When A Second MC Starts?

Nov 16, 2011

im currently creating a page that contains a number of movie clips where when the mouse goes over the movie clips, the mc (which is a photo) enlarges on the screen.

Currently when I click a second mc the first mc is still visible and if the second photo is on a layer above the first photo then it's enlarged image is in front of the first enlarged image. (does that make sense?)Current script is (without any actions to hide the images as they didn't work):

//mcBarbara
mcBarbara.addEventListener(MouseEvent.MOUSE_OVER, playMovie1);
function playMovie1(evt:MouseEvent):void
{

[code]....

View 2 Replies

ActionScript 3.0 :: Hide/Stop MC When A Second MC Starts

Nov 16, 2011

creating a page that contains a number of movie clips where when the mouse goes over the movie clips, the mc (which is a photo) enlarges on the screen.

Currently when I click a second mc the first mc is still visible and if the second photo is on a layer above the first photo then it's enlarged image is in front of the first enlarged image. (does that make sense?)

I have tried a number of different functions to hide the current mc when a new one is clicked but I can't find any that work.

Current script is (without any actions to hide the images as they didn't work):

//mcBarbara
mcBarbara.addEventListener(MouseEvent.MOUSE_OVER, playMovie1);
function playMovie1(evt:MouseEvent):void
{

[Code].....

View 2 Replies

Professional :: Stop Background Music When Flv Starts AS2?

Apr 7, 2011

I have a flash game that I have videos between some, but not all questions.I would like to have background music that would play during the questions then mute, or turn off when the video is played, then turn back on when video is completed.If possible, but not required, a mute button could be created that would mute the music and would overide it turning back on as well.In other words the person takes the quiz, when the video plays it shuts off the music and starts it back up when video ends. And if possible, if they select to mute the music before the video plays it will not restart after the video completes.I did this in actionscript 2. The questions are on frames 1-50, the videos are on frames 100-110.I have it set up when a question is answered it goes to the video then back to the next frame for questions when it completes.

View 1 Replies

Stop IPhone Playing Music When My App Starts?

Jan 14, 2012

I have produced an app for iOS but when it loads the music from the iPhone doesn't stop.
 
I have read on forums that if an app contains sounds that the iPod will fade out but it doesn't for me.  I have tried loading the sounds dynamically (these sounds don't play at all if the iPod is playing) and embedding them into the movie.  Nothing seems to work sadly.  I have ensured that I have all the recent updates for flash and the air packager and I can't find a solution to this anywhere.

View 1 Replies

Actionscript 2.0 :: Stop Music Playing In One Swf When Another Swf Starts?

Oct 26, 2010

On my main SWF Home File i have 2 swf files are loaded into my (main home swf) and everything is runing smooth BUT the problem is when i want to watch the video the music is still playing i have to click on the button to stop music playing.

what i want is when i click on the video to play i want automatically the music to stop playing with out me clicking the mp3 button to stop the music playing.

NOTEKeep in mind i have 2 SWF files that are loaded in to the main swf file ...Home SWF is the main file

MP3 SWF << Loads on Home SWF
Video SWF << Loads on Home SWF

All i want is when the video is playing automatically stop the music and when the video is finish the music automatically continuing from where it was left.

View 1 Replies

ActionScript 2.0 :: The Movie Starts Again Even With _root.stop()?

Jul 30, 2011

I have a movie with 3 scenes, the last one has only just one statement on the timeline:_root.stop(), and there are not library objects neither ones created by code. Just and empty stage with the statement I told.I know I am not an expert in Flash yet, the entire design of code in timeline and movieclips are not very clear and tidy.When the movie reaches the scene three, it stays one or two seconds (not the same amount of time in each playing) and replay from scene one and the things become chaotics from there. I revisited one and two times the code and objects from movie explorer tool and can't figure out what demon makes re-start the movie when it must stop in the last scene

View 1 Replies

ActionScript 3.0 :: Debugger Starts But Doesn't Stop At Any Of The Breakpoints?

May 7, 2009

I'm trying to debug my as3 game, but no way, the debugger starts (with the different debug panels) but doesn't stop at any of the breakpoints so i created an empty as3 file (.fla) and put some simple code:

[Code]...

I put a breakpoint at line 2when i press Ctrl-Shift-Enter Or Debug>Debug Movie, it traces "Hello" 2 times without stopping when i right click on the new flash player window that opens, it shows DEBUG on the menu (not grayed), and i think that it means it's the flash player debug version that is running I'm running on Vista and I tried reinstalling Flash without success, but i've got another PC with windows XP and it works well on it,
Are there any restrictions on Vista or maybe services that should be started, or anything that should be activated / deactivated?

View 13 Replies

ActionScript 2.0 :: Stop Clock That Starts On Touch Of A Button

Mar 3, 2004

I want to make a stop clock that starts on the touch of a button.Like using getTimer() but only starts the time at the click of a button.I do not want to display todays date but just a millisecond stopclock like on a watch, one that you can reset and time again.

View 1 Replies

ActionScript 2.0 :: Stop Website Music / When Clip Starts To Play

May 18, 2010

when you play the short clips the sound of the site keeps playing in the background and the sound of the video plays over the top. Is there anyway to stop the website music when the clip starts to play and when stop or the clip finishes the website sound starts to play again. So you know what I mean the website is URL...

View 1 Replies

ActionScript 1/2 :: Zoom - Stop The Page Being Dragged Past A Certain Point So The Static Page Is Not Seen?

Sep 22, 2009

When i zoom into the page then move around the edge of the page can be moved past the edge of the browser window showing the static page which appears at the start of the document. Is it possible to use actionscript to stop the page being dragged past a certain point so the static page is not seen? On the example below the static page is white so it does not pose too much of a problem however im using the static page as a sort of instruction page and it looks a bit rubbish if the user drags a page past the edge of the view window and see's the original page. Example below. [URL]

View 1 Replies

ActionScript 3.0 :: Stop Sound On Current Page When Going To Previous Page?

Oct 19, 2010

I'm working on a pretty basic interactive children's book. I have it set up so that each page has audio relating to that specific page. Going forward, there is no issue with sound overlapping from the current and next pages. Going backward, however, there is an issue with sound playing on both the current and previous pages. How do I stop this?

Here is the script I'm using-

ActionScript Code:
stop();
import flash.events.MouseEvent;

[Code].....

View 3 Replies

Actionscript 3.0 :: Custom Mp3Player Plays At Some Pc And Not On Other

Sep 24, 2010

I would like to share my problem with the my custome Mp3Player that I have developed in AS3.The thing is that, when I access the player from the website it plays on my pc and some of friends pc too with out any errors.But some of my friends do complain that the player loads but plays nothing

I have gone through the code and even placed the crossdomain policy file at the root. But some of friends still complain for the same ! But its perfectly running in my FLASH IDE as well as when I access the it online.

View 2 Replies

ActionScript 2.0 :: Volume Control For XML MP3Player?

Jun 7, 2007

I'm super stuck on this (getting into the days catagory!) before i start, here's the link to what my XML MP3Player functions like atm;[URL]..The foundations of the AS for this player are from the gotoAndplay.com tutorials, I'm having two problems with adding this volume slider control,

Firstly the SliderBar onload position, it is positioned on the far left of the screen, you can drag it towards the player, once you get it with'in the player it functions correctly moving between the designatd left and right x values correctly, but how can i get it to load into the player rather than out to the left?

And Secondly, by this stage you may have noticed no sound, i've tried alot of different things but to no avail?

[Code]...

View 1 Replies

ActionScript 2.0 :: LoadSound Starts Fine, Then A Second Starts Replaying Again?

Apr 8, 2006

I've got a site that is using loadSound to play some mp3s and it works fine. however, the sound starts to stream, and then replays itself like a second later. my guess is that its playing faster than the load is going and when it gets to the point where it hasn't loaded enough, it starts to replay it, but i'm not sure that that is the exact problem. my code:

[Code]...

now, i tried making a playTrack function that i can call with setTimeout and i put that in the onLoad in place of track.start(), but that didn't work either (i was hoping to not start playing the track for 3 seconds to give it some time to buffer).

View 1 Replies

ActionScript 2.0 :: MP3Player - Variables And External Sources

Sep 30, 2004

I have an mp3player that loads an external mp3 file and plays. It works just fine if the url/location is hardcoded in the swf file. However, I need to be able to have the url passed to the flash externally so that a number of users may utilize this single swf build.

Example:
Current location need to be filename.mp3 or [URL]. However, I need this location to be edited per use of the swf. In php i know I could call it such as:
$myLocation = "123";
[URL]
or
$myLocation = "[URL]";
(The "123" is what changes for each page use)

Here is the code i have that is working just fine. Until I need to use a full url that changes for each page the swf is use on.
onClipEvent (load) {
if (playing!=true) {
playing=true;
soundIsLoaded=1
myMusic=new Sound();
myMusic.loadSound("myMusic.mp3",true)
}}

Limitations:
1. Because of the server set up, I am always required to call items using full absolute urls/paths.
2. php, cfm, xml etc are not available for use with this. -- the goal is to be able to give an webmaster a copy of the swf and the code to embed it on their html page... and that's it.

View 7 Replies

Actionscript 2.0 :: MP3Player Based On GTAL Tutorial Not Working?

Apr 3, 2009

I tried creating a music player based on Lee's tutorial (part 1 and 2). However, the code I used in my movie is slightly different from Lee's. Unfortunately, for some reason the mp3 player won't jump to the next song, like it does in the video tutorial. At first I thought there was a hidden error in my code, and later, after many tests I realized that the problem was the same even with Lee's files as well, which makes me wonder what's really happening here?I'm using Flash CS4 under Windows Vista Ultimate edition. However, I get the same strange behavior when I run the tutorial files on a different PC, in Flash CS3 under Vista Home Edition. This is why I believe that attaching my custom files to this thread is not necessary.

View 2 Replies

Sound Stop All Sounds Works / Then Sound Starts Again?

Jan 5, 2010

I am using FLASH CS3.I have gone through many posts, seems to be an issue with many people.Still haven't come across a fix.Website made in FLASH. Flash movie loads and sound works great!I have a button with 'StopAllSounds' action script.[code]When I go back to main page... sound starts up again.Is there a way I can stop all sound regardless of where the visitor goes on the website?

View 2 Replies

ActionScript 3.0 :: NetStream Choppy - Make A Character Start To Talk When The Sound Starts And Stop Talk When The Sound Stops

Aug 5, 2010

Need to make a character start to talk when the sound starts and stop talk when the sound stops so I'm using this:

[Code]...

View 2 Replies

Actionscript 3.0 :: When Put On The First Frame The Action #include "mp3Player.as" Get A Syntax Error?

Jul 25, 2010

first of all i am kinda newbie with as3 functions and script and I have a question in regard of Lee mp3 player tutorial part 1.I want to know why, in my .fla file mp3Player when I put on the first frame the action #include "mp3Player.as" i get a syntax error?Sorry if this sound very newb but I definitly want to go foward with thoses tuts

View 1 Replies

IDE :: Stop Video When Going To Another Page?

Aug 24, 2009

I am working on a website using the [URL] tutorial for Flash CS4.

I ran into a bit of a problem, I made my flash movie and everything was good. I added a welcome video with sound that plays when the user opens the website, my only problem is that when you click on the other pages the video and sound keep playing even if you see the other page.

How do I get that video with sound to stop once you go away fro the page and go to another page?

View 3 Replies

ActionScript 2.0 :: How To Stop Video When Go To Another Page

Apr 24, 2011

I am trying to stop video when I change to another page [URL].

View 9 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 3.0 :: Get The Program To Stop At The End Of Each Page

Nov 23, 2010

I am creating my own portfolio for web use. I have posted here as well there are 3 errors messages i am getting when trying to get the program to stop at the end of each page. I have created my menu with links too. here are the error messages

1) 1026: Constructor functions must be instance methods.

2) /Flash Portfolio /Development_files/main.as, Line 1 5000: The class 'main' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type. Line of code: package {

3) Flash Portfolio /Development_files/mainMenuMC.as, Line 1 5000: The class 'mainMenuMC' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type. Line of Code: package {

View 1 Replies

Stop Video Player When Accessing Another Page?

Mar 17, 2009

I'm looking for a (simple) way to make the vidplayer to stop playing when moving from one page to another one (on the same timeline hey). As it is right now if you start to watch a video and don't push the stop button before going to another page it keeps playing - hence you still hear the sound playing in the background while you're actually looking at another page. And that's not good.

View 3 Replies







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