ActionScript 2.0 :: How To Stop An External Loading

Jun 19, 2009

- I need to call loadSound() multiple times, to load different mp3s time to time, all of them in streaming. But as I call it more the once on the same instance the old mp3s keeps anyway loading.. how do I stop that?

In AS3 would be a simple .close(); ... but I can't really figure out how to do that in AS2.

Here some sample code:

// Works and Plays
_global.global_music = new Sound(this);
_global.global_music.loadSound('music/song1.mp3', true);

[Code].....

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Stop .mp3 And .flv In External Swfs When Loading A New External Swf?

Apr 10, 2009

Specifically, I am building a flash page that loads external swf files and inside some of the external swf  files, I would like to add audio and flash video (flv) streaming from the Flaash Media Server. In some of the external swf files, (using a FLVPlayback component) when you press a button on the main timeline to unload the current playing swf the audio/video continues to play after loading the new external swf file.So I believe that my approach is all wrong and I should be working to dynamically load the .mp3 and.flvs in the external swf ... my questiion is how to unload those assets when loading the new external swf

View 1 Replies

ActionScript 3.0 :: Stop External SWF From Loading?

Nov 2, 2010

I have a parent swf (parent.swf) which contains a loader (galleryLDR). The parent.swf has 2 buttons (button1 and button2) which will each load a separate swf (gallery1.swf or gallery2.swf) into the galleryLDR depending on which button you select.

If begin to load gallery1.swf, then decide to load gallery2.swf instead while gallery1.swf is still loading, the loading of gallery1.swf does not immediately terminate. Instead, gallery1.swf finishes loading, then the loader removes gallery1.swf and starts loading gallery2.swf. The code below is what I am using to attempt to cause the galleryLDR to immediately stop loading the any swf, then immediately load gallery2.swf.

how to immediately stop a loader from loading an external swf and the dynamic loading of images within the external swf? Below is what I've tried, but it doesn't work.

ActionScript Code:
if (galleryLDR != null){
galleryLDR.unloadAndStop();
}

[Code].....

View 0 Replies

IDE :: Stop External FLV From Loading On Exit Frame?

Sep 14, 2004

I am using the video component player and it is working fine using this code:

Code:
video.setMedia("elements/flv/episode_1.flv", "FLV");

The problem is, if someone is playing the video and goes to another part of the flash movie, the video keeps playing or loading in the background. The video image doesn't show, but i can hear the audio or see in the browser that it is still loading.

How can i kill the video from loading once the playhead moves from the frame that the video player is on (it is sitting on a single frame)?

View 7 Replies

ActionScript 2.0 :: Stop Loading The Previous Xml When Start Loading Another Xml?

Dec 7, 2009

I have two xmls, xml1 and xml2. Both have same structure, only data are different. Button 1 loads xml1 and button2 loads xml2. Both calls same function to load XML. First i press button1, so xml1 starts loading, but if before xml1 is completely loaded, i press button2, xml2 also starts loading. If for some reason the xml2 loads first i get data from xml2. But when i look at the bandwidth profiler in flash , xml1 is still loading. When xml1 is loaded it will replace data from xml2. SInce i pressed button2 last, i would want data from xml2. So is it possible to stop loading the previous xml when i start loading another xml?

View 1 Replies

ActionScript 3.0 :: Stop External Sound In External SWF

Jul 19, 2010

I am working on controls for an external swf. The external swf loads an external sound file. The structure at the moment is extswf.swf contains mcSound which loads soundfile.mp3. extswf.swf automatically starts playing when invoked. movieController contains the icons for the play/pause buttons. This is assigned CntlClass. CntlClass loads extswf.swf and controls the play and pause buttons.

So far, the play and pause buttons stop and start and stop the movie but not the sound. I know I need to access the sound channel from the external swf and use the sound transform to change the volume. How to access that channel is unknown. The examples I find have imbedded sound files. Also, the examples seem to use the main class for the external swf. My external swf doesn't have a class file, so I have no idea what the main class would be.

