ActionScript 3.0 :: Load And Play Different External MP3

May 11, 2010

I wanted to have a sound playing (loaded external mp3) and then have various buttons on the screen that load an alternate song in its place. 
 
This is what I'm trying to do:
 
var myMusic:Sound = new Sound();var reqMyMusic:URLRequest = new URLRequest("mySong.mp3");myMusic.load(reqMyMusic);myMusic.play();
music1_btn.addEventListener(MouseEvent.CLICK, music1);

[Code]....

View 3 Replies


Similar Posts:


As3 :: Load External Swf Into And Play Pause Forward?

Dec 19, 2011

I am trying to control movie clip to anther swf file but its not working how to do .

View 1 Replies

ActionScript 3 :: Load / Play And Mute External SWF

Aug 16, 2010

I have a file to which I do not have the source - a flash header with an obnoxious sound intro and I need to mute all sounds. Without the source I am limited as to what I can do. I have some as3 code that I am using to try and load the swf into and mute(building in FlashDevelop). Here is the code in question:

package {
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.events.Event;
import flash.media.SoundTransform;
[Code] .....

This code above still plays the audio and the original swf is not being displayed. So, my questions are:
How would I mute the external audio?
How would I display the external swf just as it does when viewing it directly?

View 1 Replies

ActionScript 2.0 :: Load External Swf And Go Play At Frame 2?

Oct 25, 2011

i would like to load the "1.swf" to the "hub.swf"(ROOT MOVIE) and have it gotoAndPlay(2) using AS2.he thing is I can't put the gotoAndPlay(2) on the first frame of 1.swf.

hub.swf >>
_root.btn1.onRelease = function() {
loadMovieNum("1.swf",0);

[code]......

View 1 Replies

ActionScript 2.0 :: Flashcs3 AS2 External Swf Will Load But Won't Play

Dec 17, 2008

I am totally new to actionscript.I found a slideshow which uses an xml file to load jpgs. (albumV2.swf)The xml contains jpgs, and captions.When I publish it on its own...works fine.Now I'm trying to place albumV2.swf inside a deeply nested mc.I'm using a button to navigate to the target movieclip (holder_mc) which I want to contain the external swf.[code]when I test The albumV2.swf loads, I can see the background for the photos. But it won't play.There are thumbnails in the swf that don't show, but there's also a timer and counter in the swf that do show.All the photos are called from the xml doc, but I can't see them. However, I CAN see the first caption that's in the xml.doc. and only the first caption.I wondered if the code in the original slideshowFLA uses some hierarchy that I'm screwing up, but shouldn't the xml be fine once it's found?

View 1 Replies

ActionScript 3.0 :: Control The External SWF To Play It's Outro And Then Load The Next SWF?

Sep 20, 2009

It's all about loading and unloading external swf's.My code is working perfectly though I just have some questions about load and unload issues.

------------------------------------------------------------

I have three buttons on the stage and it should load its external SWF

homeButton_btn - home.swf
page1Button_btn - page1.swf
page2Button_btn - page2.swf

Each of the button should load it's external SWF's intro when click.My problem is that I don't know how to command the button to play the swf's outro and then load the next swf everytime I click a button. Example: When I click homeButton_btn, the external swf should load "home.swf" and then if I am going to click page1Button_btn, the outro of "home.swf' should play and then once it reaches the end of it's timeline, it should load "page1.swf". Same goes with page2Button_btn, whatever swf that is on the stage should play it's outro first and then load "page2.swf"

My questions are: 1. How can I control the external SWF to play it's outro and then load the next SWF.

2. What code should I put at the end of the external SWF's timeline.

3. Where do you think I should put the preloader? Is it better to put it at the external swf timeline? or on my main swf timeline?

4. Does load and unload of external swf also work with movieclips? Like for example I will not use a external swfs, instead I will use movieclips to load and unload its content.My Actionscript 3.0 code

var pageContainer:Loader;
pageContainer = new Loader();
var nextMov:String;[code].........

View 1 Replies

ActionScript 3.0 :: Sequentially Load/play External Swf Files?

Jul 1, 2009

I have a series of 5 external movie clips that i want to load as fallows:

Load Clip1.swf
Play Clip1.swf
While Clip1.swf is Playing
Load Clip2.swf

[code]....

View 0 Replies

ActionScript 2.0 :: Load External File Then Play Movie?

Dec 17, 2009

Is it possible for a movie to stop until an external file has fully loaded at which point the main movie will then play?

View 1 Replies

ActionScript 3.0 :: Load And Play External Swf After Going To Frame Label?

Feb 8, 2011

I have a button on the main timeline. When clicking it, I would like to move the main timeline to a frame label called "history" and load and play a movie clip called "slideshow1".

I have the "gotoAndPlay" code working properly but can't seem to get the external swf "slideshow1" to load and play.[code]...

View 1 Replies

ActionScript 2.0 :: Load External Swf And Goto And Play Certain Frame?

Jun 24, 2005

im trying to do is load an external swf file into a "base" file but play a certain frame number or label in the external file.I have a file called base.swf file which is level0In base.swf i have nothing but 1 frame with the following AS code:loadMovie("top.swf", 2);This works fine and loads and plays top.swf, but how can i load top.swf and play a certain frame label or number as soon as its loaded. Ive tried the following which does work but i hope it kinda explains what i want to do.

loadMovieNum("top.swf", 2);
tellTarget (_level2) {
gotoAndPlay("MyFrameLabel");

[code].....

View 10 Replies

ActionScript 3.0 :: Load & Play External Flvs Continuously?

May 4, 2009

code that will load and play a folder of flv's continuously?I have a folder of short clips i converted to flv. When one clip finishes, i want the next clip to play and to endlessly loop through the flvs, never stopping. If there's a way to include a transition, that'd be cool too, but not important. I've got the first clip loading, but can't get the next to play.

Code:
var video:Video = new Video();
addChild(video);

[code].....

View 1 Replies

ActionScript 2.0 :: Button To Play Animation Then Load External SWF File

Sep 20, 2005

What I need is an AS code for a button which first play an animation ( a motion tween) and then load an external swf file.

View 2 Replies

ActionScript 2.0 :: Load 3 External Swf Files Into One Place And Make It Play?

Apr 2, 2009

How to write a simple script to load 3 external swf into one place and make it play one by one continuously?

View 6 Replies

ActionScript 3.0 :: Play External Preloader Before It's Load Original Movie Index.swf?

Sep 21, 2010

I like to play external preloader before it's load original movie index.swf.But I have a problem on resizing index movie.

Here is preload AS3 code:

package
{
import flash.display.*
import flash.display.MovieClip;

[code]....

View 1 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 :: Load A Local External SWF, The Application Load-unload Infinitely?

May 6, 2011

I have a Flex application that just load an external SWF, but the application load and unload infinitely my swf.

[Code]...

View 2 Replies

ActionScript 2.0 :: Trigger External Swf To Load Into Main Swf From Button In Another External Swf?

Apr 22, 2007

I am trying to get a nav button in one movie (main_nav.swf) to target a my main movie (index.swf) and load a sub nav movie (metals_subnav_infinite.swf) into it. The sub nav movie will do a similar task - loading a portfolio swf into main movie (index.swf). Here is the file breakdown of my working files:index.swf - main final movie which loads "main_nav_infinite3.swf" on startmain_nav_infinite3.swf - loads main nav "main_nav.swf" and scrolls it infinitely (infinite menu)main_nav.swf - main nav with buttons that trigger sub nav "metals_subnav_infinite.swf" to load into index.swfmetals_subnav_infinite.swf - loads sub nav "metals_subnav.swf" and scrolls it infinitelymetals_subnav.swf - sub nav with buttons that trigger "folio.swf" (have not created this file yet!) to load into "index.swf"The script I was focusing on is in main_nav.fla and it is:

metals_mc_bn.onRelease = function() {
reActivateMenu();
this.gotoAndStop(3);

[code].....

View 2 Replies

ActionScript 2.0 :: CS3 : Load External Library Objects From An External Swf?

Jan 19, 2009

How do you load external library objects from an external swf? I want to have an external swf that only contains library objects that are exported for Actionscript, and load these from the master .swf file dynamically during the master swf execution. (I may have multiple external swf resource files)I want to be able to load the external swf, and then access it's library objects via actionscript in my main swf file.

View 6 Replies

ActionScript 3.0 :: Using Loader To Load An External Swf And Control The External Swf?

Nov 17, 2010

as3 is new for me, but i would like to write a script using loader to load an external swf, and control the external swf. But I find I can't control the swf, because there are no fixed instance name. here is my script.

[Code]...

View 3 Replies

Actionscript 3 :: Load An External Swf File Using Loader.Load?

Sep 19, 2011

When i try to load an external swf file using Loader.Load(); The swf starts playing even before the init event is fired. Is there any way to stop the swf from playing atleast until the init event or complete event is fired?

View 1 Replies

ActionScript 3.0 :: External Swfs Load In Different Places On 2nd Load

Oct 19, 2009

I'm loading (and unloading) external swfs into a holder in my main document. However, they seem to load perfectly the first time, but after that, they load at a different x and y. I've seen this happen before in someone else's file, but I'm not sure what the solution is.

This is the bare bones of it:

Code:

sceneHolder.x=0;
sceneHolder.y=0;
addChild(sceneHolder);

[Code].....

View 1 Replies

ActionScript 3.0 :: Load External Swfs Which Load Videos

Apr 11, 2009

Okay so I am trying to load external swfs which load videos dynamically.

I can load the swfs into the parent fla fine (if I remove all the code and just place a circle or something on the stage of the swf), and the swfs are also loading their respective videos correctly. But when I try to load the external swfs, if they contain any casting related code in them, I'm getting an error

[AS]TypeError: Error #1009: Cannot access a property or method of a null object reference.
at swf1_fla::MainTimeline/frame1()[/AS]

Is there some specific method to casting within external swfs?

My code for loading the videos is this:

[AS]var vc:NetConnection = new NetConnection();
vc.connect(null);
var vs:NetStream = new NetStream(vc);

[Code].....

View 1 Replies

IDE :: Load Mp3 From External Xml File And Make To Load Random?

Dec 24, 2009

How I can make this script lo load mp3 files via an external xml file like music.xml and if is possible to load random

Code:
music = new Sound();
music.onSoundComplete = function() {

[code]....

View 1 Replies

ActionScript 1/2 :: Load An External Xml In An External Loaded .swf

Jul 24, 2009

I've got a small (more than 100 hours of thinkwork up till now!) problem I can't seem to solve:

I want to populate an external loaded swf with an dynamicly loaded xml fil (loaded from my config.xml).

[Code].....

how do I get the external xml into the external swf as a variable for the actionscript in the external loaded swf (So I just want to put the path in the script in my external swf...).

View 5 Replies

Actionscript 3 :: Using Events In An External Swf To Load A New External Swf

Mar 31, 2010

I'm trying to get an external swf to load when the flv content of another external swf finishes playing.

I've only been using actiosncript 3 for about a week and I've got to this point from tutorials, so my knowledge is limited.

This is what I've got so far:

Code for External swf (with flv content):
import fl.video.FLVPlayback;
import fl.video.VideoEvent;
motionClip.playPauseButton = player;

[Code].....

I'm starting to get an understanding of how all of this works, but it's all to new to me at the moment, so I'm sure I've approached it from the wrong angle.

View 1 Replies

Actionscript 3.0 :: External Menu Load External Swf

Aug 2, 2009

i have a main.swf and i load menu.swf into main

[Code]...

this works right on its own but when using addchild in main.swf the menu loads the button events work, even click but it will not load the associated file. If i place the menu code in the main.swf it loads all required files. QUESTION How do reference menu.swf when loaded as an external swf?

View 2 Replies

ActionScript 2.0 :: External .swf - Unable To Load CSS With External .swf's?

Dec 24, 2006

I have a "about.swf" file that loads a CSS file and formats some dynamic HTML text. On its own, it works fine...but when it gets loaded into my "Main.swf", it doesn't work. What am I doing wrong? Is there a bug that doesn't let you load CSS with external .swf's?My style sheet and index file holding the "Main.swf" are all on the root level of my site. The "Main.swf" has a "holder_mc" clip that I load the "about.swf" into which has the CSS formatting. When loaded into "Main.swf", it doesn't work.

View 9 Replies

ActionScript 3.0 :: Load External SWF And Unload External SWF

Jun 13, 2010

I'm sure this question has been answered but I have been looking everywhere and all I can find is how to load an external SWF but not how to unload it. I come from a basic knowledge of AS2 and it was easy for me to load using levels but I have run into a wall. I have a main swf and to keep the initial filesize small I would like to split some image intensive sections out and load them when needed.

View 6 Replies

Professional :: Projector Load Several SWF And Each Of Them Load Different External MP3?

Nov 8, 2010

I have problems in running a projector under win 7. My projector load several SWF and each of them load different external MP3 that plays during the show.Under Win 7 sometimes the sound (Mp3) stops.

View 5 Replies

ActionScript 2.0 :: Load= True - Load An External .swf?

Aug 30, 2004

i have a scen named preload, and i want it to load an external .swf, but once it's done doing so to move on to frame two so far i have

[Code]...

and this doesn't work, i think my problem is the "if(this.getBytesLoaded()" but i am not sure how to identify if the movie is loaded, maybe with true and false? but i am not sure how i would do that,

View 11 Replies







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