[Flash 8] Help With Loader_Mc An Dynamically Loading Jpgs
Hello, I am trying to dynamically load .jpgs into an Mc, and have this code on the loader clip Code: var loader:MovieClipLoader = new MovieClipLoader();loader.addListener(this);function onLoadInit(_mc:MovieClip) { gotoAndPlay(2);};loader.loadClip("img/fan.jpg", _root.jpg_holder); it works fine but i want to make it so it works for all the .jpgs i am trying to load not just "img/fan.jpg". is there someway to do this easily? i´m sure there´s a simple solution but just has´nt hit me yet.cheers if you can help.mike
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 02-15-2006, 05:12 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
[as] Help With Loader_Mc An Dynamically Loadi
Hello, I am trying to dynamically load .jpgs into an Mc, and have this code on the loader clip
Code:
var loader:MovieClipLoader = new MovieClipLoader();
loader.addListener(this);
function onLoadInit(_mc:MovieClip) {
gotoAndPlay(2);
};
loader.loadClip("img/fan.jpg", _root.jpg_holder);
it works fine but i want to make it so it works for all the .jpgs i am trying to load not just "img/fan.jpg". is there someway to do this easily? i´m sure there´s a simple solution but just has´nt hit me yet.
cheers if you can help.
mike
Dynamically Loading JPGs From A URL Into Flash
Is it possible for the FLASH movie to dynamically pull gif / jpg images from a specified URL?
For some website I created the client is forced to come to me to get changes made. I was wondering if I could set it up so they could changed images on their server space and the flash site I designed will dynamically load them from the URL and place them in the movie.
I assume this is possible, I just have no clue how to go about doing it.
Any help / guidance is greatly appreciated!
Thanks
Glenn
HELP Loading JPGs Dynamically
does anyone know of a method for loading JPGs dynamically into a movie clip? I'm not sure if this is even possible. My goal is to be able to have a JPG in a directory on my site, then be able to the movie, most likely through a text file, the file name of the JPG, it's height and width. I'm basically just trying to avoid having to create an SWF every time I want to add a JPG to the site.
Any help or suggestions regardiing how to accomplish this is gratly appreciated.
Thanks.
Loading JPGs Dynamically
I am making a movie which has got huge no of big photos and the swf file is always reaching a size of 922kb to 1 mb.
Pls. tell me how to call the images dynamically then I think the size will go down.
Loading JPGs Dynamically
I can load JPGs dynamically into my movie.
However, I need multiple instances of this JPG on my stage. It seems that I cannot duplicate the movieClip containing the loaded JPG, while keeping the JPG intact.
Does this mean that the only way is to load multiple instances of this JPG?
Loading Jpgs Dynamically
I would like to be able to incorporate an image that has either been uploaded or that is from a database into a flash movie. How would I go about doing this?
What would happen in the case where the image is extremely large or extremely small - can you tell Flash to shrink/enlarge the dynamic image to a specified size?
I must apologize in advance as I am by no means an actionscript expert.
I appreciate your help
Loading Jpgs Dynamically
I have written this script to have external jpgs load into my file but the jpgs don not seem to want to load into my file. here is the scrip. Does anyone know why they won't load. Thanks
Code:
var slides;Array = new Array(["Transworld Snowboarding", "image0.jpg"], ["686", "image1.jpg"], ["Acadmey", "image2.jpg"]);
var currentSlide:Number;
function changeSlide(number:Number){
if (number >= 0 && number < slides.length) {
currentSlide = number;
title_txt.text = slides[number][0];
loadMoive (slides[number][1], "placeholder_mc");
}
}
changeSlide(0);
prev_btn.onRelease = function(){
changeSlide(currentSlide - 1);
}
next_btn.onRelease = function(){
changeSlide(currentSlide +1);
}
Dynamically Loading Jpgs
I am having problems dynamically loading a jpeg. I am trying to make it load into a movieclip with the instance name SAINTPICS5. As you will see from the code I am simulaniously trying to to move via a button from within a movie (this.)up and along the main time line to frame 16. Here I have a stop action and another movie which has an instance name 'cd'. I am successfully navigating to frame 16 and 'cd' is playing but the jpeg isn't loading.
Any help greatly appreciated
Thanks
Mark
(code on the button)
on (release) {
//Movieclip GotoAndPlay Behavior
this._parent.gotoAndPlay("16");
//End Behavior
}
on (release) {
this._parent.cd.SAINTPICS5.loadMovie("http://www.markwaterfield.com/images/bt.jpg");
}
Dynamically Loading Jpgs
Okay the problem is i need to load jps dynamically and store each one in a seperate movie clip that can be attached using attachMovie();. Now is this possible?
Loading Jpgs Dynamically -- Preloader Help
Here's the deal...
I have a mainmovie.swf which loads various MC's into it.
Each of these MC's dynamically loads a jpg file to use as a background which an animation occurs over top of. Each MC has it's own preloader which uses the getBytesTotal/loaded method, but it doesn't seem to take into account the jpg it has to load into itself.
So, what happens, is if your connection is a little slow, the animation starts to happen b4 the pic is loaded...LAME!
I see 3 possible solutions...
make the preloader count the bytes of the jpg as well
make another preloader for the jpg loading (argh)
make a lot of frames between the jpg frame and the rest of the animation (double argh)
Hopefully someone can help.
Thanks in advance!
RH
Dynamically Loading JPGs Into ScollPane
Hello All,
Please need a little help:
I am trying to dynamically loading jpg files into a MC ScrollPane, which loads correctly, however, the image is not displaying or scrolling correctly. The image shows up way at the bottom right and does not fully scroll.
Sample: http://www.wrstarkey.com/test/ob.html
Source: http://www.wrstarkey.com/test/OnlineBinder2.fla
I have tried using:
on (press) {
_level0.mypane2.tmp_mc.setScrollPosition(0, 0);
_level0.mypane2.tmp_mc.loadMovie("optimized/001AD-optimized.jpg", 0);
}
I would greatly appreciate any help/advice any one can offer.
Thank you,
Todd
Dynamically Loading JPGs Compression
Hi, I've made a portfolio viewer that loads JPGs dynamically using Ralf Siegel's ImageBox component. Now, I have a question.
How can I make a JPG to hold it's original compression?
When I export my Portfolio's SWF from Flash, I give it "JPEG Quality: 100", but the JPGs it loads, show up crappy. Even though I've made those JPGs without compression.
So, is there a way through actionscript or whatever to load the JPG, and setting export compression to none? Such as when you import a JPG, and then you go to the library and set it's properties.
Any help would be greatly appreciated.
Thanks in advance
Adrian
Dynamically Loading Images (Not Jpgs)
I am only able to dynamically load jpegs and swfs?
Or is there a way to load images of other file types?
The only method I know of is using:
loadMovie()
Thanks !!!
with much love,
Preloader For Dynamically Loading Jpgs
hello,
i've created a slideshow....a very simple one where the jpgs dynamically load every 100 frames or so.
does anyone know of a preloader that will load all the images in the beginning so my slideshow won't hiccup and stutter as it does? i don't need percentages or anything like that, but a simple preload bar would be good.
thank you!!
julia
Caching And Dynamically Loading Jpgs
I'm making a SWF where I want to have a tile of image with 6 repeated jpgs used. I ended up setting up a 4x6 grid of movie clips and then calling loadMovie on each clip to load in a random jpg (1 of the 6 jpgs).
When testing with the bandwidth simulator, I was concerned because it appears that the swf will download each call to the jpgs over and over rather than caching. I would figure that if clip1 uses jpg1, then if clip8 also uses jpg1, there would be no download hit, but that's not what the bandwidth simulator is showing.
I even set up 6 invisible clips off the stage and pre-loaded the jpgs into them, but no luck. Also, I tried duplicateMovieClip on those 6 clips and the duplicated clips would not preserve the loaded jpg.
My question is there a way to cache dynamicly loaded jpgs at the beginning of a movie and then re-use those jpgs without getting a download hit?
Thanks,
Dennis
Loading .jpgs Dynamically Without Delay
im using a loadMovie code to load a few .jpgs sporadically throughout a timeline.. but there is always a few seconds delay for the .jpg to actually load. is there a way i can preload all dynamically loaded images so when the loadMovie code comes along.. those images show instantly? i appreaciate any ideas you might have. thanks
Dynamically Loading Jpgs Size.
Hello !
I tried to search forums, but did not find anything that could solve my problem. Here it is : Im trying to make dynamic gallery with loading 3 pictures under the text. Text part works fine, but is there any way to add onEnterFrame function to these babys :
Code:
for (i=1;i<=this["pilte"+a];i++)
{
_root.mload.L.createEmptyMovieClip("pxc"+a+"p"+i,a+""+i);
_root.mload.L["pxc"+a+"p"+i]._x = _root.mload.L["pxc"+a+"p"+(i-1)]._x+50;
_root.mload.L["pxc"+a+"p"+i]._y = _root.mload.L["gtxtsisu"+a]._y+_root.mload.L["gtxtsisu"+a]._height+10;
_root.mload.L["pxc"+a+"p"+i].loadMovie(_root.host+"/pics/"+this.id+"/"+i+".jpg");
_root.mload.L["pxc"+a+"p"+i].onEnterFrame = function ()
{
if (_root.mload.L["pxc"+a+"p"+i]._width > 0)
{
_root.mload.L["pxc"+a+"p"+i]._width = 40;
_root.mload.L["pxc"+a+"p"+i]._height = 30;
}
}
}
This is a cycle inside another cycle, but this one is with the prob.
As you can see, i tried to add onEnterFrame func to each one mc, i also tried it just _root.onEnterFrame =
and this.onEnterFrame =
Is there any other way to resize those jpgs?
thnx,
Manrico
Issues Loading .jpgs Dynamically
I am having issues loading images...
The code works
It loads images from the tutorail "Loading Techniques"
Unfortunatley the images i make are not..
Is there some sort of setting that needs to be set during export from photoshop?
Drew
Dynamically Loading Jpgs / Manipulating Them
Hello,
I've just learned how to dynamically load jpgs into flash but now i'd like to animate them. move them left to right, change the alpha, etc.
does anyone know how to do this?
thank you!
Preloader For Dynamically Loading Jpgs
hello,
i'm a total beginner when it comes to actionscripting so a lot of what i've read on this subject is hard to understand.
i've created a file with dynamically loading jpgs based on this:
http://www.flashkit.com/board/showth...namic+load+jpg
which basically uses this code:
picHolder.loadMovie("images/p1.jpg");
Can anyone tell me how to create a preloader for this?
Thank you!!
Julia
[F8] Dynamically Loading Multiple Jpgs On Timeline
I have a movieclip on my stage that contains 4 frames. On each of the 4 frames there is an empty movieclip ("holder1", "holder2", etc.). I want to be able to dynamically load in an external jpg to the empty movieclip on frame 1, then go to frame 2 and load one into that movieclip, then frame 3, etc. I have tried this but it doesn't seem to work. Is there an easier way to do this? Please let me know how this can be done.
Thanks,
-- K
Dynamically Loading JPGs ~ Strange Behavior
I have about 20 jpegs that are dynamically being loaded into a swf. These images are loaded one at a time, fade in as the previous one fades out, and then eventually the loop starts over again, loading the initial image. I am using the MovieClipLoader Class to load them. I am, however, running into an odd problem.
On the site's live server (Linux Box), the images don't always get loaded in to the swf and there is just 'white' space. I have this exact site on another hosting company's server (windows) and the issue never occurs. To resolve the issue, I have even tried to use a "cacheBuster" for the images (ex: image1.jpg?12345). This however still doesn't work. I have also tried using a "Windows" server on the live site, but it yielded the same result. In my mind. clearly this is an issue with the hosting company?. Does anyone have any thioughts about why this may be occuring?
Thanks for any and all replies.
Help With Dynamically Loading Jpgs Into Library Movieclips
I'm working on a project where someone has already sued a few library items throughout the movie. I need to make the images in these movieclips dynamic now. Does anyone know how to load these library items before the timeline and other objects start to use it?
I tried something with the movieClipLoader class, but its a little buggy. When a jpg doesn't load and calls onLoadError, I wanted it to load a default image, which works but slowly.
Any help would be greatly appreciated, I feel like I'm missing something obvious here.
Dynamically Loading Jpgs And Sizing The Movie Appropriately
Hello everyone. I am creating a site that the client needs to update themselves. The site will showcase a photographers photos. I am going to call all the jpgs in off the server with the loadMovie command and was wondering if it is possible to check the size (pixels) of the jpg and then scale an MC to match it, plus a 20 pixel border of extra space around it?
Am I making sense? Does anyone have any idea how this can be done?
thanks in advance for any replies..
Dynamically Loading Of JPGs, Reading Height And Width
I have made a .swf that reads in a whole load of JPGs. It draws an outline around the picture using the _height and _width properties. It works fine on my machine due to the fact that the JPGs load quickly. But when i publish it on the web the outline goes dodgy because the _height and _width values are undefined. once the JPGs have been loaded once its fine because the values are defined.
Has anyone had this problem?
I can think of a few solutions:
Wait until _height != undefined
Wait until a little of the JPG is loaded (1%) and then use the _height property
If anyone has a better way i'd be very happy
Cheers,
Matty C
www.matt.nildram.co.uk/skitrip if you want to look.
Problem Loading Multiple Jpgs Dynamically With LoadMovie And MovieClipLoader
Hello Kirupa forum,
I'm loading multiple instances of the same jpg dynamically to my swf. It works just fine locally, but when I upload it, it only executes the first loading code it encounters in the timeline. I was doing things fairly complexly with 'for' loops and dynamic name generation and stuff, but I've stripped it down to the basics in an effort to get this to work.
Here's some code:
loadMovie('1.jpg', mc1.empty_mc);
loadMovie('1.jpg', mc2.empty_mc);
mcLoader.loadClip('1.jpg', mc3.empty_mc);
mcLoader.loadClip('1.jpg', mc4.empty_mc);
mcLoader.loadClip('1.jpg', mc5.empty_mc);
as you can see, I'm using two different methods of loading the jpgs, just in an effort to pin down exactly what is going on. Locally, they all load fine. When I upload to the server, only the first instance of the loading code is run (so mc1 will get its jpg, but the rest won't). I've tried to swap the order, place the loading code in different areas, try to load different jpgs into each empty mc, but nothing works except that first instance flash gets to in the timeline.
It is driving me bonkers. The swf and jpgs are all in the same folder, both locally and on the server. The server the swf is hosted on is Windows 2003 box if that matters. I tried uploading it to a different windows box and got the same problem. Any ideas?
Solution To Load Delay When Dynamically Loading Images - JPGS & GIFS?
Hi all, just set up an online interactive which dynamically loads images (JPEGS & GIFS) and text as required.
I set it up like this so that the client can easily replace text or images in future without needing to mess with the Flash files. Here's a code example:
loadMovie("image1.jpg", _root.bg.Background);
holder._x = 500;
I've made the images as small as they can be, but when testing it, I see that there is still a delay as each image is being called up - in some instances long enough for the user to wonder if it's working or not.
I also notice that when certain images are dynamically loaded for a second or third time, they are called again from the server - the file that was loaded already is not used.
Is there a way to pre-load all these images to prevent these issues?
Or any other solution or ideas would be helpful
Load Dynamically Jpgs Into Flash?
Hi,
does someone know how to load dynamically jpgs from a certain directory into flash and work with them and to alter certain properties such as alpha, brightness, etc.
Are you able to do this with Action-Scripting or something else. It just has to work locally not over Web....
Would be very grateful for any help.
Thx
Charly
Importing .jpgs Dynamically In Flash
Does anyone have a tutorial/.fla which shows how to import a .jpg dynamically into a flash movie.
Is it possible to have a preloader showing this image being loaded into the .fla?
Thanks in advance!
J
Loading Page That Has Several Flash/jpgs ,,
i was wondering if there is a way that i can make a loading for an html page (but wait here is the problem)
i have a html page that contains several flash pieces (6) and a certain amount of jpg and gifs ...
The problem is the size of the page is pretty big .. a good 500kb and the dialup users have to wait in front of a white page until all the elements are loaded ... I’ve seen some java script that says loading .. And when it's done it takes u to the page with all the component loaded....
I tried to create a master flash that loads all the flash movies and when they are loaded it will take the user to the actual page, but it seems that the Browser doesn’t recognize them and loads them again even though they are in the cache...
Anybody have an idea about this
thanks guys
Flash MX - Problems Loading Jpgs
I have searched all over and still cant get a clue.
I am using flash and PHP and reading the contents of a directory (which are all jpg files) and loading the file names into an array.. No problem thus far.
What i am having a hard time with is that the first image never loads up. upon hitting the next a back buttons it will finally show. Also some jpg files will never show. i have looked to see if they are cmyk or something like that but they are not, dont know why they wont show.
I am also lookig for a preloader to tell me when the image has loaded. any suggestions??
hope this all makes sense
TM
http://www.tidalwaves.com
Another Guy In Need Of Dynamically Importing Jpgs
hi,
i was wondering if i could dynamically upload different jpgs in a swf file. i have a client that wants to change the pictures they want to show in their flash movie. how can i do this w/o them using flash?
i thought maybe letting them name the jpgs 1, 2, 3, and 4 and that would allow for changing the pictures, but how could i upload, and update them to the swf?
grant
Inserting Jpgs In Dynamically
Here's a little intro to what I'm doing:
The site will have a movieclip of jpgs that scroll up and down the side of the screen. I want to be able to add or delete thumbs without modifying too much of the flash code. There's no server side support on this web server so I'm thinking about reading in some kind of data from a text file.
The problem:
I don't know how to dynamically insert jpgs into a movieclip. I tried the LoadMovie function but then I'd still have to insert the jpg into it somehow. Ideally, I'd like to create one movieclip and duplicate it with a different jpg in each one and place them all onto the big movieclip that will be scrolled. Any suggestions?
HELP!!!!
Dynamically Loaded Jpgs
I have read the threads about loading jpgs dynamically, and they have been very helpful. Now I have written code so it loads the jpg's when I run the swf on my Mac, and everything works fine. But I posted it to the website and it doesn't work when I try to view it from there. The main swf loads but when I click on the thumbnail to spawn the full size jpg, everything works as it should except it doesn;t load the jpg. I ensured that I put the jpg's in the same directory as the source swf.
Any thought would be greatly appreciated.
Brian
If you want to view it, go under the 'women' section, then click on any of the 4 thumbnails...
http://www.brianschnapp.com/nonnino/
Dynamically Load Jpgs In MC ?
is there a way jpgs can be dynamically loaded into a graphic symbol inside a movie clip without an event handler?
can the jpgs be put in an external folder where they can occasionally just be swapped out in the folder and it will be automatically updated in the .fla movie?
thanks! any help appreciated...
Dynamically Importing Jpgs
hi using flash 8
I want to dynamically import jpgs that have different widhts
my xml looks like this:
<gallery2>
<pic>
<image>gallery2/images/p1.jpg</image>
<caption></caption>
<thumbnail>gallery2/tn/p1.jpg</thumbnail>
<size>272</size>
</pic> etc...
and the actionscript like that:
function thumbnails_fn(k) {
thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
target_mc._x = hit_left._x+(target_mc._width+5)*k;
target_mc._width = [size]
target_mc.pictureValue = k;
target_mc.onRelease = function() {
p = this.pictureValue-1;
nextImage(); etc...
as you can imagine - IT DOES NOT WORK --- PLEASE HELP!!! HOW TO SET THE SIZE OF THE LAODED IMAGE DYNAMICALLY AND NOT FIXED.
How To: Load Dynamically Jpgs
i've been constructing a site that will have roughly 250 images. A friend of flash told me that i should load them dynamically. I have no idea what this means or how to do it. I've been learning from books, but i can't get any helpful information in this regard. can someone direct me to a tutorial that specifically deals with jpgs? or tell me how i can move forward?
much thanks in advance.
A
Dynamically Creating Jpgs
Does anyone know anything about dynamically creating jpgs from a flash movie? So, for instance - someone can create an image on an interactive flash page - then download it as a jpg. I've heard a rumour that its possible. Maybe using php or whatever.
any ideas?
Loading Jpgs In Flash Sometimes Makes Images Sidways
I have a flash movie that will load and reload different jpg's. When the jpg loads its always centered in the clip and I set its x,y where it belongs, and for some reason after a few reloads the image will show up sideways and in the center! Ive added settimeouts in case it was the fact that i'm moving and resizing the clip before the jpg loads but it doesn't seem to be helping, has anyone had any problems like this?
code:
//this will run each time a new jpg is added through xmlsockets
trace("loading movie")
trace(myvalue)
trace(GB2.loadMovie(myvalue))
trace("loaded movie")
if (albartInt == 0){
albartInt = setInterval(newalbart,10,myvalue);
}
function newalbart(albart){
GB2.loadMovie(albart);
GB2._y = 182
GB2._x = 740
GB2._width=185;
GB2._height=185;
trace("image resized")
clearInterval(albartInt);
albartInt = 0
}
// yes albartInt is set to 0 elsewhere
Safari 1.2/Flash Problem Loading Dynamic JPGs
My client's site was created in Flash MX and dynamically loads JPGs. On first hit, the site loads fine. On second visit to the site, the site hangs up, and no JPGs load. The only way to get it to load is to empty the cache each time. Worse, sometimes it just doesn't load at all...even after emptying cache and restarting Safari. This is extremely distressing, as the majority of my client's clients use Safari 1.2. Help please!
BTW, I thought it was perhaps a caching issue, so I added a "no cache" PHP code to the site, and still, no change. FYI, the current page up is WITHOUT the php code.
This problem only exists in Safari 1.2. (not Safari 1.0, IE or Netscape).
Any info would be greatly appreciated.
URL: http://www.kslphoto.com
Thank you.
Dynamically Loaded Jpgs At A Different Scale?
I need to borrow someones brain power!! Can anyone modify FLASH MX's dynamically imported jpg viewer, so that you can set the scale of the jpg being imported? Ex( importing the image at 50% of it's original size.
If you can figure that out, I would also like to have a button that could be used to blow up the image once it's loaded into the target
Positioning Dynamically Loaded Jpgs
I've used this to load a jpg dynamically:
loadMovieNum("R&A_2000.jpg", 1);
but of course it appears at 0,0 postion
what is the code to set the position differently?
hope someone can help.
Printing Dynamically Loaded JPGs
Can't seem to find any reference to this problem...
Trying to print out a movieClip that itself contains thumbnails that have been dynamially loaded into empty movieclips.
Problem is when I print it out not all of them are included in the page even though I have set the bounding box to be being big enough and have tested with huge sizes of the bounding box ending in strange effects... making the images smaller or bigger than their original size etc.
Here is a link to the site - http://www.bccreate.com/simonRoberts/ and click on V26
Click on the small "c" in the box at the bottom of the site and you will get a contact sheet come up that will load all the images (28 thumbnails).
Once they are all loaded a "print" button will appear in the bottom right hand corner.. click it and try printing it out to an Acrobat file to see what I mean.
This button has the correct scripting simply to print the movie with all the image movies in it: I have dabbled with the whole "bmovie", "bframe" and "bmax" settings but none of them print all the pictures which should fit onto one A4 piece of paper at their normal size. Also put the single #p frame and #b frame... these are not the solutions to the problem?
I have tested it by printing to an Acrobat file to save paper.
Maybe this is one for the mdoerators to solve?
Flash's printing seems to be very limited and a bit buggy... anyone else experience this problem?
Cheers
Dynamically Load A Series Of Jpgs
Here's the problem, I'm trying to make a photo gallery of sorts for my digital pictures to send to relatives. I have a series of images IMG_001, IMG_002, IMG_003, etc... What actionscript can I put on VCR style buttons that will load the next Jpg?
For example
on (release){
emptyMC.loadMovie("IMG_00[n].jpg");
}
OnLoad + Dynamically Loaded Jpgs
Hi All,
I'm trying to solve a problem that I see others may have resolved. Problem is, I can't find an answer that works.
I've got a MC on my stage, called rImage;
I'm got the following code:
Quote:
_root.rImage.onLoad = function(){
trace("rImage loaded");
}
lImage.loadMovie(imgPath);
My problem? the onLoad function never gets called. The image DOES get loaded. I just never get told when. Very aggravating.
Can anyone offer a fix?
ps: I've found a reference on the forum to an extension that fixes this problem, but it is no longer available. Anyone have one?
thanks
MovieClip Load Jpgs Dynamically
hey everybody,
i´m trying to load an external jpg to be displayed as a thumb dynamically into a movie clip.
that works with no problem.
the thumb then shall be clicked -
a bigger jpg is loaded into another movie clip. no problem either.
i´d like to make sure the movie clip loading the thumb is invisible until the external jpg has loaded.
there´s my problem.
does anybody know?
thanks,
moe
Progress On Dynamically Loaded .jpgs
Need some direction. I am pulling in a series of jpgs dynamically [via php / xml], and need to run a check on whether or not the entire file has loaded. The code I am using below definitely works in loading my dynamic jpg:
this.mc_holder.loadMovie(_root.basehref + _parent.slidelocation[_parent.currentslide]);
What is the best methodology to check to see if it is fully loaded? I have tried variations of the following:
bytes_loaded = Math.round(this.mc_holder.getBytesLoaded());
bytes_total = Math.round(this.mc_holder.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
gotoAndPlay("fadein");
}
But the problem is that they always post 100%, even when the file is not loaded. I have a fade on the file once it is loaded that I would refer to if I could run the check. Any ideas?
|