View 5 Replies

ActionScript 3.0 :: Loading External Assets - Screen Stops Until The Loading Is Finished?

Oct 11, 2009

I have a movieclip clip that plays when the movie starts, the movieclip is a visual assets that show's that the application is loading some information but it's not showing any loading progress, just playing while the assets are loaded.I created a for loop that will load the assets using a simple loader, and then when the object is loaded the application push the object to an array.Problem is that when the loading starts all the animation that i have on screen stops until the loading is finished.The whole point is that the animation will play while it's loading.

View 10 Replies

Flash :: Loading / Unloading External SWF Using Buttons From Loaded External Files

Feb 23, 2011

I spent almost a week trying to figure out how to unload a currently loaded swf using its button and loading a new swf... I have three files, a main.fla, file1.fla and file2.fla. In my main.fla, I have a code which loads the other two files. If i will click the "unload" button in the file1.swf, I would like the main.fla to unload the file1.swf and load the other file, file2.swf. Here is the code to load the file1.swf:

[Code]....

View 1 Replies

ActionScript 2.0 :: Loading External XML On An External Server Into Flash Movie When It Is Uploaded

Jun 4, 2004

[FMX] I am having trouble loading an XML file on an external server into my flash movie when it is uploaded. The data loads in fine when the flash file is on my local computer with the xml file on a server. As soon as the flash file is uploaded the XML data will not load in.

View 2 Replies

ActionScript 3.0 :: Loading In And External Swf And Unloading It From A MC Button Inside The External Swf?

Nov 2, 2010

I used to do this fine with AS2 and now i'm struggling to get it to work in AS3.my code is as follows:

PW1.addEventListener( MouseEvent.CLICK,loader1 );
//==================== PS function =============================================
var ldr:Loader = new Loader();

[code].....

View 3 Replies

ActionScript 3.0 :: Loading External SWFs From Another External Swf Into The Main SWF Container?

May 4, 2011

I have created a main "site.swf" file that loads a "default.swf" file into a container after a preloader. On this default.swf file I have buttons that needs to load new external SWF files in its place in the container. All of the external SWFs contain buttons and navigations that will also call up other external SWFs into this container. So, I would like to know how to program each button (some are movieclips as buttons) to unload itself and load the respective SWF into the container (eg. AboutUsButton to call up aboutus.swf into the container). I do not have a main navigation on the site.swf file bacause the navigation changes on each SWF that needs to be loaded into the container.

View 2 Replies

ActionScript 3.0 :: Loading External Pngs And External Text With Html?

Jul 19, 2009

I want to load external png's through this code:

(for this code, check the mcBandPreloader in de .fla file)

