ActionScript 3.0 :: Pausing An External Mp3 File?

Jul 8, 2009

Right now I am using this code to load an external mp3 file into my website:
 
var url:String = "my file";var urlRequest:URLRequest = new URLRequest(url);var sound:Sound = new Sound();sound.load(urlRequest);sound.play();
 
I am wondering if it is possible to add playback buttons (play, pause, stop) which control this external mp3 file from my site. And what code I would use to do that.

View 12 Replies


Similar Posts:


Horizontal Text Scroller Pausing, Getting Txt From External File?

Dec 13, 2010

find a horizontal or vertical message scroll-er that pauses on each message? And pulls the message from a external xml or text file. Trying to make a website news scroll-er that's easy for the owner to edit

View 5 Replies

ActionScript 3.0 :: Pausing Flv In An External Swf From The Main Swf?

Sep 27, 2008

I am creating I guess what you could call a swf library. It's a bunch of different interactive swfs all packaged up into a main swf that I can embed on my page. Each swf contains flv's that play. They all work great in my main swf and individually, that's not my problem.Everything is working great but I have a menu that pops up to change between different episodes and it works great.BUTWhat I'm looking to do is when you click on the menu button and the menu pops up over the externally loaded swf, I want the externally loaded swf to pause. Then when you close the menu I want it to un pause. It looks really tacky when the menu pops up and the flv's in the externally loaded swfs keep running. I knew how to pause them in as2 but only from the swf they were actually in.

This is my code (this all works) I just can't figure out code to add that will pause everything when the menu pops up ...box is what I named an empty box on stagetop_btn is the button that launches the menu

var myLoader:Loader = new Loader();
var myURL:URLRequest = new URLRequest("NewHarbison2.swf");
myLoader.load(myURL);

[code]....

View 13 Replies

IDE :: Image Galleries - Pausing Sound From External SWF

Apr 18, 2010

I am making a set of image galleries which will have looping background music. What are your opinions about the recommended method to bring music in? I am happy with the attachSound and loadSound methods, but wondered whether attaching a soundtrack.swf using loadMovieNum would be better. If so, I only know how to stop and start the music, not pause it and restart where it left off, which is important if I add a narration. Sound Objects seem more versatile because they let you use "position/1000", but from what I have found on the forums I have searched through, I may have to load the swf into a Movieclip or perhaps use _level somewhow?

