External JPEGs
Is it possible to get the filesize or the getBytesTotal from files not loaded into a movie?
I'm making a slideshow, and it loads the jpegs from a directory. I want to have a status bar showing the percentage of the image loading. Is this possible?
Thanks for any help.
Neil Kiessling
FlashKit > Flash Help > Flash ActionScript
Posted on: 01-10-2003, 08:54 PM
View Complete Forum Thread with Replies
Sponsored Links:
External Jpegs
Is there anyway in flash to load an external jpg like you can with
text? Ie, is there anyway i can have a image box which displays a
file on my server called "image1.jpg" and then when I upload a different picture also called image1.jpg, it will automatically update in the flash movie?
Cheers
Baz
View Replies !
View Related
External Jpegs.. Can't Get Rid Of Them
hi
I've imported external jpegs into my movie... but when I go to the next section via pressing a button the image stays there..
I would be very happy if some one can help me get rid of the image for me..
I need to "get rid" of it when I press the other button which brings in the new section.... I just don't know how...
Can anyone help??? please
View Replies !
View Related
External AS And Jpegs
Hi.
This is the first Topic I've posted at (the very cool) UltraShock site so go easy on me.
Thought I would kill a few birds with one stone here.
(1) I'm currently editing AS in an external file which gets included in the movie when it's compiled. Is there any way of loading more AS into the movie while it's playing in a similar way you load MP3's, Jpegs, etc?
(2) Is it possible to include images in HTML text (html textfield) ? I've tried various ways with no luck ( using Flash-MX)
(3) Last but not least I've read somewhere that it's possible to update the MAXSCROLL property of a text field (needs to be done after updating the text) but I can't find it anywhere!!
Any help would be fantastic.
Cheers.
View Replies !
View Related
Trouble With External JPEGs Into External MC
I'm stumped. I created a Movie Clip using code that when a button is moused over, resizes the frame as an external JPEG is loaded into it. The MC itself (ContentPix) is then loaded into the main file and is called on by a submenu. Everything functions fine when ContentPix is tested by itself. But when loaded externally into the main movie, it won't import the JPEGs. What am I missing? This is the only submenu section that loads a MC that itself loads images. All the others work fine.
View Replies !
View Related
Loading External Jpegs
hi there,
i need to load jpeg-images from somewhere in the file system dynamically into my flash-movie. i think it works easily with flash generator, but i haven't got it. so, is there a way to load image files dynamically using only standard-actionscripting? like loadMovie(*.jpg) or something?
thanks, stevie.
View Replies !
View Related
External Jpegs And Their Titles
Hi all, I want to load external jpegs with their title for my own family picture book i wanna burn on a CD and send it out to all my relations..
I have picked up the macromedia file for dynamic loading of images and their titles using XML, but want a fade in and fade out b/w them
I am posting the FLA, hope this helps
1- I want to display the text descriptors using XML
2- I want the images to have a fade-in & fade-out
SO the end result could look somewhat like this
http://www.macromedia.com/desdev/mx/...ad_images.html
just that the images would be loaded using XML and so wud their descriptions
thanks for the extended co-operation
View Replies !
View Related
Preloading External Jpegs With Do While
hello,
i´v got the following problem:
I am creating a photographers portfolio.
I want to preload some jpegs into a movie. when the first picture is loaded the button for this picture should be activated. then the next picture should be loaded the next button should be activated and so on.
problem: flash makes all buttons active although the pictures are not loaded already.
here is my actionscript:
do {
loadMovie ("werbung/1.jpg", "bild1");
var geladen1 = eval(bild1.getBytesLoaded());
var total1 = eval(bild1.getBytesTotal());
var prozent1 = (geladen1/total1)*100;
} while (prozent1<100);
if (prozent1>=100) {
tellTarget ("mc1") {
gotoAndStop ("geladen");
}
}
do {
loadMovie ("werbung/2.jpg", "bild2");
var geladen2 = eval(bild2.getBytesLoaded());
var total2 = eval(bild2.getBytesTotal());
var prozent2 = (geladen2/total2)*100;
} while (prozent2<100);
if (prozent2>=100) {
tellTarget ("mc2") {
gotoAndStop ("geladen");
}
}
.
.
.
View Replies !
View Related
Loading External JPEGs (?)
Hi Guys,
I'm having a bit of trouble loading some external JPEGs into my movie and I was wondering if anybody could help out.I've simply created an empty movieclip to load external images into and given these actions to the corresponding button in the main timeline:
btn1.onRelease
loadMovie("/desktop/vicprof/tfwebnew/manjpegs/kiss1.jpg","holder")
...and the image(s) won't load.
I've never had a problem with loading external swfs in the past, so I'm not sure what's up. The only thing i can think of, is that the holder MC is a slideshow which is placed within another MC, and the button with the actions is on the Main MC timeline, and not the root timeline. Does this make any difference?
If not does any one have any advice?
thanks!
View Replies !
View Related
Pre Cache External JPEGS
Yo (Philadelphia accent) everyone,
I'm working on a friends web site: http:cunicelli.com/BETA (this is a local Philly photographer).
For the work sections of the site I'm using an "on button press" GetURL function to load external JPEGs so that the photo studio will be able to upload new work themselves (following a naming convention).
I want to "preload" all the JPEG work images from within flash (if possible). I'd really like it to tie-in with the site's preloader (if possible).
Any ideas? I'm not an expert at actionscript, but am competant at copying + pasting (lol).
Thanks in advance for help with this.
View Replies !
View Related
Preload External Jpegs?
i have an image gallery, and i load all my images from an external images folder on the server. Now, when i view the site, it all works, but while the image is loading, well...you dont see anything you know? The image just appears when its done downloading. So i was wondering how i can set up a preloader that loads each external jpeg, similar to how i have a preloader set up for the flash.
also, random question..i just got mx 2004 pro, and i noticed they removed the ability to right click on something and select actions, i have to click on something and press f9, which takes a good 5 seconds or so before it opens up, anyway to fix that?
thanks for any help
View Replies !
View Related
Loading External Jpegs
I’ve found a bunch of questions about loading external jpegs but mostly with a button.
I need a simple code that will load .jpegs from the source folder into a MC onto my stage without clicking anything.
I’ve saved them as non-progressive but none of the code I’ve found seems to work.
I just don’t want the images in my library.
Thanks in advance.
View Replies !
View Related
Help Preloading External JpegS
hi there, i am just a step far from publishing my first flash- humble - website.
there is just a little trouble loading it, because there's a simple slideshow that starts loading external images (which are in the same dir) as the main movie loads. each image is about 150 kb and once the first is loaded, i have to wait some seconds before the second displays. moreover i loose the transition effect between images (a simple alpha tween).
is there any way to put a preloader that loads external jpegs as soon as the main movie loads???
thank you all, help me publishing my first flashsite.
daniele
View Replies !
View Related
Several External JPEGS - One Preloader?
Hey Guys!
I have a flash file loading several external files.
I'm facing two problems:
1. **and the more important 1* Although I am loading several images, I want the preloader to be for all of them together - using a listener.
2. I want to load the images for use in the next scene, not the preloading scene, therefore I need to store them in a way that I can call them through ActionScript later on, something like Linkage, except I'm adding the Linkage in runtime.
I know how to create a preloader for one image at a time using a Movie Clip listener, but I want the preloader to show progress of the total amount of bytes loaded from all external images, not just one. Plus - if I use a MovieClip loader, the images will be loaded to a movie clip on the stage, but I want to call them using Action Script from a different scene in the movie.
Thank you very much,
Yuval Karmi
View Replies !
View Related
Quality Of External Jpegs
I am calling external ".jpg"s from outside my ".swf". When they come in they are a lower quality with alot of banding in the gradiants of the images. If I drop the same images into a browser they look fine.
Also, this is wierd. If you open the ".swf", when it opens at size the quality is messed up, but if you scale the ".swf" (grab the corner and pull it bigger or smaller) the jpegs then become fine.
I did save for web in Photoshop, jpeg, at high quality (80%). I tryed publishing my ".swf" with the jpeg slider at 100%, it did not help.
Thanks in advance for help.
View Replies !
View Related
Loading External Jpegs
I have a page that loads external jpegs... however it seems totake longer to retireve and display/load the images going through flash than it does if i were to display them as html...why is this... or am I just wrong. thanks J.
View Replies !
View Related
Loading External Jpegs
I have a script that gets the names of images from a database. If the image name returned to flash is blank then the script says don't even try to load the jpeg. This all works fine. However if for example only 3 image names are returned as not blank it takes a lot longer to load those 3 images than it does if all 10 images are required to load?
This might make sense if it was trying to load an image with a blank image name, however the script says if image name!='' then load the image.
why would this be? it makes no sense.
View Replies !
View Related
Loading External Jpegs In A Row?
hey guys!
I will try to explain where is my problem.. I am creating XML based image viewer. It will have thumbnails of galleries.. and what am I trying to do is to preload external JEPGS in a row, firstly - first jpeg, when first jpeg is loaded, then load second.. I've created one empty MC called thumbs and trying to attach thumb MC to it(witch has preloader, empty MC as image holder). The problem is that all thumb MCs are attached at first, and then all of them start to preload...
Any ideas how to solve this?
View Replies !
View Related
Help With Loading External Jpegs
Hi, I am trying to load some external jpegs on a site and I have the function done for MX
function loadPic(mc, picName) {
var myFile = "images/"+picName+".jpg";
mc.loadMovie(myFile);
}
I also have the button code done.
button1.onRelease=function() {
loadPic("fam1");
}
I've set up on the main timeline a frame/layer just for actionscript and the button I want to launch the image into the "mc" is down 2 levels. Where do I put the button code (MX) and the mc movie clip? Do they all have to be on the main timeline or can I somehow tell Flash where the button is and how to find the image and the function? I'm new and confused. Please help, I can feel myself going gray as I write.
Thanks,
Adam
View Replies !
View Related
Preloading External Jpegs
i'm currently making a slideshow for work, and they want all the pictures to preload before the show starts..... here's my code
Code:
var mymcl = new MovieClipLoader;
var mymclistener:Object = new Object;
mymclistener.onLoadStart = function (target){
var loadProgress = mymcl.getProgress(target);
trace("the clip "+target+" has started loading");
trace("Bytes loaded: "+loadProgress.bytesLoaded);
trace("Total bytes: "+loadProgress.bytesTotal);
}
mymclistener.onLoadProgress = function(target, totalbytes, loadedbytes){
trace ("Bytes loaded: "+loadedbytes);
trace("bytes total: "+totalbytes);
}
mymclistener.onLoadComplete = function(target){
var loadProgress = mymcl.getProgress(target);
mytrace(target+"has finished loading");
trace ("Bytes loaded: "+loadProgress.bytesLoaded+" Bytes total: "+loadProgress.bytesLoaded);
}
mymclistener.onLoadInit = function(target){
trace ("MC:"+target+" is good to go");
target._x = 0
target._y = 0;
}
mymcl.addListener(mymclistener);
mymcl.loadClip("http://www.jahdesign.com/pictures/1.jpg", holder);
works nicely... however, i can't get it to load all the pictures! i tried something like this
Code:
for (i=1; i<4; i++){
mymcl.loadClip("http://www.jahdesign.com/pictures"+1+".jpg", holder);
}
all this does is jump to the last picture and load that one.. so it had me thinking, and i did this to see what would happen:
Code:
btn1.onPress = function(){
mymcl.loadClip("http://www.jahdesign.com/pictures/1.jpg", holder);
}
// i made three buttons like this one
and what happens to that is, the pictures get preloaded each time the button is pressed. (meaning instead of preloading the first time and showing up immediately thereafter, it's preloaded every time!)
i'm lost and i really don't know where i'm going with this... could somebody please explain to me what i'm doing wrong and what i need to do? if my problem is clear enough, i want to preload multiple jpegs then display them one after another (like in a slideshow) in a movie clip ("holder" as in the code above)... please? thank you!
View Replies !
View Related
Preloading A Set Of External Jpegs
Alright, so i'm creating a simple photo gallery with about 10 images in it. Instead of having each image load when its button is clicked, i'd like to have all of them preload all at once. I've been trying different code and have had no luck so far. Can anyone give me a code sample i could use? Here is a sample of what i have been trying:
numpics = 10;
for(i = 0; i <= numpics; i++){
container.loadMovie(this["pic" + i + ".swf");
while(container.getBytesLoaded() != container.getBytesTotal()){
loaded.text = "Loading picture " + i;
}
}
but it skips to the second frame and when i go through the gallery each picture is getting loaded individually. Any ideas? Thanks in advanced
View Replies !
View Related
Loading External Jpegs In A Row?
hey guys!
I will try to explain where is my problem.. I am creating XML based image viewer. It will have thumbnails of galleries.. and what am I trying to do is to preload external JEPGS in a row, firstly - first jpeg, when first jpeg is loaded, then load second.. I've created one empty MC called thumbs and trying to attach thumb MC to it(witch has preloader, empty MC as image holder). The problem is that all thumb MCs are attached at first, and then all of them start to preload...
Any ideas how to solve this?
View Replies !
View Related
Help With Loading External Jpegs
Hi, I am trying to load some external jpegs on a site and I have the function done for MX
function loadPic(mc, picName) {
var myFile = "images/"+picName+".jpg";
mc.loadMovie(myFile);
}
I also have the button code done.
button1.onRelease=function() {
loadPic("fam1");
}
I've set up on the main timeline a frame/layer just for actionscript and the button I want to launch the image into the "mc" is down 2 levels. Where do I put the button code (MX) and the mc movie clip? Do they all have to be on the main timeline or can I somehow tell Flash where the button is and how to find the image and the function? I'm new and confused. Please help, I can feel myself going gray as I write.
Thanks,
Adam
View Replies !
View Related
BlendMode On External Jpegs
Hello,
I'm quite new to flash 8, so sorry if I'm doing something stupid. I want to load in external jpegs then change the blendMode. However I can't get it to change the loaded images.
Here a bit of the code:
this.createEmptyMovieClip("mynewclip_mc", 1);
mynewclip_mc.loadMovie("http://rosscairns.com/welcome2.jpg", 1);
mynewclip_mc.blendMode = "add";
Help would be much appreciated!
Ross
View Replies !
View Related
Loading External Jpegs
Good day to all,
Here's my issue. I'm creating a site with Flash MX and want to load all my jpgs dynamicly. Here i s the code I'm using:
on (release) {
loadMovie("test.jpg", "holder") ;
}
The problem is nothing happens. I don't even get any error messages . Any ideas on what's goign on? Thanx for any help ahead of time. NoImage = NoSigImage NoImage = NoImageRes
View Replies !
View Related
Preloading External Jpegs AAAH
I have four thumbnail buttons in _root.infobox.thumb
Button actions
on (release) {
loadMovie("image1.jpg", _root.infobox.Limage);
}
I am trying to load jpegs into this MC _root.infobox.Limage
I can't get a preloader to work out how much of the jpegs loaded.
Do I stick a preloader in _root.infobox.Limage and load the image into (for example) _root.infobox.Limage.jpeg and use _root.infobox.Limage.jpeg.getBytesLoaded() bla bla to get the f-ing thing to work.
Some please help before I hurt the dwarf!
View Replies !
View Related
Detecting External Jpegs... Is This Too Hard?
How can I test for the existence of an external jpeg before loading it?
-------------------------------------------
i=1;
damnImage = i + '.jpg';
if.....<p>
<hr>
if there's no jpg then what?... this is where I need help -- tried getBytesTotal if statement plus numerous other things.<p> Can't find syntax example anywhere!
<hr>
loadMovie(damnImage,_level0.photoPanel.thisPix.cur rentPic);
i++;
} else {
i=1;
loadMovie(damnImage,_level0.photoPanel.thisPix.cur rentPic);
}
------------------------------------------------
Not worried about picayune syntax blems here, just the way to test for existence of the next in a series of jpegs when a button is pressed, so's I don't get a file not found error.<p>
Also setting width and height is very inconsistent. Help there would also be coolio.<p>
Thanx...
View Replies !
View Related
IE Problem Displaying External Jpegs
I have a series of external jpegs (not part of the .fla file) that get loaded one after the other as the user clicks forward and back buttons in a .swf. In Explorer 5.2 (and the version just previous) for Mac OS X and up, sometimes the images load (I can tell from the preloader) and then don't display. If I go on to the next image and then click the back button, the image that formerly didn't load *does* load. So I know it loaded the first time, and was cached -- it just didn't display the first time.
I can't reproduce this problem in Netscape/Mozilla, in Safari, or in Explorer 5 (for Mac OS 9.xx). Has anyone else experienced this, & is there a work-around?
View Replies !
View Related
Problem Linking 2 External Jpegs
Hi Gang,
I’m trying to dynamically load 2 external jpegs into 2 movie clips. (Note the jpegs have to also be dynamically sized). The clips are named mc_before and mc_after. Once loaded I want to fade mc_before to 0 (_alpha) while mc_after._alpha goes to 100, as the image slides across the screen. I can only get it to half work.
Thus far I can load my before1.jpg into a clip off screen.
loadMovie("before1.jpg","mc_before");
I then move to another frame and begin the same process for loading mc_after
loadMovie("after.jpg","mc_after");
When both are loaded I click a button that resizes the clips and sets them to their start positions and then toggle a variable in the both clips enterframes which control the _x and _alpha properties. ie,
onClipEvent (enterFrame) {
if (moveMe == true) {
stepCtr += 1;
if (stepCtr> stepMax) {
moveMe = false;
this._alpha = 0;
} else {
this._x = this._x+10;
// fade alpha to zero not yet coded
trace("STOP BEFORE " + this._x);
}
}
}
The other variables above are initialized in the onClipEvent (load) handler.
The mc_after is similiar but alpha goes to 100.
So I’m stuck on the second dynamically linked jpeg. It never appears even though some trace messages indicate it is there where it should be. Visible and _alpha = 100 etc. (No, it is not a progressive jpeg, I can get it load on its own).
Any suggestions?
TIA,
Randy
View Replies !
View Related
Looping GetBytesLoaded For External Jpegs
I'm building a slide show thingy that loads all the pics from the beginning and then moves through them by changing the alpha. They load fine, on a loop:
for(i=0; i< images; i++)
{
_root.attachMovie("picholder", "pic" add i, i);
setProperty ("pic"+i, _x, 157.5);
setProperty ("pic"+i, _y, 15);
setProperty ("pic"+i, _alpha, 0);
//now load the pics
loadMovie("image"+ i +".jpg", "pic" + i);
}
and they go through alpha with setInterval, but when i try and get their size for a preloader it all goes wrong. I have a little empty clip, called loader that getBytesTotal and getBytesLoaded and can pass it to a preload text box, but BUT and here comes the rub... Only if I name them one by one - i.e. if I try and loop it, it don't work. So, for example:
trace(_parent.pic0.getBytesTotal());
gives me the expected response, while:
for(i=0; i<10; i++)
{
trace (_parent.pic add i.getBytesTotal());
}
gets me nothing, and neither does:
for(i=0; i<10; i++)
{
image = "pic" add i;
trace (_parent.image.getBytesTotal());
}
Can anybody help me or tell me what I'm doing wrong?? cheers, Dan
View Replies !
View Related
Preload Array Of External Jpegs
Using flash MX on a mac.
I'm trying to load 10 external jpegs onto a movie then make a slide show. They need to load before I get going, so I've built 2 functions, "loadnext()" and "loadcheck()". After getting them going with loadnext(0), loadcheck() is then called by a setInterval to check on the loading state of the image0. When it reaches 100%, loadcheck adds 1 to i and calls loadnext() again.
It seems to work locally, trace gives me the sizes of the different images, and the preloading column fills up before moving to the next image. But when I put it online, loadcheck() basically iterates through, happily ignoring whether images are loaded or not. Whats wrong? This is completely mistifying me!
Here's the code, see if you can tell me whats wrong. Its all on a "loader" movieclip.
onClipEvent (load) {
//set some variables
images = 10;
totalLength = 50*images;
startPoint = (900-totalLength)/2;
i = 0;
//function to load pics
function loadnext(i) {
//attach the pic holder movie clip
_root.attachMovie("picholder", "pic" add i, i);
setProperty(_parent["pic"+i], _x, 157.5);
setProperty(_parent["pic"+i], _y, 15);
setProperty(_parent["pic"+i], _alpha, 10);
//now load the pics
loadMovie("image"+i+".jpg", _parent["pic" add i]);
//now get the little preload pics!!put them at different levels from the images !!
_root.attachMovie("load", "loadpercent"+i, (images+i));
setProperty(_parent["loadpercent"+i], _x, startPoint+(50*i));
setProperty(_parent["loadpercent"+i], _y, 620);
trace("loadnext running - for image" add i add ".jpg");
}
//load first pic
loadnext(0);
//function to check if they're loaded
function loadcheck() {
tBytes = _parent["pic"+i].getBytesTotal();
tLoaded = _parent["pic"+i].getBytesLoaded();
ploaded = int(tLoaded*100/tBytes);
trace("function loadcheck running, tBytes: " add tBytes);
trace("loaded: " add tLoaded);
trace("target: " add _parent["pic"+i]);
_root["loadpercent"+i].percentage = ploaded add " %";
with (_root["loadpercent"+i]) {
gotoAndStop(int(tLoaded*100/tBytes));
}
if (tLoaded>=tBytes) {
trace ("Ready : ploaded = "+ploaded+"%");
i++;
if (i<images){
loadnext(i);
}
if (i>= images){
clearInterval(bob);
}
}
}
if (i < images) {
//don't load next picture til first has been fully loaded
//check if its loaded every x milliseconds
bob = setInterval(loadcheck, 3000);
}
}
Like I said - works fine at home in a testing environment, but bugs out on a browser... I'll have a cup of tea and hope someone can help me!
View Replies !
View Related
Centering Loaded External Jpegs
I've seen similar questions to this here, but I couldn't find any clear answers. I am loading external jpegs into my site and I want to get their size (width, height) so I can position them appropriately once they're loaded. How do I get their size and re-position them? I've been trying to use getProperty, but I can't seem to get that to work. Any help would be greatly appreciated - I'm stumped. This is basically how I am loading the jpegs.
Code:
_root.holderMC.loadMovie("products/image.jpg);
View Replies !
View Related
Loading External Jpegs With Preloader
Hi guys and gals. i've looked all over flashkit for an answer to my problem of loading external jpegs with a preloader, but i can't find any concrete answers. i want to be able to encapsulate the process as much as possible. i don't know where i'm going wrong.
function loadpic(url) = {
loadMovie(url, holder_mc)
holder_mc.onData = function() {
this._visible = 0;
if (this. getBytesLoaded>=this.getBytesTotal) {
this._visible = 1
}
}
}
Am i on the right track with this? i see this technique used everywhere, it can't be that complicated. Can someone help please? Thanks in advance.
View Replies !
View Related
FLASH 5 Preload External Jpegs
I have a movie with instance name "holdermc"
I have five different buttons that each one (on release) is loading a different jpeg into the "holdermc" using load movie command.
I would like to preload these external jpegs with a progression bar.
does any one have any source code or tutorials to guide me to.
thanks for the help.
p2studios.com
View Replies !
View Related
Loading External Jpegs W/ Buttons
For example I have a target mc named "target_mc" and I have a image that would load per button. Now I've dealt with regular preloaders, and sound class preloaders, but I'm kinda confused as to how-to preload the jpeg loading percentage into a dynamic textfield, this kinda reminds me of making a basic mp3 preloader as shown below, any suggestions would be great.
sound_1 = new Sound();
sound_1.loadSound("http://themakers.com/sounds/atmospheres_1.mp3", true);
function checkLoad(){
var percentLoaded = (sound_1.getBytesLoaded()/sound_1.getBytesTotal())*100;
progress.text = Math.round(percentLoaded)
message.text = "MEK - Far From Home";
}
checkProgress = setInterval(checkLoad, 1000);
View Replies !
View Related
Swaping External Jpegs In A Swf File
This is a pretty simple task I learned in a class, but have forgotten.
In the class we used actionscript to swap jpeg images in an external folder with a movieclip on the main timeline.
Basically, I have a white background and a white box for a movie clip (or just an empty movie clip). I want to use an actionscript attached to a button that will swap the blank movie clip for images in an external folder.
Can someone give me the script to do this.
I was using:
on (press){
_root.placeHolder = "../images/example/example1.jpg"
I knew this wouldn't work, but I tried anyways.
Thanks for your help.
View Replies !
View Related
Please Help - Preloader For External Jpegs Is Not Actually Preloading
I am trying to create a preloader that will load external jpegs into a movie clip before playing the movie. I came up with the script below to create a preloader that would load two separate jpegs before playing. I thought it was working because when I played it locally, the preloader bar flashed briefly before the movie played, but when I tested it on my server, I realized it wasn't actually loading the jpegs afterall - it was just playing anyway.
Can anyone help me? I've been searching everywhere for a solution! Thanks!!!!
code:
stop();
loadMovie("photos/home/home1.jpg", home1);
loadMovie("photos/home/home2.jpg", home2);
myInterval = setInterval(preloader, 10);
bytes1 = home1.getBytesTotal();
bytes2 = home2.getBytesTotal();
totalBytes = (bytes1+bytes2);
loaded1 = home1.getBytesLoaded();
loaded2 = home2.getBytesLoaded();
loadedBytes = (loaded1+loaded2);
function preloader() {
if (loadedBytes>=totalBytes) {
play();
clearInterval(myInterval);
}
progressBar._xscale = (loadedBytes/totalBytes)*100;
}
View Replies !
View Related
Loading External Jpegs To Be Centered
I am trying to get external jpegs to load into my SWF by using this code:
on (release) {
gotoAndPlay(2);
container.loadMovie("jpegs/people1"+".jpg");
}
-
It loads perfectly BUT - it always aligns to the upper left corner of the MC -
Is there a way to align the container MC with the "CENTER" of the jpeg image ?
View Replies !
View Related
Percentage Preloader For External Jpegs?
Hi,
I made an image gallery from some tutorial that loads all my jpegs externally. Everything works great, except when I preview it online it takes a while for each jpeg to show up. I'm trying to implement a percentage loader to show how much each jpeg is being loaded when the button is pressed so the users know that there's something happening. I tried to use other codes from other tutorials, but I had no idea how to put them in my particular gallery. Need less to say, it's a mess. Can someone please tell me where to put these general codes in my gallery? I've included the whole working gallery with the .fla in the zip.
Also, does anyone know of a good tutorial that shows loading external jpegs with fade in and and fade out, and shows the progress of the jpegs?
Thanks,
Peter
View Replies !
View Related
Loading External Jpegs Into Flash
Hi
i am creating a website for a photographer that has many different Swfs in it and connecting swfs...
i want to add image sliders that load external jpegs. (so he can just add to them without me adding them)
and im having trouble finding script for the right slider...
i have one at the moment
but i have 2 problems with it
1. i have different sized images that i want to load and when i do that they always load to the left corner. so each image position inconsistant, i want each image to load on their centre axis so that each image loads at a centre point. does anyone know how to change that?? i tried moving the imageholder but the images still load at their left axis
2. once i have created my movie slider lets say in fashion.swf
fashion.swf is loaded onto another swf fashionholder.swf
but the images dont show up from fashion.swf. only the buttons it's like its not connecting my images when they are in another SWF.
im stuck and have looked for days and days for some help
thank you in advance
View Replies !
View Related
Preloading Multiple External JPEGs
Does anyone has a working code for preloading multiple jpegs at one time?
I have used the basic method of loading the jpegs in then adding all of their load/total values and using a normal preloader that way, but I end up with a problem where the movie will start before all of the images are loaded. Is there a good way around this problem?
View Replies !
View Related
Preloader For External Swfs/jpegs
hello.
im trying to create a preloader.
i have an empty MC that loads up external jpgs. so i wanna create a prelaodre for that.
im not sure how to go about this. Can anyone direect me the right way pls.
cheers.
ref: www.thekrone.com (visual)
View Replies !
View Related
Loading External Jpegs W/ Borders?
Is this possible? I've tried several different ways with no success. I only want the border to appear along with the image when a thumbnail is clicked, as the area it appears in will normally contain text.
I am loading the Jpegs into a loader component using:
on (release) {
this.loader1.contentPath = "images/1.jpg";
}
I want to avoid having to go through each individual image and add a border using PS.
THANKS!
View Replies !
View Related
Loading External JPEGs With A Fade
I am working in AS3 to load some external jpeg images and have them fade in after they are loaded. I have this code, which does exactly what I want it to if I am loading a .swf file. But when I try to load a jpeg I get an error. What do I need to change to use a jpeg? Any insight would be greatly appeciated. Thanks.
import fl.transitions.*;
import fl.transitions.easing.*;
var myRequest:URLRequest = new URLRequest("image1.jpg");
var myLoader:Loader = new Loader();
myLoader.load(myRequest);
myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, swfLoaded);
function swfLoaded(myEvent:Event):void {
stage.addChild(myLoader);
var myContent:MovieClip = myEvent.target.content;
TransitionManager.start(myContent, {type:Fade, direction:Transition.IN, duration:9, easing:Strong.easeOut});
}
Edited: 12/19/2007 at 05:19:57 PM by backpages
View Replies !
View Related
How Webservers Handle External Jpegs
Hey everyone,
I had a question about how the webservers serve up the jpegs in a flash presentation. The scenario is this: I have an online portfolio for a company that loads external jpegs from an xml file. This is because the content of the portfolio changes often. My problem is that my preloader does not work the way it is supposed to on the web (it works perfect on my computer). The presentation works like this:
//Load each jpg into a MovieClip
for(var i:Number=1; i<=artTotal; i++) {
this.createEmptyMovieClip("mcArt"+i, this.getNextHighestDepth());
this["mcArt"+i]._alpha = 0;
mcLoader.loadClip(xmlArt.childNodes[(i-1)].firstChild.toString(), this["mcArt"+i]);
}
// Attach Preloader
var oInit:Object = {_x:200, _y:140, totalMC:artTotal};
this.attachMovie("RadLoader", "preLoad", this.getNextHighestDepth(), oInit);
this.preLoad._alpha = 0;
When all the movieclips with the jpegs in them begin to download, I show the preloader and show the progress from there. The problem is that is seems that the webserver downloads about 2 jpegs at a time and so I never get the information from the last jpegs until to late. The preloader shows after the first couple jpegs have completely downloaded. Is there anyway to get the filesize information of the later jpegs earlier, or force the webserver to start the download of all the jpegs at the same time? I am using Flash MX Pro ver. 7.0.1.
Here is the preloader code that is used:
if(this._parent["mcArt"+totalMC].getBytesTotal() > 0) {
for(var i:Number = 1; i<=totalMC; i++) {
loadBytes += this._parent["mcArt"+i].getBytesLoaded();
totalBytes += this._parent["mcArt"+i].getBytesTotal();
}
percent = Math.floor((loadBytes/totalBytes)*100);
strTotal = Math.floor(totalBytes/1024).toString();
this.loadText.text = percent + "% of " + strTotal + "K";
Any help would be very much appriecated,
Rocco
View Replies !
View Related
Loading External JPEGs & Fading
I feel like an idiot. I'm just playing around with ActionScript, and I'm trying to create a title page where two movie clips fade in. One is a dynamic text movie clip, the second is an image that is loaded.
My code is this:
Code:
function fadeIn():Void {
this._alpha += FADESPEED;
if (this._alpha>100) {
this._alpha = 100;
delete this.onEnterFrame;
}
}
var SITENAME:String = "title text";
var FADESPEED:Number = 10;
title_mc.title_txt.text = SITENAME;
title_mc._alpha = 0;
title_mc.onEnterFrame = fadeIn;
image_mc.loadMovie("image0.jpg");
image_mc._alpha = 0;
image_mc.onEnterFrame = fadeIn;
I've traced the heck out of this, so all I know is that image_mc seems to only generate a single onEnterFrame event and then stops. What obvious, basic Flash point am I missing here?
It seems that if I comment out the .loadMovie line, the placeholder movie clip fades in properly, so obviously there is something about onEnterFrame events and loadMovie that I don't know.
View Replies !
View Related
How Do I: Load External Jpegs Into MX With Loading Bar
Hi,
I am constructing this site which will have 8 topic areas, each of which will have 8 jpegs that I would like to have open in a picture box that will remain in the same position for each topic area.
I would like people to have the option of choosing which jpeg to view so there will be 8 buttons linked to each of the relevant jpeg for each topic area. Make sense?!?
Any ideas what the best way of doing this is?
Thanks!
Craig
View Replies !
View Related
Preloading External Jpegs Or SWFs
Hey,
So I found this tutorial which shows how to Preloading External Jpegs or SWFs with components
http://www.webwasp.co.uk/tutorials/b...s/tutorial.php
but I really want to just use my own preloader..
Is there a sample or tutorial out there?
Thanks!!!!
View Replies !
View Related
Using Preloader UI Component To Load External Jpegs?
Hi all
I have the UI Components 2 set and (like lots of people) am confused about how to modify the actionscript to get them to do what I want. And I HAVE looked at the Reference in Flash, and the actionscript dictionary, etc, as people suggest, but I'm not exactly au fait with actionscript.
What I have at the moment are thumbnails that, once clicked on, do a loadvariablesnum of jpgs into an empty movie clip. I know I could put each jpg into it's own swf and put a preloader in each movie and load THOSE in, but that seems a bit extreme. How do I configure the preloader UI component to show percentage loaded of the jpgs?
Sorry, I know this sort of thing is probably being asked a lot, but I've done searches on here, and in google, and been to the Macromedia site, all to no avail. I wish they'd write some docs for us newbies
Fletch
View Replies !
View Related
Arrays, Alpha Values And External Jpegs
I have just run up against an error that I just can't work out, and I think I becoming blind to the code, I've been looking at it so much...
I have a series of external jpegs that load up in a series of external movie clips. when they are all loaded the alpha value of the first one gradually climbs up to 100, then goes down while the alpha values of the number 2 climbs. The pics fade in and out. The whole thing was working a few days ago, now suddenly its not - can anybody spot the bug? Basically now, the first pic just won't appear. I've made it appear by setting alpha to 100, but i can't get it take part in the fading game. Here's the code that gets called from a movie clip called 'loader':
onClipEvent (load) {
trace("got to second frame");
//lets get it to change the pics after x time
//how long (in milliseconds?)
t = 60000;
//how fast does the fader recall?
f = 100;
//set k to 0 before we starting, boy.
k = 0;
//when all pics are loaded set alpha to 0;
if (k == 0) {
//on getting to this frame it sets alpha of all pics to 0
for (i=1; i<images; i++) {
setProperty(_level0["pic"+i], _alpha, 0);
}
}
//here's the function that fades de pictchas
function fader() {
if (a<100) {
setProperty("_level0.pic"+k, _alpha, a);
a = a+2;
if (k != 0) {
setProperty("_level0.pic"+(k-1), _alpha, z);
z = z-2;
trace("alpha outgoing"+z);
} else {
z = 0;
}
trace("alpha incoming"+a);
trace("_level0.pic"+k);
_root.loadbox = "image "+(k+1)+" visibility: "+a+"%";
if (a>=99) {
//stop the fader
clearInterval(fader_it);
//increase k
k++;
}
}
}
//here's the function I'll call with setInterval
function telltime() {
//knock alpha values down and up a bit so it don't take so long
a = 20;
z = 80;
setProperty("_level0.pic"+k, _alpha, a);
setProperty("_level0.pic"+(k-1), _alpha, z);
//start the fader
fade_it = setInterval(fader, f);
trace("value of k is: "+k);
}
//get the first instance of telltime running, the others will be
//kicked off by setInterval
//telltime();
if (k>=images) {
k = 0;
}
changer = setInterval(telltime, t);
}
I'm stumped!!
View Replies !
View Related
|