I have an .swf file which loads several external MP3s, I want to make a preloader with an animated progress bar to ensure all of the Mp3s are loaded before the user can interact with the timeline. I have seen some people embed the MP3s in the flash file and then preload that .swf into another loader .swf.
I dont want to embed the MP3s, but would consider using a lader movie to load the main movie, will this method still work with external mp3s?
I have used AS3
A loaded SWF will maintain it's AS3 code no matter if it's from the document class, on timeline or both.
If you have a Main SWF that loads an External SWF and External SWF is loading an MP3 file there is no problem with it what so ever.
Be careful with the loading security standards and the External SWFs loading sequence. Since it's a loaded SWF it will not have access to stage instantly (even in document class), in stead it will get it after it is added to stage (use ADDED_TO_STAGE event listener). It shouldn't be a problem if you're frame-scripting.
You might want to make a method in the External SWF that starts loading the MP3.
Related
I am unable to get embedded video working in the HTML wrapper, whereas it works fine in the SWF file itself. The video plays instantly when opening the SWF, but when I open the HTML only the video player skin shows and no actual video, almost as if it can't find the video file.
Here is the exact process I went through to get to this point:
Starting from a blank ActionScript 3 document, I import a video and select the "Load external video with playback component" option. The video file is in the same directory as the project file, and the video file is referred to in FLVPlayback source as 'movie.flv'. From here I publish the project to SWF and also with a HTML wrapper. Upon opening the .SWF the video plays, however when I open the .HTML no video plays, although the video player skin shows up.
I have tried several different methods of getting this video to work, I have tried embedding the video solely with ActionScript, but the results are the same.
Is it possible to have the video load both in the .SWF and in the .HTML? The .SWF itself loads, but the video embedded in the .SWF does not. I have also tried using .mp4 files but have the same results. This is for a school project, so I am limited to using ActionScript, and the final project must be published to HTML/SWF/EXE.
I made a flash game that embed in web page, and the game normally increasing memory when playing it. that's no problem.
now I need to remove this game from web page, by now I just know remove the html node that contain swf :
$("flash_container").html("");
or
swfobject.removeSWF("flash_game_Id");
yes, after above operation, the flash game disappeared. But the big problem is that the memory that flash game used still there. Why it would not decrease.
actually, I would embed more swf in the web page, and that would eat up large memory even I remove swf frome the web page.
does anybody know how to decreas memory when remove swf frome web page?
now I created a loader.swf special for loading main game swf, and embed to html. when need to remove the game from html, first of all, telling main game swf do clean work, then let loader.swf to unload the main game swf, finally, remove the swf container div from html. it works fine.
I'm creating a flash game that includes two characters. One that is dynamically loaded from a url and the other that's already present on stage. Both characters load up just fine when testing within flash professional but when testing on a browser or opening the swf file itself, neither character loads.
I've already set my playback security settings to "network access only" as suggested in this question: Flash not working in browser but works fine on computer and it still isn't working.
Both images are strips that show the complete character's animation in one picture itself and through the use of masks and code, I'm able to depict each frame of animation.
Here's the file itself if you need to check it out for yourself.
swf file here
I am new in Flex and I face some difficulties..
I have a swf gallery that load external swf files when you click differnet button..
I have load this swf inside Flex but when I click the buttons it doesn't load the external files..
I use this
<mx:SWFLoader source="#Embed(source='test2.swf')"
I assume that maybe there are some security issues in flex where you can't loda external swf??
You are mixing dynamic swf loading with embedding assets.
The syntax #Embed is used for embedded assets that are included in the application binary, during compilation.
You should write:
<mx:SWFLoader source="test2.swf"
to dynamically load a swf file from the same web server than your app.
I have flash actionscript 3 project that on the second frame (after the welcome screen) loads external flv into FLVPlayback component or external mp3 for player.
I'm trying to find code for preloader to the entire project - that will show before the first screen and will preload also the external files so when the user moving to the frame with the player the flv/mp3 will be shown immediately.
is it possible to load the flv into some object and then assign it to FLVPlayBack component as source?
Any help will be much appreciated!
Thanks.
You can do this by checking getBytesLoaded against getBytesTotal and creating your own loading bar, but I'd recommend using Greensocks LoaderMax library.
http://www.greensock.com/loadermax/
Lots of info and examples for you to get started.