Here is the code, which works well, but does not "pause" the music, it just stops and starts at the beginning. Code is in the root timeline of my soundControls_mc (play/pause button).
[Flash 8 - AS2]
loadMovieNum("includes/number10.swf", 100);
soundOn = true;
this.onRelease = function() {
if (soundOn == true) {
unloadMovieNum(100);
[Code] .....

View 2 Replies

ActionScript 3.0 :: SoundManager - Pausing Sound By Referencing Code In Separate File?

May 22, 2009

I wanted to have this Zombie Penguin enemy use a walk sound (it would be odd if he moved and was silent) but because it is initializing the whole world, simply coding the sound into his animation state won't work because it will play the sound for every existing Zombie Penguin in the world, not just the one on the screen.

Now I've tried to get around this problem by using a SoundManager class [URL] to load and play/pause the sound when necessary. I've got this working by placing a movieclip above the world and hittesting everything and when it finds a Zombie Penguin activates the SFX. If it finds the enemy and you leave the room or kill the enemy (basically any way it is removed from the screen) it will pause the sound (not stop) and then unpause if you go back/find another instance of that enemy.

The problem is, though, that if I STUN the enemy (not kill it) it plays it's dizzy animation (which consists of hit sitting down with stars spinning around it's head) the walking SFX continues to play as the enemy is still on the screen.Now in the Zombie Penguins .as file it has a boolean that for being stunned or not (bStunned), and a function (public function getZPStun():Boolean -- returns bStunned). this bStunned boolean is set to a default of false.I figure that I just have to reference that somewhere in the following code, but I'm not sure where. The Zombie Penguin's .as is ZPEnemy, so I'm calling it like so:

ZPEnemy.getInstance().getZPStun()

I've tried calling it as part of an if statement a in a number of placesin hopes that calling it will relate the current state of the bStunned boolean, but I can't seem to get it to work.

Code:

var bNotPenguin = true;
for(var i = 0; i<this.numChildren; i++) //** Sound Manager Coding (May 15)
{

[code]....

View 4 Replies

ActionScript 3.0 :: Remove / Unload External Swf File(s) From The Main Flash File And Load A New Swf File And Garbage Collection From Memory?

Sep 12, 2009

I can't seem to remove / unload the external swf files e.g when the carousel.swf (portfolio) is displayed and I press the about button the about content is overlapping the carousel (portfolio) . How can I remove / unload an external swf file from the main flash file and load a new swf file, while at the same time removing garbage collection from memory?

View 15 Replies

ActionScript 2.0 :: Replace Text Loaded From An External File With Text From Another External File?

Nov 9, 2005

How can I replace text loaded from an external file with text from another external file? Using setInterval and calling the .load from a function or something? In the example below I'm calling an external text file, could this also work with an .xml file with cycling through the children?

[Code]...

View 2 Replies

ActionScript 3.0 :: External Interface Call Doesn't Work With Function That Is On External JS File

Apr 17, 2012

I am using in AS3 "External Interface ". When I call the JS function that is on the same page as swf everything works fine.

I added a link in the html page to an external JS file, when I move the JS function to the external JS file the website crushes.

I would prefer to have all my JS functions on an external file so I can use them in the future in other project and it also makes it easier for me to update the site.

how to call a JS function that is on an external file from AS3?

View 6 Replies

ActionScript 2.0 :: External Text Files Wont Load Into External Swf File?

May 28, 2007

Structure: There is 1 main file that loads external SWF files depending on what is clicked on.One of the external SWF files loads its text from external text files. This works fine when viewing the SWF applet on its own. But when viewing as a whole site, the text doesnt appear. Very annoying.I made that particular SWF on my mums computer running Flash MX 2004The flash file itself uses the Scrollbar component from MX.Could someone tell me why the text doesnt load in this scenario? It runs fine on its own, just not as an external SWF.

View 4 Replies

ActionScript 3.0 :: Link To External PDF In External As File?

Oct 20, 2009

I've re done a couple of pages on my website and as a result of the new design have had to change some of the coding from being on the timeline to being in an external as document linked to my fla. This is significant only because I can link to external pdf.zips no problem on the timeline but I can't seem to translate the code to the external file. Can anyone out there help me out with this (hopefully) simply problem?I'm playing with different variations of this below but I'm constantly getting the 1180: Call to a possibly undefined method navigateToURL.

function onEnglishClick(event:MouseEvent):void {
var request:URLRequest = new URLRequest("http://www.bigredcreativeconcepts.com/UB_Flyer_English.pdf.zip");

[code].....

View 1 Replies

ActionScript 2.0 :: Load Images & Test From External File " Text File?

Jul 27, 2011

i have banner with 5 images fad in fade out effecti need to load images & test from external file " text file or xml file " with keeping fade effects on imagesall ways i know can't keep fading effect on images so

View 4 Replies

ActionScript 2.0 :: Pass URL String From External File To AS Variable (dynamic File Names)

Nov 17, 2004

I have a movie player that works fine when i hard-code the url value in the video function, but when i try to pass that url/file path from an external file, the video doesn't load. I suspect that there is something i'm doing wrong with the quotes. What am i doing wrong?

[Code]...

View 5 Replies

Media Server :: Advantage Of Writing A SSAS File Over An External AS3 File?

Jul 23, 2011

I do understand the differance between ssas and as3. Not all, but all most everything I see written in SSAS can be writen into a external AS3 file. This leads me to quite a few questions I'm hoping you kind people can shed some light on for me.
 
1)  What is the advantage of writing a SSAS file over an external AS3 file?
 
2) Can I write an .asc file in AS3 or do I have to use AS1? Please understand I'm using tuts from fmsguru.com and the books "Learning Flash Media Server" (pdf) and "Programming Flash Communication Server". I'm not a javascript programmer so nothing I do in AS1 seems to make any sence while everything I do in AS3 does. It may not seem like it to you people that are programmers, but to those of us that aren't, AS1 and AS3 are miles apart.
 
3) kind of off topic, but a security question. I'm not a "hacker" and don't like the jerks that are. My question is on external AS / SSAS files and swf files. When my fla is compiled into a swf does my external AS files remain external? I assume they do, but then what is the threat of the swf being decompiled? In most projects I would do I could care less if somebody had access to my fla as long as they don't have my actionscript files.
 
