How To Stop LoadingMovie From Loading Again When It Is Already Loaded
I know I have created this before (just don't remember how I did it). So if someone can help it would be appreciated.
Much of the content on my website is via loadMovie (.swf) to a createEmptyMovieClip (in my main movie). I know how to do that.
What I would like is that once the loadMovie has taken place if the user happens to re-click the same button (while the loadMovie is still loaded) that it does not reload again.
Just to make sure that I am being clear here: In other words, the loaded movie has not been unloaded. It is still there, loaded up on my main movie. The way it is right now if the user happens to re-click on the same button that loaded the movie it will unload and reload again. I am (pretty) sure that there is a way to keep that from happening. I just don't recall how.
Thanks.
KirupaForum > Flash > Flash 8 (and earlier)
Posted on: 04-11-2007, 02:20 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Loadmovie Wont Stop Loadingmovie
hey there, im sure its simple but im not thinking straight
onClipEvent (enterFrame) {
loadMovie("rotatingbanner.swf", _root.bannerads_mc);
trace("i win");
}
im trying to get a rotating banner full of buttons to load into the blank movieclip named bannerads_mc. the "i win" traces repetitively so im assuming that the movie keeps loading over and over again in the same spot. is there a simple way to stop it from loading the movie more than once? i did a search but i couldnt make sense of any of them. the banner should start to play at frame 50 of the root movie. thanks for any help in advance.
Slimey
Stop Re-loading An Already Loaded Movie
Is there a script that can cancel out re-loading a loaded .swf? i have 4 buttons which load 4 different .swfs, so when you click on button one, movie one loads, but if the user clicks on button one again the movie re-loads again...
how can i stop this so that it recognizes that that movie is already open?
thanks,
jondj24
About LoadingMovie In A Third Level MC
Hi guys, I need an hint if you please...
I'm making a Flash website, the main swf has got an animation in the timeline, pressing the bottons in the pubblished file you activate this animation that leads to single frames where I've dragged a MC instance called Loading, witch I've used to load at a precise position of the stage an external swf. At the same point in the timeline but another layer I've assigned the AS
loadMovie("
Loadingmovie: Keeping Framerate
I want to use loadMovieNum to load different movies, running at different fps. The movies loads at _level1. Is there a way to to set the framerate?
HELP LoadingMovie Onto Level, Doesn't Work Online
Readers:
Little problem. I'm working on a website using loadMovie. I have one main movie which calls all sub-movies and loads them not into clips, but rather onto levels.
This works perfectly, until I test the movie online. Then it never works. But, if I load the movies into clips, then it works fine both on and offline.
Has anyone experienced problems regarding loadMovie when working with levels? Is there a Flash 5 glitch that I should know about?
Thanks for the help in advance.
-oni
Loaded Swf Wont Stop After It Is Loaded.
Hello Everyone.
I have a movieclip(slides) that I am loading external swf files into. I have a stop button that loads a swf file and then it trys to stop the movie that I have just loaded. For some reason it ignores that stop command. How can I keep the movie from playing after it is loaded besides placing a Stop action in the first frame of the external swf file itself.
on (release) {
loadMovie ("slide1.swf", "slides");
slides.Stop();
}
Thank you all in advance.
Getting Loaded Movies To Stop When Loaded
I'm going nuts trying to figure this out!!
I'm obviously a newbie, and I haven't got a clue how to get these things to work. I have a very simple blank movie, which I'm using as an Intranet banner, and I have 2 very simple movies loading into it. I want the movie to stop once the second movie is loaded. I'm sure this is very simple, but I can't figure it out!
Can anyone help me please?
Thanks,
allison
Trying To Stop() Loaded Swf
I am loading an external swf that is just an animation. When I open a section in my app, I want that swf to stop playing. I cant manage to figure out how to stop it. Here is my function to load the swf
PHP Code:
var target:String = "data/clouds.swf";
var req:URLRequest = new URLRequest(target);
var ldr:Loader = new Loader();
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, cloudsHandler);
ldr.load(req);
cloudHolder.addChild(ldr);
//then trying to stop it
function buildVideo():void
{
var c = cloudHolder.getChildAt(0);
c.content.stop(); //this does not work
}
any idea?
How Do I Stop A Loaded Movie
Thanks for checking in.
I've built a few small .swf movies, and now I've decided to load them at different times into an encompassing .swf movie.
The thing is, I want to be able to have a stop button in the main movie that will freeze the currently playing small .swf movie.
Can anyone jot down the action script for my stop button to be able to do this.
My main movie and the stop and start button are on layer 0, and my loadable .swfs are on layer 1.
Thanks a bunch, I've been cursing for hours now - instant karma is coming your way
DB
Stop Already Loaded Sounds?
Hi there, I have a tricky question in regard to using the sound object for loading mp3's dynamically. What I have is a movie which uses lots of different mp3's. The mp3's are loaded via mouse events in runtime using loadSound(). I have read that mp3's are cached when there loaded, so I dont want flash to keep reloading the sounds if they have been already loaded previously from an earlier mouse event. Have I lost you yet?
Anyway I was thinking that I could create a sound object for the first the time a particular sound is loaded and store that sound object in an array for later use, ie when that sound needs to be used again call that object.
Does that sound right? Does anyone have any examples or better ways of doing this....anything appreciated
How Do I Stop A Loaded Movie?
I have loaded my movie onto the main timeline and now want it to remain stopped until I make it visible later in the timeline, can someone please explain (like I'm a five year old!) how I would do this....
Loadmovie Not Loaded When I Stop()
hi,
i got 2 frames movie.
frame 1 loads a .jpg from .txt file (loads it fine).
and frame 2 loads the jpg into an MC.
the problem is that its not loading...
i tried to do a new movie, with just one frame and the loadMovie() command and it worked fine.
but with my 2 frames movie it's not working... what im doing wrong?
Avi.
(i added the movie for u to look)
How Can I Stop An Image Being Loaded?
(I'm posting this message again... something weird happedn to the last post and no message was stored in the post.)
I've got a movie with several images.
I want to have a version without the images.
All my images are stored within my Flash file in movies.
I want to have a version where the images don't get compiled (and therefore making my resultant SWF file smaller).
Is there anyway I can do this in Actionscript?
The only other way is to manualy delete the images before compiling?
Any help would be appreciated.
Thanks.
OM
Stop External Loaded Swf
Hi
Im trying to load many swfs in one swf.
With Cursor Left Right you can jump to the next swf or go one back.
I also want that if i press Space the movie should stop.
But it seems that nothing works
Even if I make a second layer in the clip where the clip is loaded and say stop, Flash seems to ignore it.
Anyone can help?
Stop() Not Working In Loaded SWF
In a SWF file I have an empty MC which I load external SWFs. When one external SWF reaches the end, there is code on last frame telling next SWF to load. This is all working fine.
Problem is the stop() frame actions in the loaded SWFs is not working. I made simple test files and stop code works fine.
I tried putting this._parent.stop(); but this didn't work either.
Any ideas?
thanks
Dennis
Stop A Loaded SWF From Looping
i have a SWF file that i am loading into a MC in another Flash file. Is there a way to get that SWF to not loop? i do not have access to the source of the SWF so i cannot go into that and set up anything in there.
thanks in advance!
ggogis
Stop & Play A MC You Have Loaded Into Another MC
When my flash mc starts it loads an mc into an emty mc I named...
ie
loadMovie("nameofmcbeingloaded.swf", "mcbeingloadedinto");
that works fine, it loads the external mc into my flash mc. what I am trying to do is contol that mc that i have now loaded into another mc. I want to stop the loaded mc right away, and then when I click a button have it play... Here's what I was thinking with no luck;
_root.nameofmcbeingloaded.stop();
or
mcbeingloadedinto.stop();
or
_root.mcbeingloadedinto.stop();
I really have no clue how to control my loaded mc, I haven't created any variables or anything, iv'e litterally only loaded the clip just like i showed, and it works, but it plays and I cant stop or play it like I want to
thnx for your help....
How To Stop Flv Playback Before It Was Loaded?
I am working on a site that has a lot of video content. The problem I m facing is as follows:
When a video is requested to play and before the video can load or start to stream or play, the user changes the section, after a little gap, the video that was requested starts to play!
I m using flv.playing property to check it. If it s true, then i stop the flv playback component. The component is inside a movieclip that is animated. On unload section, the movie clip plays to its end where there is no flv playback component. Yet the flv starts to play coz it was not loaded nor playing, hence not stopped.
Is there some way i can stop all video content from playing like there was a way to stop all sounds in the previous versions of actionscript?
Please note: When i stop the video from playing regardless of it being loaded, then it throws an error!
Many thanks in advance.
Can't Stop Music In Loaded Swf
I have used Loader to load an swf which has looping music.
When I call unload - the music keeps playing.
Could someone please help me?
Code below:
Attach Code
var musicHolder:Loader = new Loader();
var requestMusic1:URLRequest = new URLRequest("music.swf");
musicHolder.load(requestMusic1);
// LATER ON
musicHolder.unload();
// music continues to play
Can't Stop Loaded Movie
This is a preloader problem. There's an external SWF, ext.swf, that has a LOT of symbols exported to the first frame. For this reason, a preloader built into external.swf won't show up until all those symbols are loaded. So I decided to make a separate preloader SWF that loads ext.swf.
My problem is that I can't reliably stop the movie once it's loaded. My preloader has a 'fade out' that gets run over by the external movie.
So here's what I've done:
// Frame 1
loadMovieNum("ext.swf",1);
_level1.stop(); // INEFFECTIVE; movie doesn't stop
// Frame 2
_level1.stop(); // INEFFECTIVE
// Frame 3
_level1.stop(); // WORKS EVERY TIME!
WHY is this happening? There's no ActionScript in ext.swf that would be causing it to play. I have no idea whether I can rely on Flash's ability to stop the movie if it isn't finished loading yet.
I've also tried the following for frame 1. Again, the movie won't stop unless the stop() command is issued on frame 3.
// Frame 1
this.createEmptyMovieClip("external");
this.external.loadMovie("ext.swf");
this.external.stop(); // INEFFECTIVE
Now, if that problem gets solved, the next one is how do I get Flash to simulate the long download caused by ext.swf? The "streaming" debug doesn't seem to apply to movies loaded with loadMovie. It's always instantaneous; always completely loaded, so there's no way I can find to test my preloader.
--
Jeff S.
AS3 - Having Problems Getting Loaded Swf To Stop
Hello my first post here hopefully someone can help me figure out why my code don't work. I have loaded in a swf file and in my actionscript I want to have actionscript tell that loaded swf not to play so i can add some buttons and what not to let the user choose to play it or not after it loads up. Here is my code Im working with and Something to note is I created the mainArea object outside this code.
Code:
var main_area:MovieClip = new MovieClip();
addChild(main_area);
# var mainLoader:Loader = new Loader();
# var mainRequest:URLRequest = new URLRequest("swf/"+ swf_file[0]);
# mainLoader.load(mainRequest);
# mainLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,mainLoad);
#
# function mainLoad(event:Event):void{
# // place postion on stage
# main_area.x = mainPlacementX;
# main_area.y = mainPlacementY;
# //add first file to stage
# main_area.addChild(mainLoader);
#
# main_area.gotoAndStop(1);
#
# // Resize
# main_area.width = main_area.width / 2;
# main_area.height = main_area.height / 2;
# }// End mainLoad function
Everything works fine except the main_area.gotoAndStop(1); doesnt seem to work cause after its loaded in plays when what im trying to is stop the swf from playing.
Anyone have a good solution/explination?
How Can I Stop An Image Being Loaded?
I've got a movie with several images.
I want to have a version without the images.
All my images are stored within my Flash file in movies.
I want to have a version where the images don't get compiled (and therefore making my resultant SWF file smaller).
Is there anyway I can do this in Actionscript?
The only other way is to manualy delete the images before compiling?
Any help would be appreciated.
Thanks.
OM
(stop / Play) Loaded Movie
Hi.
I load an external movie by using:
loadMovie ("movie1.swf", "_root.movieHolder");
where 'movieHolder' is an instance created to specify the location for the movies to be loaded... and it works fine.
Now, when I try to use some buttons from the initial movie to stop or play the movie loaded using this:
on (release) {
tellTarget ("_level1") {
stop ();
}
}
it doesn't work....x-(
Can someone tell me what the problem is?
Stop Looping A Loaded Movie
Hi again
I made a basic movie with baloons. One of the balloons is a button(first.swf); on mouseevent I load a movie on the same level, so first.swf disappears.
When clicking on this second.swf a third.swf is opening instead of the second.swf. This third.swf is supposed to stop at the end and showing a logo, but it starts and starts again with the second.swf.
I tried to put a stop in the second.swf....but then it stops at the end and this is not the meaning if somebody does not click to start the third.swf.
Can anybody help?
Thanks a lot!
START/STOP TIMELINE OF LOADED .SWF
hi all...
im having a hard time figuring out why this isnt working.
i have a button in my main movie on level0 that i want to control a loaded movie using loadMovieNum() on level5.
i simply want to use a start and stop command using the following:
on (release) {
_level5.start
}
or
on (release) {
_level5.stop
}
the loaded .swf on level5 is an .swf music file, created with swiffpeg. there are no stops at the start or end of the .swf.
any help?
thanks
eric
How To Stop Till Data Is Loaded?
Hi,
I have a movie that accesses ASp pages twice, once for loading teh data in azmovieclip at start ofmovie and another to update database with movie input text at end of movie. it works only at a very low frame rate also sometimes it doesnt work unless i publish movie and then view it in html. If i increase my frame rate to default 12 fps, it doesnt work, probably teh time of access to ASP is not small enuf to fot in higher frame rate.
the second time i do a loadvars.sendandload to update the database... how do i stop teh movie if data hasnt been loaded... when i increase the framerate...
Thnaks,
shilps
Making A Loaded Movie Stop
Ok guys I was wondering if you could help me out on stopping a loaded .swf file through the loadmovie comand. The problem is just that I loads perfectly but when I try to set a stop comman on the .swf file bein loaded it stops if I play that individual file but when I try to play the movie into witch I want to load it, the .swf file keeps on looping and I dont want it to do that. Also have tried previews fram on the .swf file bein loaded but that doest work either.
Thanks
How To Stop An Externally Loaded Swf Clip?
Basically what I am doing is employing a reusable preloader. You have a screen, several buttons on it, you click a button and a swf clip is externally loaded onto the screen. The problem is the clip is looped and once loaded doesn't stop, unless you load another movie. So I have writen some script to prevent that and show the clip only once. I have underlined that part of the script. However, for some reason inclusion of this part of the script prevent a swf clip to get loaded in the first place... Any ideas? If you need any other info please tell me. Thanks!!!!!!!!
The Script
MovieClip.prototype.fadeIn = function() {
this.onEnterFrame = function() {
if (this._alpha<100) {
this._alpha += 10;
} else {
delete this.onEnterFrame;
}
};
};
clip_preloader._visible = false;
loading_text02._visible = false;
var empty = this.createEmptyMovieClip("container", "100");
empty._x = 240;
empty._y = 263;
my_mc = new MovieClipLoader();
preload = new Object();
my_mc.addListener(preload);
preload.onLoadStart = function(targetMC) {
trace("started loading "+targetMC);
container._alpha = 0;
clip_preloader._visible = true;
loading_text02._visible = true;
};
preload.onLoadProgress = function(targetMC, lBytes, tBytes) {
clip_preloader._width = (lBytes/tBytes)*100;
};
preload.onLoadComplete = function(targetMC) {
container.fadeIn();
loading_text02._visible = false;
clip_preloader._visible = false;
trace(targetMC+" finished");
};
preload.onLoadInit = function(targetMC) {
targetMC.onEnterFrame = function() {
if (this._currentframe == this._totalframes) {
this.stop();
delete this.onEnterFrame;
}
};
};
//default image
my_mc.loadClip("default.jpg", "container");
//buttons
slot01.onPress = function() {
my_mc.loadClip("clip01.swf", "container");
};
slot02.onPress = function() {
my_mc.loadClip("clip02.swf", "container");
};
slot03.onPress = function() {
my_mc.loadClip("clip03.swf", "container");
};
[F8] Stop & Start For Run-time Loaded Swf
How do we set up a stop and start for a run-time loaded SWF. The simple stop and start buttons we put into the loaded file don't work. Is there a way to target the loaded SWF? Any other way?
Thanks!
Stop External Loaded Swf From Playing
ok.. i have a button, when clicked,, it loads an external swf... when i click another button, another swf should play.. and it does.. till here.. its all good... problem is.. when i open the external swf.. and i click a button that has no external swf to be loaded in.. the swf doesnt go... it stays on top of the next frames...
so... i wanna know how to make the external swf stop when i click anywhere else!
thanks
Natalie
Help How To Stop Looping Loaded Swf File
Hi I’ve looked everywhere for a solution but I simply can't figure it out. Please help if you can, I'm new to flash and I’m coming up to a deadline where I’m am no where near finished thanks!
I'm making a character select menu and have buttons which load an external animated swf which shows a character profile within an empty movieclip.
I've placed the following code on the button
on (press) {
loadMovie("WB1.swf", "container");
Thing is the animation swf "WB1" loops, I've placed stop(); code at the end of the swf animation and even tried mc_WB1.stop(); as well as trying out placing the code in the character menu but no luck.
Any ideas or different approaches.
Thanks
Cs3 Help How To Stop Looping Loaded Swf File
Hi I’ve looked everywhere for a solution but I simply can't figure it out. Please help if you can, I'm new to flash and I’m coming up to a deadline where I’m am no where near finished thanks!
I'm making a character select menu and have buttons which load an external animated swf which shows a character profile within an empty movieclip.
I've placed the following code on the button
on (press) {
loadMovie("WB1.swf", "container");
Thing is the animation swf "WB1" loops, I've placed stop(); code at the end of the swf animation and even tried mc_WB1.stop(); as well as trying out placing the code in the character menu but no luck.
Any ideas or different approaches.
Thanks
Stop Loaded SWF From Resizing To Fit Container
I am really new to this, having recently decided to take up ActionScript 3.0 after years of Visual C++... I am having major troubles, the most recent being that I can't get a dynamically loaded swf to be the size that I want. Get this... The swf is x by y. I know the dimensions. I am not trying to make it scale to other dimensions. I am trying to KEEP it from scaling automatically. My app is dimensions w by h, and I load a swf of known dimensions x by y. For some reason, the result is a loaded swf that scales yet keeps it's aspect ratio: in this case, it scales until it fills up the y, leaving whiteness on both sides (x). Ok, I am using a Loader. I set width and height properties, and the swf doesn't load at all. I stuff it (the loader) into a sprite or movieclip and set the width and height; no swf. It only shows up on the screen if I let it do what it wants, which is to take over the whole app client area. HOW do I force it to stay the size that it is supposed to be? Better yet, can anyone tell me what good having a width and height property is if you can't set them without breaking your application? How does one create a container of a given width and height. Everytime I try to do it, the result is that the container doesn't exist.
Oh yeah, I forgot to mention - I am doing this in straight ActionScript 3.0 - no Flash IDE. I use FlashDevelop.
Play/stop Dynamically Loaded Swf
I had this same question a couple weeks ago with an AS2 carousel, I have since changed it to AS3 and solved many of my problems, but I'm still having this one last problem before this will be complete. I need the swf that is loaded from the xml to play only once it has reached the front position. if it's not in the front position I need it to be stopped. Right now I have it playing on click, but I need it to just play when it gets to it's position.
Right now I have a function called checkFront that on complete of the rotation needs to check which movie clip is in the front and if its the swf, then play, but I don't know what names/variables to use. I'm having a lot of syntax issues, and I'm not exactly an actionscript guru, but I'm attempting to llearn! Any help would be awesome!
My Document class:
Code:
package {
import caurina.transitions.Tweener;
import com.becca.Carousel;
import com.becca.CarouselItem;
import flash.display.Bitmap;
import flash.display.Loader;
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.IOErrorEvent;
import flash.events.MouseEvent;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.text.TextField;
import flash.events.KeyboardEvent;
public class CarouselDoc extends MovieClip {
// on stage of .fla
public var rightAd:MovieClip;
public var leftAd:MovieClip;
//public var right_mc:MovieClip;
//public var left_mc:MovieClip;
public var holder_mc:MovieClip;
public var loading_txt:TextField;
public static const XML_URL:String = "images.xml";
private var carousel:Carousel;
private var imageList:XMLList;
private var numImages:int;
private var currentImage:int = 0;
public function CarouselDoc():void {
carousel = new Carousel(500, 250, 220);
carousel.useBlur = false;
holder_mc.addChild(carousel);
stage.addEventListener(KeyboardEvent.KEY_UP, keyHandler);
rightAd.addEventListener(MouseEvent.CLICK, leftClickHandler);
leftAd.addEventListener(MouseEvent.CLICK, rightClickHandler);
//right_mc.addEventListener(MouseEvent.CLICK, rightClickHandler);
//left_mc.addEventListener(MouseEvent.CLICK, leftClickHandler);
var uloader:URLLoader = new URLLoader();
uloader.addEventListener(Event.COMPLETE, xmlHandler);
uloader.addEventListener(IOErrorEvent.IO_ERROR, xmlHandler);
uloader.load(new URLRequest(XML_URL));
}
private function xmlHandler(event:*):void {
event.currentTarget.removeEventListener(Event.COMPLETE, xmlHandler);
event.currentTarget.removeEventListener(IOErrorEvent.IO_ERROR, xmlHandler);
if (event is IOErrorEvent) {
loading_txt.text = "could not load xml file";
} else {
var xml:XML = new XML(event.currentTarget.data);
imageList = xml..image;
numImages = imageList.length();
loadImage();
}
}
private function loadImage():void {
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, imageHandler);
loader.load(new URLRequest(imageList[currentImage].toString()));
}
private function imageHandler(event:*):void {
event.currentTarget.removeEventListener(Event.COMPLETE, imageHandler);
event.currentTarget.removeEventListener(IOErrorEvent.IO_ERROR, imageHandler);
if (event is IOErrorEvent) {
loading_txt.text = "could not load image" + currentImage;
} else {
var image:Loader = event.currentTarget.loader;
carousel.addItem(image);
}
if (++currentImage < numImages){
loadImage();
} else {
loading_txt.text = "";
}
}
private function rightClickHandler(event:MouseEvent):void {
carousel.targetRotation += 360 / carousel.numItems;
Tweener.addTween(carousel, { zRotation:carousel.targetRotation, time:1, transition:"easeInCubic", onComplete:checkFront } );
}
private function leftClickHandler(event:MouseEvent):void {
carousel.targetRotation -= 360 / carousel.numItems;
Tweener.addTween(carousel, { zRotation:carousel.targetRotation, time:1, transition:"easeInCubic",onComplete:checkFront } );
}
private function keyHandler(event:KeyboardEvent):void {
if(event.keyCode==37){
carousel.targetRotation -= 360 / carousel.numItems;
Tweener.addTween(carousel, { zRotation:carousel.targetRotation, time:1, transition:"easeInCubic",onComplete:checkFront } );
} else if (event.keyCode==39){
carousel.targetRotation += 360 / carousel.numItems;
Tweener.addTween(carousel, { zRotation:carousel.targetRotation, time:1, transition:"easeInCubic",onComplete:checkFront } );
}
}
private function checkFront(event:*) {
}
}
}
My XML:
Code:
<menuItems>
<item>
<image>pics/VS Home Page Animation.swf</image>
<link>http://www.ema-eda.com/training/seminars.aspx</link>
</item>
<item>
<image>pics/CadenceWebinar.jpg</image>
<link>http://www.cadence.com/cadence/events/Pages/allegro_webinar_series.aspx?CMP=cbnr20081006</link>
</item>
<item>
<image>pics/Class.jpg</image>
<link>http://www.ema-eda.com/training/orcadtraining.aspx</link>
</item>
</menuItems>
How To Stop A Timer In An Externally Loaded Swf?
Hi,
I have a project in which the main swf loads another into it. The swf that gets loaded has an xml driven slideshow that runs on a timer. To view what the timer was doing in the output I traced the name of each photo as the timer fired. When I unload the swf I've noticed that though it appears to be gone from the stage the timer continues to fire and the images are listed in the output. I know that I can stop a timer by using
ActionScript Code:
photoTimer.stop();
but I can't figure out how to stop the timer in an externally loaded swf. I'm using this code to remove the swf
ActionScript Code:
this.mc_content_box.mc_placeholder.removeChild(contentLoader);
I'm worried that the timer may be loading the photos in the background somehow and increasing the workload. Any suggestions would be greatly appreciated.
Thank you.
Play Once And Stop Loaded Movie
I am loading into a container MC multiple .swf's (QT videos compressed to SWF with Sorenson). I am able to the loadmovie and control its playback. However the SWF once "played" will loop until I press a "stop" button.
How can I get it to play once and stop.
I have looked all over and can't find a workable solution.
Thank you in advance for your patience and help.
Scott:
PAUSE Dynamically Loaded Mp3 (not Stop)
Hi all, I did a search and looked at tons of threads including Voetsjoba mp3 player.
This is way more complicated than what i need / want. i already have an mp3 player I've built that uses dynamic text (song title and track info) and variables to load an mp3 dynamically through .php & FlashVars. I only need 1 mp3 playing at one time and so this method works great for me. This way I can update it without going into Flash at all (but XML is overkill so no need for that either).
Thing is, I would like to have a play and stop button that actually stops and starts the track where it last was stopped / paused, rather than resuming from the beginning.
I also have built in a volume slider.
Here is the Actionscript I've been using:
ON VOLUME SLIDER MC [mySlider]:
ActionScript Code:
onClipEvent (load) { mySound = new Sound(); mySound.loadSound(mp3Title,true);}onClipEvent (enterFrame) { mySound.setVolume(_root.volume);}
ON PLAY BUTTON:
ActionScript Code:
on (release) { _root.mySlider.mySound.start();}
ON STOP (PAUSE) BUTTON:
ActionScript Code:
on (release) { _root.mySlider.mySound.stop();}
ON DRAGGER INSIDE VOLUME SLIDER MC:
ActionScript Code:
this.ratio = 0;dragger.onPress = function() { this.startDrag(true, 0, 0, line._width, 0); this.onEnterFrame = function() { ratio = Math.round(this._x*100/line._width); _root.volume = ratio; };};dragger.onRelease = dragger.onreleaseOutside=stopDrag;
works ok, but like i said...stop does not "pause" the mp3 but rather stops it irrecoverably.
play starts from the beginning which I would like to avoid.
thanks in advance.
How To Stop An Externally Loaded Swf Clip?
Basically what I am doing is employing a reusable preloader. You have a screen, several buttons on it, you click a button and a swf clip is externally loaded onto the screen. The problem is the clip is looped and once loaded doesn't stop, unless you load another movie. So I have writen some script to prevent that and show the clip only once. I have underlined that part of the script. However, for some reason inclusion of this part of the script prevent a swf clip to get loaded in the first place... Any ideas? If you need any other info please tell me. Thanks!!!!!!!!
The Script
MovieClip.prototype.fadeIn = function() {
this.onEnterFrame = function() {
if (this._alpha<100) {
this._alpha += 10;
} else {
delete this.onEnterFrame;
}
};
};
clip_preloader._visible = false;
loading_text02._visible = false;
var empty = this.createEmptyMovieClip("container", "100");
empty._x = 240;
empty._y = 263;
my_mc = new MovieClipLoader();
preload = new Object();
my_mc.addListener(preload);
preload.onLoadStart = function(targetMC) {
trace("started loading "+targetMC);
container._alpha = 0;
clip_preloader._visible = true;
loading_text02._visible = true;
};
preload.onLoadProgress = function(targetMC, lBytes, tBytes) {
clip_preloader._width = (lBytes/tBytes)*100;
};
preload.onLoadComplete = function(targetMC) {
container.fadeIn();
loading_text02._visible = false;
clip_preloader._visible = false;
trace(targetMC+" finished");
};
preload.onLoadInit = function(targetMC) {
targetMC.onEnterFrame = function() {
if (this._currentframe == this._totalframes) {
this.stop();
delete this.onEnterFrame;
}
};
};
//default image
my_mc.loadClip("default.jpg", "container");
//buttons
slot01.onPress = function() {
my_mc.loadClip("clip01.swf", "container");
};
slot02.onPress = function() {
my_mc.loadClip("clip02.swf", "container");
};
slot03.onPress = function() {
my_mc.loadClip("clip03.swf", "container");
};
Stop Streaming MP3 Loaded Via LoadSound()
Hi everybody, need help.
The case: I have a "some.swf" which must load an external MP3 file passed him through a "some.php?song_id=xxx" file. Everything woks fine. I load that MP3 file via loadSound().
The matter: loading (not playing) of the external MP3 file should stop when "x" seconds of the MP3 file are loaded.
P.S. This is for a dynamic low-bitrate preview of an MP3 file for "x" seconds.
Stop Streaming MP3 Loaded Via LoadSound()
Hi everybody, need help.
The case: I have a "some.swf" which must load an external MP3 file passed him through a "some.php?song_id=xxx" file. Everything woks fine. I load that MP3 file via loadSound().
The matter: loading (not playing) of the external MP3 file should stop when "x" seconds of the MP3 file are loaded.
P.S. This is for a dynamic low-bitrate preview of an MP3 file for "x" seconds.
How To Stop Sound Of Loaded Movie..?
hi
am loading a movie in a main movie
how can i stop the sound of the loaded movie from the main movie.
i cant use attachsound because the sound is not in the main movie...
if you ve an idea please tell me
thanks
*How Do I STOP The Caching Of Loaded Files?
I have a movie that imports external text files into a text box. I was wondering if its possible to disable the caching of the text files that are being loaded.
i have tried useing some html scripts but i have not been able to get any to work properly.
also i have tried this:
myData = new LoadVars();
myData.load("varPage.asp?nocache="+ random(10000));
myData.onLoad = function(){
//do something here
};
but i am unable to get that to work as well.
thanks.
How To Stop An Swf Loaded With LoadClip Method?
Hi,
I decided to take advantage of the loadClip method to load an external swf in a placeholder MC, called "interHolder".
Everything works great except that I can not seem to get the external swf file to stop or go to a specific frame which is crucial for the application I'm building.
I can't figure out what I'm doing wrong. I tried the obvious methods like _root.interHolder.stop and _root.interHolder.gotoAndStop(1) and the not so obvious like StopPlay() etc ....
Below is the code I'm using. Anyone has the same problem? This seems like a major bug to me....
Thanks!! Steven
[AS2]
var my_mcl = new MovieClipLoader();
myListener = new Object();
myListener.onLoadInit = function (target_mc) {
// myMovie.swf loaded - now correct the dimensions
// this works ----------
target_mc._width = 320;
target_mc._height = 240;
target_mc._x = 39;
target_mc._y = 149;
target_mc._visible = true;
// this doesn't!! -------
target_mc.stop();
target_mc.gotoAndStop(1);
}
my_mcl.addListener(myListener);
this.attachMovie("holder","interHolder",100);
interHolder._visible = false;
my_mcl.loadClip("myMovie.swf","_root.interHolder");
[/AS2]
Stop Scaling Of Second Loaded Movie...?
stop scaling of loaded movie
ok here is what i want to do:
1. have parent movie 100% x 100% in browser window
2. load second .SWF on layer 2
3. *NOT* have second.swf scale.. ie. if it is 300 x 300 pixels to stay that size no matter what size the users scales the browser window to?
I found this resource:
http://www.actionscript.org/tutoria...tomatic_Resize/
but it's rather buggy [as javascript talking to flash movies is buggy at best on macs and sucks on 4.0.1 browser types] and dosen't work with some browsers. I have read about another method. "onResize" in Flash MX you can set up Listeners to detect the parent flash movie size. I'm not a "coder" so any help would be appreciated! I'm sure others can benefit from this as I'm not the only one looking for this!! thanx.
Stop Scaling Of Loaded Movie
ok here is what i want to do:
1. have parent movie 100% x 100% in browser window
2. load second .SWF on layer 2
3. *NOT* have second.swf scale.. ie. if it is 300 x 300 pixels to stay that size no matter what size the users scales the browser window to?
I found this resource:
http://www.actionscript.org/tutorial...omatic_Resize/
but it's rather buggy [as javascript talking to flash movies is buggy at best on macs and sucks on 4.0.1 browser types] and dosen't work with some browsers. I have read about another method. "onResize" in Flash MX you can set up Listeners to detect the parent flash movie size. I'm not a "coder" so any help would be appreciated! I'm sure others can benefit from this as I'm not the only one looking for this!! thanx.
Targetting Loaded Swf's With A Stop On Their First Frame While Doing Other Stuff
Dear Flashers,
I am working with a file and am trying to figure this thing out and hope some of you may have some ideas - I'm loading 9-11 separate swf's into a web site - the swf's are being loaded chronologically - the first one loads, the second one doesn't start loading till the first one is done, etc. -
users will know when a section is loaded cause a button will change color indicating that section is loaded. my problem is this:
each section is moving content - like a little mini presentation, and so I need to put a stop on each of the first frames for the 9-11 swf's I'm loading. I am having trouble figuring out how to tell the swf's from inside my movie (using tell target once a button is pushed) - I have been using a button with an MC inside it (for the button to activate the swf using a tell target) and maybe that's where I am going wrong. I'm trying to work it so that when the button is clicked - the timeline will move forward in the timeline and also tell target the swf to go to and play frame 2. - for some reason it's not working.
sorry for the length - any assistance would be greatly appreciated!
thanks,
Donny
|