Preloader for external movie
I have a web site with a main movie that call to an external
movie.
My question is what is the action script to put a pre loader
in the main movie that will show the loading progress of the
external movie.
(now the preloader is in the external movie and its take time
until its showing the preloader and until then the page looks
empty)
Thanks in advance.
Here is a sample I made that uses the progressBar component.
You could use
something similar.
http://www.smithmediafusion.com/blog/?p=31
Dan Mode
*Must Read*
http://www.smithmediafusion.com/blog
*Flash Helps*
http://www.smithmediafusion.com/blog/?cat=11
"mijal2" <[email protected]> wrote in
message
news:e2rfub$bbq$[email protected]..
>I have a web site with a main movie that call to an
external movie.
> My question is what is the action script to put a pre
loader in the main
> movie
> that will show the loading progress of the external
movie.
> (now the preloader is in the external movie and its take
time until its
> showing the preloader and until then the page looks
empty)
>
> Thanks in advance.
>
>
Similar Messages
-
Preloader for External file Template question
I used the CS5 Flash templates>sample files>preloader for external file, to create my preloader.
The problem is that when the preloader is done and my SWF is loaded, my SWF has already started playing.
It is an animation that builds for 200 frames then buttons appear. By the time the SWF appears it has already gotten to the button frame.
Depending on connection speed I have caught the animation building.
Is there some action script I should put in my preloader or the first frame of my SWF to pause play?
Here is the preloader action:
var contentLoader:Loader;
loadContent("stage002.swf");
function loadContent(url:String):void {
contentLoader = new Loader();
contentLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loading);
contentLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, contentLoaded);
contentLoader.load(new URLRequest(url));
function contentLoaded(evt:Event):void {
//Optionally change to a clip holder and set progressbar visibility.
addChild(contentLoader);
function loading(evt:ProgressEvent):void {
var loaded:Number = evt.bytesLoaded / evt.bytesTotal;
setBarProgress(loaded);
function setBarProgress(value:Number) {
progressbar.bar.scaleX = value;
Thanks in advance!put a stop() on the first frame of your external swf in an otherwise empty first frame. when preloading is complete apply a play() to your loader's content cast as a movieclip:
function contentLoaded(evt:Event):void {
//Optionally change to a clip holder and set progressbar visibility.
addChild(contentLoader);
MovieClip(contentLoader.content).play(); -
Flash MX Preloader for external JPGs
Hey all! Any help would be greatly appreciated. In all
honesty, I have searched and studied and worked to get this myself,
which I do alot with code, etc. BUT I am going to admit I'm a "make
it pretty on the outside" kind of guy, and coding makes my eyeballs
fall out and well, honestly, I just don't get it. My brain can not
wrap itself around this. Sigh! So I could use your help a little.
This is what I'm wanting to do. I have a website,
www.luxeillustrato.com, and if you go to the portfolio area, and
click on any of the sections (take fine art for example); it will
showcase my works by loading external jpg files each time you click
the forward arrow button.
You can see I have preloaders on the site, that work fine. My
main page has a movie target with the instance name of photoM. You
click "artist", and it loads a new swf file into the photoM target.
IF you click on "portfolio", "fine art", it loads the fine art swf
file into photoM, using a preloader. THEN, if you click on the
forward arrow button, a new jpg image of my work is loaded into the
fine art movie target with the instance name of just
photo. As you can see, you have to wait until the jpg image
loads (and you start to wonder if it's doing anything.)
The problem is, it is not preloading the external jpgs, it's
just preloading the fine art swf. My preload code is currently:
stop();
onEnterFrame = function () {
totalBytes = _parent.getBytesTotal();
loadedBytes = _parent.getBytesLoaded();
percent = Math.ceil((loadedBytes/totalBytes)*100);
gotoAndStop(percent);
info_txt.text = percent+" %";
if (percent>=100) {
_parent.gotoAndPlay("inter");
I already have the preload animation bar created (as you can
see on the site.) What do I need to do to alter the code above (or
replace it) in order to have the external jpgs be preloaded as
well? For example's sake, let's just say I have four jpgs, titled
"door.jpg", "orange.jpg", "boyfriend.jpg", and "untitled.jpg" (in
case these are needed for the code. They may not be.)
I hope this is easy to understand. If NOT, just tell me. I'll
simplify. And seriously, thanks!put a stop() on the first frame of your external swf in an otherwise empty first frame. when preloading is complete apply a play() to your loader's content cast as a movieclip:
function contentLoaded(evt:Event):void {
//Optionally change to a clip holder and set progressbar visibility.
addChild(contentLoader);
MovieClip(contentLoader.content).play(); -
first try, changed somethings from previous post, tried to
make different changes, instead of using if else tried to set an
onload handler both before and after the loadmovie sentence (not at
the same time of course), copy paste of what goes on each frame
(actionscript 1):
frame 1:
setProperty("", _focusrect, false);
Stage.showMenu = false;
fscommand("showmenu", "false");
fscommand("allowscale", "true");
var mensaje = "0 %";
this.createEmptyMovieClip("pantalla", 0);
pantalla._x = 0;
pantalla._y = 0;
loadMovie("centrino2x.swf", "pantalla");
frame 2
mensaje =
(pantalla.getBytesLoaded()/pantalla.getBytesTotal())*100;
mensaje = Math.round(mensaje)+" %";
play();
frame 3
if (pantalla.getBytesLoaded()==pantalla.getBytesTotal()) {
nextFrame();
} else {
prevFrame();
frame 4:
pantalla.swapDepths(0);
pantalla.play();
stop();
the result: the if else goes right by to next frame, so it
jumps as if the movie was whole loaded, remaining in last frame as
a blank screen till the movie loads. the message appears as 100% in
the half a sec it gets on screen. according to trace, bytes loaded
and bytes total = 0
version 2, i nearly copied it from a tutorial linked from
another post, most of the preloader stuff is nearly exact from the
tutorial, uses movieloader class (actionscript 2)
frame 1:
setProperty("", _focusrect, false);
Stage.showMenu = false;
fscommand("showmenu", "false");
fscommand("allowscale", "true");
var mensaje = "0 %";
this.createEmptyMovieClip("pantalla", 0);
pantalla._x = 0;
pantalla._y = 0;
var cargador:MovieClipLoader = new MovieClipLoader();
var control:Object = new Objetc();
control.onLoadProgress = function(target, loaded, total) {
aviso.text = Math.round((loaded/total)*100)+" %";
control.onLoadInit = function () {
nextFrame();
cargador.addListener(control);
cargador.loadClip("centrino2x.swf", pantalla);
stop();
frame 2:
pantalla.swapDepths(0);
pantalla.play();
stop();
the result: it never changes frame (as if it never finishes
loading), message giving percentage loaded never appears, and
traces on event handlers for listener never come out
i have no idea what %$#"&#" is wrong, i have spend quite
a time on this, which at first seemed like the easiest part, any
pointers?when first executed pantalla.getBytesLoaded is probably 0 as
is pantalla.getBytesTotal() causing your problem.
to remedy, check that pantalla.getBytesLoaded()>0 and that
pantalla.getBytesLoaded()==pantalla.getBytesTotal(). -
Hi all I have a Director projector and when I click various
buttons this opens external files. Sometimes the external files
takes time to load. How can I create a preloader that the user can
view while the particular external file loads. Any help will be
appreciated.Hi,
Here's some info (and script) for loading assets from disk:
http://www.lingoworkshop.com/Articles/Preloading_cast_member.php
Basically, for local files, you cannot determine the progress
through a single large asset. The best you can do is monitor your
progress through a list of assets.
Another example that might be of help:
http://www.lingoworkshop.com/Articles/imageslider/Loading_Local_Images.php
-- Luke -
I need a preloader for my website
Hi Experts.
Can someone point me to good tutorials and/or instruction videos that solve the following problem?
I am building a website that will have many images and several movies created in my CAD software as ".avi" files, then re-saved as Quicktime ".mov" files. The largest movie is 60.8KB. They will be located on more than one page on the site.
Here's a link to the site in progress: http://www.integra-living.com/rht
I need a preloader that runs automatically as my site splash page opens, and loads all that stuff while displaying a progress indicator of some sort.
I also need tips on whether the best strategy is to use CSS, Action Script, or some other coding that will work for most browsers and does not subvert optimization or do other mysterious bad things.
Thanks very much for any help.
Richard TalbottUnless I'm misunderstanding what you're trying to do, you don't need a preloaded for embed movies. The page will load without any delay. It's not until the user chooses to play a movie will it begin downloading / streaming it from the server. Even if the video is a large file, internet users are use to this type of scenario where they choose to play a movie, ala youtube and others, that if their connections are slow there may be delays in video playback. With all that said, I have seen and used page loaders where visitors will be expecting to wait a while for a result to happen, I just don't think this scenario warrants it.
-
Best to load preloader from external file or place it directly into existing movie?
Is it best to load the preloader from external file or place it directly into an already existing movie?
there's no one answer for everyone.
but for an inexperienced coder that's already completed their main project and is adding a preloader as an after-thought, it's usually easiest to create a stand-alone preloader.
and even for experienced coder's, that's usually the easiest way to preceed. -
I have two external hard drives. One is my Time Machine backup drive. The other I use for external storage of files (documents, photos, movies, etc). Can I set Time Machine to backup BOTH my Mac hard drive and my other external hard drive?
Yes you can make multiple backups on one hard drive, for example if you’ve 1TB hard drive installed in your PC and you’ve two Mac Machines with 500GB drive each then you just make two backup images with size of 500GB each.
http://www.halfspot.com/use-your-pc-hard-drive-for-time-machine-backup/ -
Putting a preloader for a loaded .swf in a Movie Clip
I am trying to use a preloader for a larger .swf file that loads inside of a movie clip. I was wondering what code might work and where to put it. (preloader is a .swf). I am using CS4, ActionScript 1.0. Thanks.
it does nothing in that context. so use:
container._x =-258;
container._y =-235;
container.loadMovie("gallery.swf");
this.onEnterFrame=function(){
// if you have a textfield with instance name preloaderTF
preloaderTF.text=Math.round(100*container.getBytesLoaded()/container.getBytesTotal())+"% Loaded";
if(container.getBytesLoaded()>100&&container.getBytesLoaded()>=container.getBytesTotal()){
delete this.onEnterFrame; -
I have moved all of my movies from "Search for - All Movies" folder thinking they were shortcuts to the trash folder by mistake. Is there any way I can restore them to the right place on my system Note most are on an external hard drive.
You can drag them out of the trash folder to wherever you wish. There is no automatic way to restore them.
If you have a recent backup of your computer (at the risk of preaching, everyone should have one), restore them from there.
Barry
P.S. I have no clue what you did or why you have 44,000 on the external drive -
Using external storage for purchased movies
Hello Apple TV users. I was about to pull the trigger and buy Apple TV, but I'm not clear on something.
If I use Apple TV to purchase HD movies from the iTunes Store (I'm guessing they come in at +/-6GB each, is the only storage option for these movies the Apple TV's internal storage? 40GB is nothing. 160GB is not much.
I understand using Apple TV storage as a cache for rentals, but for movies that I buy, I'd like to be able to keep things on a 500GB or 1TB drive (which I already use for iTunes storage anyway.
There's a USB port on the Apple TV, but I read in another post that this is a service port that only Apple can access...
Any guidance much appreciated.Richard Gratton wrote:
If I use Apple TV to purchase HD movies from the iTunes Store (I'm guessing they come in at +/-6GB each, is the only storage option for these movies the Apple TV's internal storage?
Currently you can only rent HD movies from iTunes, you can't purchase to keep, so unless you want to download several HD movies with a view to a very intensive bout of film viewing it's probably not an issue, though it may affect the amount of synced content on your AppleTv.
There's a USB port on the Apple TV, but I read in another post that this is a service port that only Apple can access...
Correct - service port only - no reason it couldn't be enabled in a future software update but unlikely in my opinion. Would love to be proved wrong on this!
Personally, I think the trend will be towards centralised home media servers, and networked 'thin' clients for display with small amounts of onboard storage. I would love an "AppleTV Air" type device with solid state storage - should run cooler, use less power, and be less prone to hardware failure without a mechanical drive.
Even in it's current form I could see me using Apple TVs for years to come but the hard drives will eventually fail - a solid state drive AppleTv would have more longevity.
If they enabled USB to allow attaching external storage that would be the icing on the cake (more codecs, faster processor, and higher bitrate playback would be the lit candles!).
AC -
Multiple Preloaders for Multiple Movie Clips
Designed in Flash 8, the site's timeline is all in Scene 1
and is comprised of an introduction, which contains a short video,
and 6 movie clip categories that the user selects to view. Since I
want the intro to play as soon as possible, I'd like to limit the
first preloader to just the video in the intro and not
_root.getBytesTotal. Then, as the viewer watches this short video,
the rest of Scene 1 movie clips will keep on loading. After the
intro, the viewer will choose which of the 6 categories to view.
These categories are identified with buttons which play the
particular movie clip. Since I don't know the order of the
categories they will select, I thought there should be a separate
preloader for each category. Hopefully, after they view a category,
the rest of the categories will have loaded and the loading time
will be nil. The design for the preloader is comprised of a status
bar and a percent loaded. Is there a way to limit the
_root.GetBytesTotal to specific frames? I know I could break these
categories up into separate SWF files but then I loose the
advantage of one loading while another is being viewed.MovieClipLoader is a built in class of functions that will
allows you to easily load Media (swfs/jpgs) from external sources.
This will create a MCL object
var mcl:MovieClipLoader = new MovieClipLoader
We want the MCL object to receive events for any movie that
is loaded into the main timeline
mcl.addListener(this);
Ok. now we have a movie clip loader that is able to recieve
events. Since we want to show the progressive download and want to
do something with that content after it loads, we need to declare
two event handlers onLoadProgress and onLoadInit. onLoadProgress is
pretty straight forward. onLoadInit executes it's action as soon
all of the AS on frame 1 of its time has finished loading. In this
case, we want two different things to happen. 1st, load the first
clip and show it.... 2nd, load all remaining clips into the buffer.
But first, lets declare those next...
function onLoadProgress( target:MovieClip,
bytesLoaded:Number, bytesTotal:Number):Void {
// standard preloader code goes here
function onLoadInit( target:MovieClip ):Void {
// display the clip - this will be as easy as just calling
our loadClip function for the mcl...more on that in a minute
// If you want something special to happen, i.e. movie fades
in or a mask is applied to it, you'd do that here.
Now all we need to do is call the loadClip member function
for the MovieClipLoader. Just replace the two parameters with the
location of the swf and then the name of the instance you want it
to load into
mcl.loadClip( "myswf.swf", targetMovieClip );
The other movie clips are now a breeze as well. For each
button, just add an on(release) or onRelease = function (depending
on your situation) to just call that mcl.loadClip() line from up
above. Just change the movie you want loaded.
Let me know if you need more help... -
Enhancement in MIGO for Goods Movement
Hi Gurus,
I got a requirement to Create a 262 goods movement materials document with reference to a Sub-Contract GR for an account assigned Sub-Contract PO thru TCODE MIGO. The details are describe as follow:
Once the 101/543 GR movement is carried out, a 262 movement type needs to be executed to reverse the consumption of the material against the service order and bring it back to the inventory (open stock). This movement needs to be triggered once MIGO subcontractor goods receipt -101/543 is committed (saved).
When the 101/543 GR movement transaction MIGO is saved-
1. User exit needs to be invoked
2. Check if the GR is
o for an account assigned (EKPO- KNTTP Acct Assignment Cat =F) Sub-Contract PO (EKPO- PSTYP Item Category L)
o AND the service order number (AUFNR) exists in ZXXXXXX (ZSUBCON_VALIDATION) table
3. Identify the line item material in the goods receipt document (First item /against movement type 101),
4. Identify the service order number (AUFNR) from ZSUBCON_VALIDATION table.
5. Call the goods issue (262) transaction via the BAPI using the material derived via step 3 and against the service order number derived via step 4. BAPI_GOODSMVT_CREATE post goods movementsHi Matt,
There are lots of Exits and BADI available in this transaction. See which suits you.
Enhancement
MB_CF001 Customer Function Exit in the Case of Updating a Mat. Doc.
MBCF0011 Read from RESB and RKPF for print list in MB26
MBCF0010 Customer exit: Create reservation BAPI_RESERVATION_CREATE1
MBCF0009 Filling the storage location field
MBCF0007 Customer function exit: Updating a reservation
MBCF0006 Customer function for WBS element
MBCF0005 Material document item for goods receipt/issue slip
MBCF0002 Customer function exit: Segment text in material doc. item
Business Add-in
MB_DOCUMENT_UPDATE BADI when updating material document: MSEG and MKPF
MB_DOC_BADI_INTERNAL BAdIs During Creation of a Material Document (SAP Internal)
MB_ME_CSGMT_BADI_SAP BAdI: Consignment Processing - Stock Transfer
MB_MIGO_BADI BAdI in MIGO for External Detail Subscreens
MB_MIGO_ITEM_BADI BAdI in MIGO for Changing Item Data
MB_PHYSINV_INTERNAL Connection: Core Inventory and Retail AddOn
MB_QUAN_CHECK_BADI BAdI: Item Data at Time of Quantity Check
MB_RESERVATION_BADI MB21/MB22: Check and Complete Dialog Data
MB_RESERVATION_SCR Screen BAdI for Retrofit DFPS
MB_RESERVATION_UPCHD BAdI for Creation and Changing of Manual Reservations
MB_RES_BAPI_CHANGE BAdI: Execution of Changes to Reservation Fields
MB_RES_BAPI_CREATE1 BAdI: Adoption of Customer's Own Fields as Reserv. Fields
MB_RES_BAPI_DETAIL1 BAdI: Display of Customer's Own Fields in Reservations
MB_STOR_LOC_BADI_GTS BADI to Check and Change Storage Location (GTS Fct. Only)
MB_DOCUMENT_BADI_SAP BADI for Creation and Changing of a Material Document
ARC_MM_EBAN_CHECK BAdI: Enhancement of Archivability Check (MM_EBAN)
ARC_MM_EBAN_PRECHECK BAdI: Enhancement of Archivability Check (MM_EBAN)
ARC_MM_EBAN_WRITE BAdI: Enhancement of Scope of Archiving (MM_EBAN)
ARC_MM_EINA_CHECK BAdI: Enhancement of Archivability Check (MM_EINA)
ARC_MM_EINA_WRITE BAdI: Enhancement of Scope of Archiving (MM_EINA)
ARC_MM_INVBEL_CHECK BAdI: Enhancement of Archivability Check (MM_INVBEL)
ARC_MM_INVBEL_WRITE BAdI: Enhancement of Scope of Archiving (MM_INVBEL)
ARC_MM_MATBEL_CHECK Prüfung ADD-ON-spezifischer Kriterien für MM_MATBEL
ARC_MM_MATBEL_WRITE Check Add-On-Specific Data for MM_MATBEL
MB_CHECK_LINE_BADI BAdI: Check Line Before Copying to the Blocking Tables
MB_CIN_LMBMBU04 posting of gr
MB_CIN_MM07MFB7 BAdI for India Version exit in include MM07MFB7
MB_CIN_MM07MFB7_QTY Proposal of quantity from Excise invoice in GR
MB_DOCUMENT_BADI BAdIs During Creation of a Material Document
Regards,
Atish -
i have the new version of iMovie, and when i try to start the program, i can't because it says that it is looking for some movie files from the Iphoto, so all the program is locked up... how can i do to restart the program??
Hi
Did You ever use - iPhoto ?
Did You may be direct iPhoto to a different Photo Library
As iMovie tries to find the appropriate photo library - it can get lost if iPhoto direct it into a Library on a not connected external hard disk or to a strange location - And iMovie HANGS.
Do - When no other program is running that might interfere
• Start iPhoto - BUT NOW KEEP alt-key (option key) DOWN during the full Start-Up process
• Now iPhoto let's You select Photo Library
• Select the one in Your Account / Home folder / Pictures ! !
• Then iPhoto should start up OK
• Now Quit iPhoto
• START iMovie
Does it still hangs - then I would suspect - iMovie Pref. file
If it Run's OK - Then HURRAY !
Yours Bengt W -
Movie inside of a loaded external movie
Hi
how to control a mc inside a loaded external movie?
so I have a main.swf, loaded a ex.swf into it by using loadMovie, and inside ex.swf there is a mc called 'mc'
how do I control 'mc' from main.swf? I tried something like newLoader.mc._x +=1; ( newLoader is ex.swf), it doesn't work?
Thanks for reply.Hi Ned
after I read your reply, i went on make a new sample file just to try it out, and it work, then I went back to my file and found out on these code
var currentObject = new Object;
currentObject = newLoader.newLoader2.newLoader3;
var currentObjectColor = new Object;
currentObjectColor = currentObject;
and then I have
var my_color:Color = new Color(currentObjectColor.mc);
trace (allowColor);
my_color.setRGB(this.colorCC);
for some reason, after I replace currentObjectColor to just currentObject, it work just fine, I don't know if the problem is from putting one object equal another one, but as far as I need this would work for me.
thanks a lot.
Maybe you are looking for
-
Black lines appearing around windows and on screen in Pro 9.3.1
I have just installed the update for Acrobat Pro 9.3.1 and now am getting random black keylines around any windows open on my Mac. It does not matter which application, they are appearing on everything. They also show up on the screen when randomly w
-
Basic LOC is not working in B2C shop where as area level LOC is working.
Hello Experts, We are on CRM 2007 (6.0) B2C Implementation. The Requirement is to have a search on certain attributes which were maintained in basic list of characteristics in product catalog header level. The same attributes are appearing at item le
-
Terms Definition in Standard Reports
Hi, IN BI Standard reports different terminology is used like Execution Time or lead time, Capacity utilization etc. Can anyone please tell me where can I get more detailed information about these words from? Thanks
-
How do I get rid of leading zeros.....
Hello... Here's what I am trying to do.... 1. I get a file like below 00000000000.00 00000000000.00 00000036092.80 00000000000.00 00000000000.00 00000000240.00 and more lines depending on the how big the files are(possibly to have 1 million records).
-
Code déverouillage réseau mep 0 essaie!!!!!!
bonjour voila j'ai besoin de debloquer mon bb torch 9800 pour mettre une carte sim d'un autre opérateur, mais on me demande le code reseau mep pour le deverouiller , je l'ai donc demandé a mon operateur orange mais malheureusement j'ai du faire une m