I don't know. Maybe on questions one and two I'm getting confused becasue I'm using out dated material. Again I assume that even though fms was built off of the javascript engine it should be able to read and execute my AS3 file. Other wise what was the point of the evolution of actionscript into a fully functional programming language?

View 1 Replies

ActionScript 2.0 :: Flash File Reading An External Text File For The Content?

May 16, 2005

I turn to you for help, dear sweet Kirupa Forumites. First, let me explain the problem: I have a flash file reading an external text file for the content. Everything works perfectly for nearly everyone - you click a menu button, and the content text comes up fine. However, a couple of people have found that the text shows up as "undefined". I have checked the player versions of the people where it doesn't work, and it is the same as for those where it does work, so that ain't the problem.

I don't understand why it works perfectly for nearly everyone, but a small number of people have this "undefined" text problem. It seems to be a problem with loading the external text file, but I don't know why. I have a main flash movie, and load the text in the first frame, using the following:

var my_content = new LoadVars();
my_content.load("content.txt");
my_content.onLoad = function(success){
if (success){

[Code]...

I then have a couple of dynamic text boxes in the main movie - one called ErrorText (for displaying an error message to the user) and one called ContentText (for displaying the content). I use an external menu swf which jumps to a specific frame in the main movie, depending on which button is clicked. Actionscript on the main movie frame for the first button does the following, with the other frames similarly configured:

ContentText.htmlText = my_content.content1;
stop();

My external text file is properly configured (content1=blah blah&content2=other blah blah) etc.

Does anyone have any advice on how I can solve this particular weird problem??

View 3 Replies

ActionScript 1/2 :: Load An External .swf File Into A Precise Location On The Stage Of Existing Flash File

Nov 20, 2009

All I'm trying to do is load an external .swf file into a precise location on the stage of my existing Flash file. I've spent an hour and a half on this site search and found nothing. What do I add to my loadMovie command to place the file at specific x,y coordinates?

View 3 Replies

ActionScript 3.0 :: Load The External Swf File And Unload The Parent Swf File?

Aug 17, 2011

i have a question. let say i have file1.swf , file2.swf, and file3.swf, how can i link this 3 files together,let say suppose file1.swf is the main content file, but as i load file2.swf, i want the file1.swf get replaced by file2.swf. How could i unload file1.swf at that time, so that my file2.swf will become the main content file?and again, when my current position at file2.swf, and i want it get replaced by file3.swf by clink on a button. so that the i can unload the file2.swf and let the file3.swf become the main content file.

View 13 Replies

ActionScript 2.0 :: Including External Swf File With Preloader In Main Swf File

Apr 21, 2008

I'm creating a flash 3d website for a company. The idea is that there is one overall swf file - this holds the navigation and design. Once the user clicks on a button, it goes to frame 10, I have included the following script to load a swf file

loadMovie("deepbartesting.swf", maincontent);
this.onEnterFrame=function(){
if(movieClipName._currentframe==5){

[Code]....

the preloader works, but instead of going to frame 2 of that swf file, it goes to frame 2 of the overall swf that holds the navigation. Does anyone know how to get around this so that it goes to frame 2 in the same swf file as the preloader?

View 1 Replies

ActionScript 3.0 :: Switch Actions Panel To Being In A File Which Would Be External To The FLA File

Oct 5, 2009

I have a bunch of code inside my actions panel but I want to switch it to being in an AS file which would be external to the FLA file. I am looking for a tutorial or data on this. What terms do I search under?

View 6 Replies

ActionScript 3.0 :: Playing Flv File And After That Load External Swf File

Apr 7, 2009

i have a button that when it is pressed plays and loads an external flv file. this part works fine but directly after the flv video is finnished i want to load in an swf file. does some one have an idea how to do this? first show flv and then load swf?
this is the code as it looks now..

[Code]...

View 16 Replies

ActionScript 1/2 :: Importing A SWF Within Flash File From An External File

Nov 16, 2009

basically i imported a SWF within my flash file from an external file and only the randomize button works on the file none of the rest from the imported flash can anyone let me know why, if you need me to let me know and i will upload files

View 1 Replies

Actionscript 1.0 :: Load External Swf File To Parent Swf File?

Mar 27, 2011

i'm building a website using flash. i have a external swf file that i want to import into my website. i thought this would be an easy task but for some reason when i load the movie, it flickers. my website (parent swf) was build using 1.0. The external form swf was build using 3.0. My approach:

1.create an empty movie clip called mcForm

2.go to the mc clip page i want to pull the external movie into

3. within my actions layer, I call the following function loadMovie("main.swf", mcForm);

If i write:

LoadMovieNum("main.swf",0);

then the my main.swf opens correctly but closes the parent swf file. I wan the main.swf file to be embeded within the parent file.

View 1 Replies

ActionScript 3.0 :: Detect End Of External File (swf) From Main File

Mar 11, 2010

I have a video in .flv format that I have converted into .swf. And this .swf file, I have added it in into my main flash file by using Loader. And now, I want to detect when this video will finish playing so that I can go to the next frame which is not looping the video again and again.

View 3 Replies

Scene Pausing On Last Frame?

May 13, 2009

I have created a simple interactive tutorial with buttons that open specific scenes (sections) in the tutorial using gotoAndPlay().  These scenes are initially "duplicates" of each other, except for some of the objects in the scene.  Everything was doing ok but when I reached my 12th scene, things became messed up.  Initially, when I added this last scene (say, SCENE2, with the same contents as the one copied from SCENE1) and published it, the SWF was behaving correctly.  But when I just extended the timeframe to accomodate a longer audio, this scene keeps on pausing on the last frame for some reason.  I'm assuming that if there are no animations and just audio playing, it would still not pause.  I copied another scene, say SCENE3, also from SCENE1, that would play after SCENE 2.  When I click on the button to play SCENE3, it just goes to the last frame of SCENE2 and does not play, eventhough the script for that button is just gotoAndPlay("SCENE3",1).

View 1 Replies

ActionScript 1/2 :: Pausing A Linked .flv?

Sep 11, 2007

I have an external .flv and I simply need to be able to pause it with a frame action and start it back up with another frame action.I found some references to "flvStream.play" through google but I haven't been able to properly implement it.

View 3 Replies

Automatic Pausing And Resuming?

Aug 10, 2009

I've been making a short movie. It contains some tweens (both shape and motion). I want the movie to automaticly pause at a specific moment (which bisects multiple tweens) and for a button to appear to contine the movie

View 5 Replies

ActionScript 2.0 :: Pausing A Function?

Sep 4, 2010

I am having a problem restarting a function I have stopped using delete this.onEnterFrame a panel scrolls on the x based on mouse position. here is the code

panel.onRollOver = panelOver;
function panelOver() {
this.onEnterFrame = scrollPanel;[code]....

then on a button click I want the scrolling to stop and be able to be restarted on click from within a child movieclip.

View 1 Replies

ActionScript 2.0 :: Pausing A Mc Timeline?

Oct 27, 2003

Is there a way of pausing a mc timeline? so when u return its at the same stage where it was paused it ?

View 1 Replies

ActionScript 2.0 :: Pausing An Animation?

Sep 15, 2004

how to get an animation to pause at a desired frame after a click rather than just stopping it at that exact frame or putting a stop action at the desired frame. My goal is to have a movie sequence play continuesly and when a user so desires he/she can click and stop the movie, but rather than stop it while it is in transition at that exact frame, the movie should continue to a point where it is logical for the movie to stop.(example: the movie is at frame 2 when the user clicks, but instead of stopping at frame 2 it continues to frame 10, and then stops) Then on another click the movie will continue through it's sequence as it was before. I would like to use a MC, onClipEvent to handle the script in Flash MX.

View 4 Replies

ActionScript 2.0 :: Pausing The XML Slideshow?

Feb 22, 2007

i have a modified xml slideshow i previously tried to clear the intervals to pause the show to no avail.

Code:
var id, current;
var k = 0, p = 0;
var slide = 1;

[code]....

View 2 Replies

IDE :: Pausing A Webcam Stream?

Apr 18, 2009

ok so I have the webcam in my flash movie,so you see your cam in the frame..but i was wondering if there was a code to pause the stream so you can a 'snapshot' without having to save anywhere or anything too complicated.. just literally pausing then un-pausing

View 3 Replies







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