Code:
var imageLoader:Loader;
var RespJpeg:String = "images/arch1Proj.jpg"
function loadImage(url:String):void {

[Code]....

Here the problem is that I can't type html in my external txt file. (I did checked the html button in Dynamic Text Properties. What am I doing wrong here?

.fla can be downloaded at [URL]

View 2 Replies

ActionScript 2.0 :: Loading A External Swf Into A Movie - Its Loading Only A Part Of It?

Mar 16, 2004

I'm loading a external swf into a movie everything is fine with that. The only problem is that its loading only a part of it. Does anybody know why? Also, this swf is a mp3 player with streaming. The streaming part works but the playback doesn't.If i start only the mp3 player by itself it's working.here is the fla for the player

View 3 Replies

ActionScript 2.0 :: External Swf Loading Into Target Movieclip Loading

Apr 20, 2005

I'm trying to load a SWF movie into a target movieclip called blankmc. The SWF movie is loaded from an absolute URL (eg. [URL]/img/20042005113934movie3.swf ) My Loading Progress code fails to detect the SWF file size. However the same code works perfectly for a JPG! Essentially the .getBytesLoaded() and .getBytesTotal fail to work. Why is this and how can I get it to work for loading SWFs?

[CODE]...

View 3 Replies

ActionScript 3.0 :: Loading External Swf Which Attached With Its Own External Class?

Jun 27, 2009

Lets say I have Main.swf and sub.swf, and I wanna load sub when I press a button from Main, but sub.swf has its own external class file attached, so here is the problem, when I load sub using loader class and I would get this message from the output panel:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at subScript()

seems loader class can not access sub.swf's external class when sub is being loaded.

View 1 Replies

ActionScript 3.0 :: Loading External Swf That Loads Other External Files?

Apr 24, 2010

Lets say I have subgallery.swf file that loads jpeg images. And I have gallery.swf file that loads subgallery.swf.The jpeg images and both swf files are in the same folder.When I test gallery.swf it loads subgallery.swf but subgallery.swf doesn't load images. When testing subgallery.swf alone, it loads jpeg files.Is there any limitation or setting preventing external swfs loading other content?

View 2 Replies

ActionScript 2.0 :: Loading An External .swf Inside An External .swf?

May 24, 2005

I created a site using Kirupa's external .swf loading tutorial. Now in one of my externally loaded .swf's, I am loading another external .swf. I've gotten this to work fine, but the second external .swf (loaded into the first) contains buttons that will swap this second external .swf with another external .swf. I can't seem to get the AS references to the variables set up correctly in order to swap the swf's. The initial .swf loads fine, but the button control gets complicated inside it. It sounds rather confusing, so I've included a link to the .fla's and .swf's below.

[URL]

The file structure:

-band.swf load's profiles_main.swf

-The buttons in profiles_main.swf are trying to load chris.swf (swapping it entirely with profiles_main.swf)

View 3 Replies

IDE :: Loading External Swf That Loads Other External Files?

Apr 24, 2010

I have subgallery.swf file that loads jpeg images. And I have gallery.swf file that loads subgallery.swf.The jpeg images and both swf files are in the same folder.When I test gallery.swf it loads subgallery.swf but subgallery.swf doesn't load images. When testing subgallery.swf alone, it loads jpeg files.Is there any security limitation or setting preventing external swfs loading other content?

View 3 Replies

ActionScript 2.0 :: MCs Won't Stop Loading

Apr 24, 2007

Ok, this may be a little challenging for me to explain. In my portfolio section, I have a few links under an empty movie clip. These links are client names. When clicked, they are supposed to load an external swf into the empty movie clip. The problem is that if I click on one, then rapidly change my mind and click on another, the originally clicked external swf never stops loading and then my links stop responding.

View 3 Replies

Stop External SWF From Playing?

Jun 8, 2009

Ive got a project with a fairly complex arrangement of menus and a narrated tutorial of sorts that is large (in terms of Mb) compared to the menus themselves. Since the tutorial is likely to be played only once, if at all, I don't want to load the asset unless needed. To do this I'm using the following code to load an external swf (the tutorial) and attach it to an mc container (mc_launch). A loader bar will be added later but for now it works, except: if the user navigates away from the tutorial (jumps to another frame in the menu timeline) the audio of the child attached to the mc_launch continues to play even though the instance of the mc_launch is no longer on stage. Shouldn't all the child objects of the container go away once the instance of the container is gone? If not, do I specifically have to execute a mc_launch.removeChild(loader) before navigating away from the instance of mc_launch?[code]...

View 5 Replies

ActionScript 3.0 :: Cannot Stop An External MC

Sep 24, 2010

I have a swf, it has code to load an external .swf, it works. As long as I load external .swf files, which are simple and have no AS3 in them, I can immediately stop them from a function upon event INIT.

The .swf's that I want to load, and immediately stop, have complex AS3 in them. They have stream synced audio. They work perfectly fine on their own, but I cannot control them with a simple stop() to the MC container which holds it, yes, even though the container is casted as a MC.[code]...

View 6 Replies

ActionScript 2.0 :: Stop Loading A File?

Apr 9, 2010

I can't seem to find a solution for this in AS2.

loader.close(); doesn't seem to work.

View 1 Replies

ActionScript 3.0 :: Stop A Loader From Loading?

Aug 12, 2009

I am creating an image gallery where the user can select from several thumbnail images. Once selected, the thumbnails will enlarge and load the full sized image. My problem is that while the user is waiting for the full sized image to load, he may decide to close that image and view another image. I am trying to find a way to stop a loader from loading. Here is the code I have used. My problem is that even though the user has clicked on the unloadBtn, the  loader continues to load the file. Is there a way to disable that?[code]...

View 3 Replies

ActionScript 3.0 :: Stop Frame On Loading?

Mar 10, 2010

I have a scene set up where a button randomly goes to 1 of 4 frames and executes some code

here is the code:

Code:

m1.addEventListener(Event.ENTER_FRAME,animate);
function animate(evt:Event):void
{
evt.target.x += 10;

[Code]....

I need a way that will stop this from executing until a key or the mouse it pressed. I tried just a simple stop();, but this didn't work

View 2 Replies

ActionScript 3.0 :: How To Stop External SWF From Playing

May 25, 2010

I am having a problem stopping external swf from playing. I am currently using FlashCS4 and publishing to Flash Player 10. I would really like to use the code
"loader.unloadAndStop();"
to stop the swf. I tried using it but I keep getting the following error:
1061: Call to a possibly undefined method unloadAndstop through a reference with static type flash.display:Loader.loader.unloadAndstop();

I read somewhere that since the swf files were published in Captivate (also using Flash player 10) I have to load the swf into a flash movieclip first then try the loader.unloadAndStop code.
fscommand("allowscale","false");
fscommand("showmenu","false");
//import flash.display.MovieClip;
var Xpos:Number = 220;var Ypos:Number = 105;
[Code] .....

View 7 Replies

ActionScript 3.0 :: Stop Sound In An External Swf?

Feb 1, 2009

I'm using external swf in a project, and I got one swf with startup audio play, I can't stop the sound to play when I load another swf via this code :

Code:
clearButtons();
TweenLite.to(m.target, 0.5, {tint:0xcc0000});
m.target.mouseEnabled = false;

[Code]....

View 4 Replies

ActionScript 3.0 :: Stop External Video?

Jul 27, 2009

I'm having a major problem stopping video that is played in an external SWF. I've added the external SWF file via the addChild method. However, when I remove it the video's audio keeps playing. The only other solution if I can't figure it out is rebuilding the site in AS2... needless to say I really really want to try and avoid that

View 3 Replies

ActionScript 2.0 :: F8 Hide Or Stop Loading Progress Bar?

Nov 26, 2007

I have a situation where I'm using the FLVPlayback component and it starts off blank, meaning that it shows the video player skin but doesn't load a movie until prompted to do so. However, the progress bar in the skin is acting as if a movie is being loaded. I'd like to make it invisible or stop it until I need it, but I can't seem to target it. I've tried the following with no success.[code]

View 1 Replies

ActionScript 3.0 :: Stop Track Before Loading - Getting Error?

Aug 24, 2010

I keep getting this error:
TypeError: Error #1009: Cannot access a property or method of a null object reference at
at turntable_XMLlist_fla::MainTimeline/stopSong()
at turntable_XMLlist_fla::MainTimeline/pressHandler()
I keep getting this error. Is this because I stop a track (trk.stop()) before I load it?

Code:
import flash.media.Sound;
import flash.media.SoundChannel;
import flash.events.Event;
import flash.net.URLRequest;
var my_songs:XMLList;
//var my_total:Number;
[Code] .....

View 3 Replies

Make Audio To Stop Playing Soon After Loading?

Feb 25, 2010

I am new to Flash action script and i have problem with action script code. Even though i comment the mvMyVid.play(); still the audio plays for fraction of second and stops.[code]...

View 1 Replies







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