Preload Dynamically Loaded Jpegs And Fade
I have been researching the forums on information to do this. To be quite honest, I'm still somewhat of a Newb so I'm having difficulty piecing everything together. Here is what I am looking to do!
I would like to preload 10 dynamic jpegs into a movieClip. I want the getBytesTotal function active, showing the progress in the swf preload. I don't want the movie to start playing until the jpegs are loaded. Once they are loaded, I would like them to fade from one another, and loop.
I was going to simply program it within flash, but that's a heavy file, I do know how to simply load dynamic images, but I have no idea how to interact it with a preloader and AS to make them fade.
Any help would be appreciated, if anyone is willing to post a sample file, I usually can figure it out from there.
Thanks
ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)
Posted on: 11-22-2006, 03:29 AM
View Complete Forum Thread with Replies
Sponsored Links:
Preload Dynamically Loaded Jpegs And Fade
I have been researching the forums on information to do this. To be quite honest, I'm still somewhat of a Newb so I'm having difficulty piecing everything together. Here is what I am looking to do!
I would like to preload 10 dynamic jpegs into a movieClip. I want the getBytesTotal function active, showing the progress in the swf preload. I don't want the movie to start playing until the jpegs are loaded. Once they are loaded, I would like them to fade from one another, and loop.
I was going to simply program it within flash, but that's a heavy file, I do know how to simply load dynamic images, but I have no idea how to interact it with a preloader and AS to make them fade.
Any help would be appreciated, if anyone is willing to post a sample file, I usually can figure it out from there.
Thanks
View Replies !
View Related
Preload Jpegs Of A Dynamically Attached Mc
Hi all. Well onjce again I have been scanning the threads and cant find a direct solution to my problem, or at least I dont know how to implement it if I have :s Anyway what I am doing is this.
I am doing the website for a furnitre company that has a large product catalog, around some 200 photos.
In the main swf. I have all the thumbs and when I click on one thumb depending on what category it is, it will load the external swf. and also a variable that says which photo to show (which frame to go to).
for examplle if I click on a thumb of a bed it will load beds.swf with a photo value of 6, which will go to frame 6 in the beds.swf.
Now in beds.swf I am attaching a movie clip with an instance name of beds dynamically into an mc called photo_holder using the attachMovie function.
The beds movie clip has 40 - 50 keyframes with an mc on each frame which then holds the bitmap. So the target to one photo would be _root.photo_holder.beds_attached.bed1
Then I have a gotoAndStop(photo); action where photo is the variable I loded from level0.
Ok the problem is the following.
I can add a preloader onto a scene before everything, however, I only know how to make the preloader load all the photos. I dont want to do this cause if the user wants to view one photo, they have to wait for all 50 high res photos of beds to load, of course, they wont have to wait for the next bed they click on but its still a pain.
I tried doing some tests last night using the getBytesTotal() function but it only seems to return a value if what I am targetting is in the same frame number where I have that action. Otherwise it returns undefined. Since this clip is loaded dynamically, I have no idea how to preload something that hasnt been called on yet. Or in other words, get the Total Bytes of a photo before showing it, or whatever. Its kinda hard to explain, does anybody have any ideas?
I tried _root.photo_holder.beds.bed1.getBytesTotal(); but it always returns undefined.
Thank you very much
Ted
View Replies !
View Related
Preload Jpegs Of A Dynamically Attached Mc
Hi all. Well onjce again I have been scanning the threads and cant find a direct solution to my problem, or at least I dont know how to implement it if I have :s Anyway what I am doing is this.
I am doing the website for a furnitre company that has a large product catalog, around some 200 photos.
In the main swf. I have all the thumbs and when I click on one thumb depending on what category it is, it will load the external swf. and also a variable that says which photo to show (which frame to go to).
for examplle if I click on a thumb of a bed it will load beds.swf with a photo value of 6, which will go to frame 6 in the beds.swf.
Now in beds.swf I am attaching a movie clip with an instance name of beds dynamically into an mc called photo_holder using the attachMovie function.
The beds movie clip has 40 - 50 keyframes with an mc on each frame which then holds the bitmap. So the target to one photo would be _root.photo_holder.beds_attached.bed1
Then I have a gotoAndStop(photo); action where photo is the variable I loded from level0.
Ok the problem is the following.
I can add a preloader onto a scene before everything, however, I only know how to make the preloader load all the photos. I dont want to do this cause if the user wants to view one photo, they have to wait for all 50 high res photos of beds to load, of course, they wont have to wait for the next bed they click on but its still a pain.
I tried doing some tests last night using the getBytesTotal() function but it only seems to return a value if what I am targetting is in the same frame number where I have that action. Otherwise it returns undefined. Since this clip is loaded dynamically, I have no idea how to preload something that hasnt been called on yet. Or in other words, get the Total Bytes of a photo before showing it, or whatever. Its kinda hard to explain, does anybody have any ideas?
I tried _root.photo_holder.beds.bed1.getBytesTotal(); but it always returns undefined.
Thank you very much
Ted
View Replies !
View Related
Alpha Fade In On Jpegs Loaded Into Empty Mc's
I wanna rollover a button and have a jpeg load from my drive... into an empty movie clip. How can I do this without a tween? I have over 100 of these pics and I don't wanna do separate swfs for each. Thanks - Chris
here's what i got so far?
on (rollOver){
_root.empty_mcA.b1.gotoAndPlay(2);
_root.empty_mcA.pr.loadMovie("BAR~1.jpg");
stop();
View Replies !
View Related
Help With Dynamically Loaded Jpegs
I am using this tutorial to load jpegs into container mc's
http://www.kirupa.com/developer/mx/loading.htm
The images show up on computers with flash player 8, but not on computers with flash player 7 or below.
any idea why?
and how do i make them show up in flash player 7.
thanks
View Replies !
View Related
Dynamically Loaded Jpegs
I loaded a picture dynamically but it looks very sharp and stands out too much. Is there a way that i could put a border around the picture (probably a mask) to help it to blend in more
heres the code i used to genreate the jpeg.
Quote:
_root.createEmptyMovieClip("imageHolder1", 200);
imageHolder1._x = 160;
imageHolder1._y = 55;
loadMovie("digicel.jpg", "imageHolder1");
stop();
View Replies !
View Related
Properties On Jpegs Loaded Dynamically
Hello,
Is there a way to change the properties of a jpeg using loadMovie()? The properties I want to change are the width and height of the picture.
For example, I am loading a picture using this stmt.
loadMovie("Cinema-"+whichPic+".jpg", "square");
where whichPic is simply an integer number. Is there a way to duplicate the mc square and then resize it so that it serves as a thumbnail?
Thanks for your help,
Fabocp
View Replies !
View Related
Preloading Dynamically Loaded JPEGs?
I have three movie clips that each dynamically load a JPEG...i have the code that loads the JPEGs placed on one of the first frames...the problem is that there is a pause or delay...until the JPEGs are loaded...which leaves the screen with a void...and makes you think there is no content...how can I put a preloader that will show the user that the images are being loaded?
thanks,
diabolicalbutter
View Replies !
View Related
Need To Scale Dynamically Loaded Jpegs
Hi,
I'm dynamically loading movies (jpegs) and attaching them to another movie one at a time. Since the jpegs are all different sizes, is there a script I can use to scale all of them to the size of the object that I'm attaching them too? I've been trying to use:
code:
_root.onEnterFrame = function() {
loadMovie("../images/image"+whichPic+".jpg", "screen");
this.screen["image"+whichPic+".jpg"]._x = screen._x;
with no success. The image (there's only one at the moment) appears but it's way too big and needs to be scaled to the "screen" object it's attached to.
TIA,
aaroneousmonk
View Replies !
View Related
Dynamically Loaded Jpegs---PROBLEMS
Hey guys
I'm loading JPEGs dynamically from a DB using PHP and LoadVars in FMX. I get the images to load perfectly. but i'm having a problem moving them into proper placement.
Goal= I'm trying to load all the images into a specific area and have them dynamically resized so they all fit within the area (another MC).
I'm creating empty movie clips and loading the jpegs into them.
Problem = The created MCs wont MOVE OR RESIZE!! They'll place properly, but no animation!
i'm using this function for motion:
MovieClip.prototype.slideTo = function(x, y, speed) {
//set up targets and speed variable
this.targetX = x;
this.targetY = y;
this.speed = speed;
//create onEnterFrame function
this.onEnterFrame = function() {
//take care of motion
this._x += (this.targetX-this._x)/this.speed;
this._y += (this.targetY-this._y)/this.speed;
// check if near target
if (Math.abs(this.targetX-this._x)<0.2 && Math.abs(this.targetY-this.y)<0.2) {
this._x = this.targetX;
this._y = this.targetY;
}
};
};
//
//
//and this to place the photos
//
function getPhotos(List) {
x = 0;
for (var item in List) {
//loop thru and get images, place them in
myitem = List[item].filename;
mypic = _root.createEmptyMovieClip("image"+x, x++);
loadMovie("thumbs50/"+myitem+".jpg", "image"+x);
trace (_level0.mypic._width);
_root["image"+x]._width = 100;
_root["image"+x]._height = 100;
_root["image"+x].slideTo(someX, someY,someSPEED);
}
}
where someY, someX, someSPEED, will be generated by another script.
Help!
my code is a little sloppy, its still in the works....
i may be overlooking something small, please help.
You can look at what i mean about the photo placement here, I'm trying to recreate this in flash MX: Distortion Photography
(there's a JS error on the page, click thru it).
Thanks in Advance
Jbot
View Replies !
View Related
Problem With Dynamically Loaded Jpegs
i've created a site for a photographer using dynamically loading jpg's to minimize file size. The site works fine on most of the computers i've checked it on, but on some computers, especially macs, the WHOLE site goes down when the first jpg unloads...
does flash player 6 deal with loading and unloading jpegs in the same way as 7? might this be my problem?
View Replies !
View Related
Resizing Dynamically Loaded Jpegs
Hi,
I am loading JPEGs into an MC called pictureHolderMC using "loadMovie" without a problem. But, the JPEGs are different sizes and I need them to be a constant width (100 pixels) so I am using the code below to set this:
Code:
_root.pictureHolder._width = 100;
But when I add this code the JPEG disappears from "pictureHolderMC". I know that "pictureHolderMC" is still there as I put a background colour block in it which still shows up, but without the JPEG.
Ultimately, I will write a function that also sets the "_height" property in proportion, but I need to get the basics of controlling the size to work first.
Any suggestions as to how o achieve this would be much appreciated.
View Replies !
View Related
Centering Dynamically Loaded JPEGs
I know this has been asked a million times- and trust me, I tried everything I could find in these forums, but nothing seems to be working right for me. I have a gallery that dynamically loads JPEGs from an XML file. It uses next/previous buttons to flip through the code.
The main code is:
ActionScript Code:
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
}
firstImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images.xml");
// ///////////////////////////////////
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
prevImage();
} else if (Key.getCode() == Key.RIGHT) {
nextImage();
}
};
Key.addListener(listen);
previous_btn.onRelease = function() {
prevImage();
};
next_btn.onRelease = function() {
nextImage();
};
// ///////////////////////////////////
p = 0;
this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
preloader._visible = false;
if (picture._alpha<100) {
picture._alpha += 10;
}
}
};
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
}
}
}
function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
}
}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
desc_txt.text = description[0];
picture_num();
}
}
function picture_num() {
current_pos = p+1;
pos_txt.text = current_pos+" / "+total;
}
I tried using the following statement in the actually MC called picture
ActionScript Code:
onClipEvent(enterFrame){
if (!this.loaded && this.getBytesLoaded() > 0 && this.getBytesLoaded() == this.getBytesTotal()){
this._x -= this._width/2;
this._y -= this._height/2;
this.loaded = true
}
}
It works for the first image and then does not update when the image changes. I also tried moving minor variations of that code around in the main code blurb above, but it does nothing there. Is there something I can add for it to update on change?
Thanks!
View Replies !
View Related
Getbytesloaded, Dynamically Loaded Jpegs Etc.
hi all
i have searched the site and read all the links on dynamically loaded jpegs listed in cyanblues post above, but i'm still not understanding where i'm going wrong. i'd be grateful for advice:
here's what i'm doing, 1 & 2 work fine but 3 is where it all stop working as I would expect:
1. duplicate the original:
------------------------
ActionScript Code:
for (Mainnumber=0; Main number<(NumberOfItems); Mainnumber++) {
this.originalMain.duplicateMovieClip("main" + Mainnumber, Mainnumber);
_root["main" + Mainnumber]._y = (Mainnumber * 75) + 1;
}
2. load jpeg to the symbol: (this script attached to the originalMain)
------------------------
ActionScript Code:
onClipEvent (load) {
myname = this._name;
myMainnumber = myname.charat(4);
barcodenum = _parent.items[myMainnumber];
mainpicfilename = "mainphotos/"+barcodenum+".jpg";
loadMovie(mainpicfilename, this.mainphotos);
}
3. to check the bytes loaded, i am trying this on the next frame
----------------------------------------------
(this just to debug; i would actually have a while {} loop waiting for them all to returnt that they are loaded)
to check just one of the images, inside main1, main2 or main3:
ActionScript Code:
trace(_root.TargetMC.main1.mainphotos.getBytesTotal());
trace(_root.TargetMC.main2.mainphotos.getBytesTotal());
trace(_root.TargetMC.main3.mainphotos.getBytesTotal());
but these always returns a value of 12 -- it must be the byte size of the symbol itself not the jpeg (which is about 100k), even if i loop it 100 times to simulate some wait time....
so my question is how do i do getBytesTotal() (and of course getBytesLoaded() ) on the jpeg so that I can evaluate the difference...?
does it just not work on dynamically loaded jpegs?
i would be grateful if someone could explain the exact procedure for a. dynamically loading the jpegs; b. checking that they are loaded -- i thought i knew what i was doing but, first, it didn't work and second, when i read through the posts mentioned above it really threw me.....
thanks.......
View Replies !
View Related
Problem With Dynamically-loaded Jpegs
i recently completed a site that dynamically loads jpegs and when viewed in a browser, the pics are SO blurry. i'm confused because i have another site, set up the same way, and the pics aren't blurry at all.
the pics for the two sites were taken by two different digital cameras, but i optimize them the same way in photoshop.
here's blurry (go to the PHOTOS section):
http://www.thegaragebar.net
here's not blurry (go to FOR RENT section):
http://www.urbanrestorationsproject.com
what am i doing wrong with the first site?
View Replies !
View Related
Crossfades On Dynamically Loaded Jpegs - Any Tutes Out There
Hi. I am working on a click through type slide show (photographers site). All the images are being loaded in dynamically. At present the images are fading out- then fading in, done by actionscript. All works fine. However what I really need is to cross fade the images. I have searched the forums but all to no avail although the question of crossfades did come up a few times but with no answers. I had a look at the source code that was available from www.whatdoiknow.org/archives.shtml. However I need the images to be click though not automatic and i don't know enough as to how to alter that code. What I did manage to pull from the code is that I might need to create 2 mc containers and load the images into varying levels. That is my theory but I have no idea how to implement this. If I am somewhere warm with this, or if any one can help with code, or if anyone can point me to a tutorial I would be very very very grateful.
thanks in advance
View Replies !
View Related
Problem With Preloader For Dynamically Loaded Jpegs
I use this code to display the progress of the jpeg im loading dynamically into my empty movieclip, bildholder.
bytes_loaded = Math.round(bildholder.getBytesLoaded());
bytes_total = Math.round(bildholder.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
loadpic = "_loading_product "+Math.round(getPercent*100)+" % loaded";
if (bytes_loaded >= bytes_total) {
gotoAndPlay("done");
}
The problem is that I cant get the line:
bytes_total = Math.round(bildholder.getBytesTotal());
to work. It seems that Flash have a problem getting the TotalBytes for a dynamically jpeg.
When i set bytes_loaded to a fix number, say 5000, then the preloader works but not wgen I use the command .getBytesTotal()
Can anyone tell me why or how I can solve this problem.
View Replies !
View Related
Problem With Preloader For Dynamically Loaded Jpegs
I use this code to display the progress of the jpeg im loading dynamically into my empty movieclip, bildholder.
bytes_loaded = Math.round(bildholder.getBytesLoaded());
bytes_total = Math.round(bildholder.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
loadpic = "_loading_product "+Math.round(getPercent*100)+" % loaded";
if (bytes_loaded >= bytes_total) {
gotoAndPlay("done");
}
The problem is that I cant get the line:
bytes_total = Math.round(bildholder.getBytesTotal());
to work. It seems that Flash have a problem getting the TotalBytes for a dynamically jpeg.
When i set bytes_loaded to a fix number, say 5000, then the preloader works but not wgen I use the command .getBytesTotal()
Can anyone tell me why or how I can solve this problem.
View Replies !
View Related
Fade Out Preload Bar When Loaded
Hi,
I would like to create a preload bar that fades out when the content is loaded. Here is the code I have so far, it works ok but the fade out is too long. I've tried tinkering with the code further, but it starts to fade out half way through.
onClipEvent (enterFrame) {
loading = _parent.getBytesLoaded();
total = _parent.getBytesTotal();
percent -= (percent-((loading/total)*100))*.25;
per = int(percent);
percentage = per+"%";
loadBar._width = per*4.5;
if (percent>100&& _this._alpha <= 20) {
_parent.gotoAndStop(2);
}else{
this._alpha -=1;
}
}
Any help greatly appreciated!
View Replies !
View Related
Fade Out Preload Bar When Loaded
Hi,
I would like to create a preload bar that fades out when the content is loaded. Here is the code I have so far, it works ok but the fade out is too long. I've tried tinkering with the code further, but it starts to fade out half way through.
onClipEvent (enterFrame) {
loading = _parent.getBytesLoaded();
total = _parent.getBytesTotal();
percent -= (percent-((loading/total)*100))*.25;
per = int(percent);
percentage = per+"%";
loadBar._width = per*4.5;
if (percent>100&& _this._alpha <= 20) {
_parent.gotoAndStop(2);
}else{
this._alpha -=1;
}
}
Any help greatly appreciated!
View Replies !
View Related
Movie Clip With Dynamically Loaded JPEGs Not Responding To Mouse Clicks
I have a movie clip called pictureframe that I am loading JPEGs into sequentially with a movieClipLoader. I want to be able to click on each JPEG and go to a different web site, but it's not working. The MC is not accepting mouse clicks. Here's the code I'm using:
Code:
this.pictureframe.onRelease = function() {
getURL("http://www.a_web_site.com");
}
If this were a normal movie clip with some content "hard coded" into it, it would work fine. It's gotta have something to do with the fact that it's a movie clip that's empty until it gets a JPEG loaded into it.
View Replies !
View Related
How To Preload Dynamically Loaded Images?
I used this wonderful example of the MCL, courtesy of Neil Webb, to load images dynamically into my swf. My only problem is that since each image is loaded dynamically, any preloader I use does not report the correct total bytes.
What I need is a preloader that will show the loading status to each image as it is being loaded.
I tryed this with the code below, but it seems to only show the status of which ever clip is passing through the function instead of preloading each image in order.
Do I understand this right? is what i need possible?
ActionScript Code:
//************
//define MovieClipLoader
myMCL = new MovieClipLoader();
myListener = new Object(); //define listener
myListener.onLoadStart = function(targetMC) {
totalBytes = targetMC.getBytesTotal();
_root.preloader.total.text = "Total bytes "+totalBytes;
_root.preloader.bar._visible = true;
};
myListener.onLoadProgress = function (targetMC, bytesLoaded, bytesTotal) {
percentBytes = Math.round((bytesLoaded/bytesTotal)*100); // store percentage of byte loaded int oa varible called percentBytes
downloadedBytes = bytesLoaded;
remainingBytes = (bytesTotal - bytesLoaded);
_root.preloader.percent.text = percentBytes+"%";
_root.preloader.downloaded.text = downloadedBytes+" bytes downloaded";
_root.preloader.remaining.text = remainingBytes+" bytes remaining";
_root.preloader.bar._xscale = percentBytes;
};
myListener.onLoadComplete = function(targetMC){ //set the onComplete function on listener
targetMC._alpha = 0;
targetMC.onEnterFrame = function() { //fade in clips when they are done.
if (targetMC._alpha <= 99) {
targetMC._alpha += 17;
} else {
targetMC._alpha = 100;
delete targetMC.onEnterFrame;
}
};
};
//****************************
myMCL.addListener(myListener); //associate listerer with MCL object
View Replies !
View Related
How To Preload Dynamically Loaded Images
i'm working on a photo gallery with flash mx.. the problem is i'm using quite a lot of photos.. and they have to be updated from time to time..
I got help from this website.. on the tutorial on how to dynamically load images into the gallery.. this way.. i can change the images whenever i want... I've combined this tutorial with the infinite menu tutorial ..so i have a scrollingbar(the buttons itself are dynamically loaded images) as buttons for dynamically loaded images..
the problem is.. these pictures are not loaded during preloading.. hence.. images in the scrolling bar are shown empty initially.. and pop up one by one later..
the more efficient way would be for all the images to preload first before the gallery starts.. i've been searching through the internet for such tutorials..found some really close one... but i don't quite understand them.. i'm still new to flash.. in fact.. this is my first flash website... and i have little understanding of actionscript...
i hope u can help me with this
View Replies !
View Related
Preload Images Dynamically Loaded Into Flash
Can I preload images I am dynamically loading into Flash? I am reading an XML document. From this XML document, I am reading the sources of several images that I loading to a movie clip that I am creating dynamically. However, the images load a little slow. Is there a way that I can preload the images even though they aren't in my library?
Thanks,
Lacy
View Replies !
View Related
Fade A Dynamically Loaded Image
Hi!
Is it possible to fade in an image that is loaded in a movieclip.
I just want to load one image in one movieclip, but the image must be loaded from the outside.
I use this code now
--------------------
loadMovieNum("2.jpg", 1);
--------------------
and it works fine. It would look nicer if the image was fading in, though.
Does anyone have a codeexample?
thanx
View Replies !
View Related
[F8] Fade In Dynamically Loaded Images
Yea so i have a functioning dynamic image gallery with thumbnail buttons using
Quote:
on (release) {
loadMovie("images/pic1.jpg","img_container");
}
i want the images when loaded to fade in - and When another thumbnail is clicked i want the dynamic picture that is loaded to fade out?
is there actionscript to do this.?
AC
View Replies !
View Related
Fade In And Out Dynamically Loaded Images
OK, I have a flash header for my new site which has an effect of transitioning images with a flash in between to mock a camera flash. I have achieved this by use of the timeline, however, i dont want to use the timeline. what i have done is created a .php file which passes the location of 10 images to flash using var names img1, img2, img3, etc. I then created 10 mcs, 1, 2, 3, etc, and 10 graphic symbols, 1, 2, 3, etc. I then dynamically loaded the images into the mcs which i then placed inside of the graphic symbols. so in the end i have 10 graphic symbols which hold 10 dynamically loaded images. what i want to do is mimic the effect i have now, but using AS. I also want it to check and see if there are actually 10 images, right now i am only using 5, but i want to be able to add/remove/update the images without editing the .fla file itself. so i was thinking in there i would just need to add...
Code:
if (img1 != undefined) {
*fade script*
}
for each image to check if there is data there, if not, then it should just skip that image. that way if i only have 5 images, it will show only those 5 five and not fade in a non image. anyone help me with this please?!?!?
here is the link to the site with header
http://s170193323.onlinehome.us/MKPortalSMF/index.php
and this is my php file passing onto flash
http://s170193323.onlinehome.us/MKPo...lashimages.php
and this is my existing AS
Code:
myVars = new LoadVars();
myVars.onLoad = function()
{
img1_mc.loadMovie(this.img1);
img2_mc.loadMovie(this.img2);
img3_mc.loadMovie(this.img3);
img4_mc.loadMovie(this.img4);
img5_mc.loadMovie(this.img5);
img6_mc.loadMovie(this.img6);
img7_mc.loadMovie(this.img7);
img8_mc.loadMovie(this.img8);
img9_mc.loadMovie(this.img9);
img10_mc.loadMovie(this.img10);
}
myVars.load("http://s170193323.onlinehome.us/MKPortalSMF/flashimages.php");
View Replies !
View Related
Fade In And Out Dynamically Loaded Images
I currently have achieved a look on my header using the timeline to fade in and out a series of photographs and make them flash like a camera flash between each photo. I have created a .php file to pass on the location of up to 10 files to flash using img1, img2, img3, etc as the var names. I would like to be able to change/replace the existing files so they would change in the header without having to edit the .fla file itself. little help? thanks!
this is the .php file....
Dynamic Images .php for Flash
this is the location of the header....
The Images On The Right
View Replies !
View Related
Fade In Dynamically Loaded Image
Hey guys,
How can I upload images and make them fade in, stop, and when another button is clicked fade out, followed by the next images fade in?
I have no problems uploading an image to the stage
Code:
var imageRequest:URLRequest = new URLRequest("advert.jpg");
var imageLoader:Loader = new Loader();
imageLoader.load(imageRequest);
addChild(imageLoader)
imageLoader.x = 144;
imageLoader.y = 40;
Thanks in advance
View Replies !
View Related
Fade In And Out Dynamically Loaded Images
I currently have achieved a look on my header using the timeline to fade in and out a series of photographs and make them flash like a camera flash between each photo. I have created a .php file to pass on the location of up to 10 files to flash using img1, img2, img3, etc as the var names. I would like to be able to change/replace the existing files so they would change in the header without having to edit the .fla file itself. little help? thanks!
this is the .php file....
Dynamic Images .php for Flash
this is the location of the header....
The Images On The Right
View Replies !
View Related
Fade In/out Effect On Dynamically Loaded Text Box With 'timer' Already Attached
First of all, please note that when I talk about a timer, I am referring to a OnEnterFrameEvent that dynamically loads new text in the text box every 350th frame.
Now, I want the text to load with a fade effect instead of the usual 'ba' effect which happens in one frame.
Currently, I have two text boxes located in a movieclip, both load dynamic text that was read into an array from an xml file at start up, the one loads the header of the message and the other loads the content.
I have put them both in a movieclip, 'latest_mc'. This is my code:
Code:
this.latest_mc.addEventListener(Event.ENTER_FRAME, loadNewLatest);
function loadNewLatest(e:Event):void {
if (loadedLatest) {
timer++;
// executes on 350th frame and then resets timer
if (timer == 350) {
timer = 0;
count++;
if (count < latestHeaderArray.length) {
loadLatest(count);
}
else if (count == latestHeaderArray.length) {
count = 0;
loadLatest(0);
}
else if (count < 0) {
count = 0;
}
}
}
}
function loadLatest(index:Number):void {
// gets index from function and loads relevant array item
this.latest_mc.gotoAndPlay("fadeOut");
this.latest_mc.latestHead_txt.text = latestHeaderArray[index];
this.latest_mc.latestCont_txt.text = latestContentArray[index];
this.latest_mc.gotoAndPlay("fadeIn");
}
Can anybody please help me with this? I know something has to happen in loadLatest(index:Number) to bypass the event handler, letting it perform over more than one frame.
View Replies !
View Related
Problem With Loading Jpegs Dynamically Into Dynamically Created MC's
hey all. I got a problem with loading jpegs dynamically into dynamically created MC's. I've been using NEIL WEBB's tutorial on dynamic creation with event handling through the LISTENER component, which you can see here http://www.actionscript.org/tutorial...MX_2004_Part2/
I have slightly altered the script to accomodate the fact that I want to attach a movieclip with text fields and image holders within it, but the code aint too different I don't think.
Code:
stop();
myMCL = new MovieClipLoader(); //define MovieClipLoader
myListener = new Object(); //define listener
myListener.onLoadComplete = function(targetMC){ //set the onComplete function on listener
trace("targetMC = " + targetMC._name);
targetMC.onPress = function() { //define onPress within function
}
}
//****************************
function initClips(){
//trace(_global.gallery_cnt);
for (i=1; i<=_global.gallery_cnt; i++){
//trace("Attaching Clip - " + i);
this.gallery_TN_holder.attachMovie("TN_Holder", "TN_Holder" + i, i); //attach the movie
this.gallery_TN_holder["TN_Holder"+i]._x = (i-1)*90; //spacing
this.gallery_TN_holder["TN_Holder"+i].TN_Text.text = _global.gallery_array.description;
[i] [i]myMCL.loadClip(_global.gallery_array.main_thumbnail ,this.gallery_TN_holder["TN_Holder"+i].TN_Image);
//load images into clip
}
play();
}
//****************************
myMCL.addListener(myListener); //associate listerer with MCL object
initClips();
The first line ("trace") in bold outputs
Quote:
targetMC = TN_Image
targetMC = TN_Image
which you can see is resulting from the second bold line.
Basically I need some direction with this as to how to reference the clip target for the loaded JPEG, as my output in the movie shows the attachMovie works, as does the text change within the individual "TN_Holder" clips. What the hell am i doin wrong, cos my eyes are kinda starting to go kinda funny looking at this stuff!!!!!
Thanks for any help!
View Replies !
View Related
Preload Dynamic Jpegs From Cd.. Help :(
Hi! I'm a php programmer who is trying desperately to work in Flash MX. I understand the basic concepts of programming but find myself stumbling over the way Flash itself works.
I created a slideshow following a tutorial on kirupa.com (http://www.kirupa.com/developer/mx/photogallery.htm) and made my own edits to it - feeling very proud of myself... Basically the code names a directory (images/), sets an array with names of the jpegs in that directory, then when the user hits next or previous - it goes to the images/ directory and grabs the appropriate photo.
I set up a main swf that calls 3 different photogalleries. It all works great and is very lightweight ...
The problem is I want this to run off cd. I made it into an exe, burned it, and found a flaw. Every time it changes photos it goes back to the cd.
My question is, can I dynamically load the photos into the cache? Or something? I want to be able to reuse this code by simply changing the name of the directory and jpeg names....
I was told in tek-tips forum :
"Flash cannot write files locally without a SSS (Server Side Script)because of macromedia's security sandbox. But, you can override this by getting some third party software, SWF2EXE Software. This will allow you to copy the images from the CD to a temp. directory on the computer."
But it seems that in the "Easy Slideshow Component" by darshan preloads images...
Basically - can I load these dynamically, without the exe going back to the cd and without using swf2exe software?
I figure that I can put the pre-load in the main swf right before the loadMovie command.
Any help is so so so appreciated!!! I am afraid I'm spending hours attempting something that may not be possible.
I'm desperate... I have been digging for the answer for a loonnnggg time.
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
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
URGENT Deadline's Over..preload Jpegs
I'm making an image gallery and I want to preload each image per click instead of loading all the images at once. I don't want to use load movie and make another bunch of swfs with an image in each!!
Is there a way to preload each image one by one using geturl?
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
URGENT Deadline's Over..preload Jpegs
I'm making an image gallery and I want to preload each image per click instead of loading all the images at once. I don't want to use load movie and make another bunch of swfs with an image in each!!
Is there a way to preload each image one by one using geturl?
View Replies !
View Related
URGENT Deadline's Over..preload Jpegs
I'm making an image gallery and I want to preload each image per click instead of loading all the images at once. I don't want to use load movie and make another bunch of swfs with an image in each!!
Is there a way to preload each image one by one using geturl?
View Replies !
View Related
Projector + Preload JPEGS = Impossible?
Hello all:
I am unsure whether or not I am simply doing something wrong or it is impossible to do this. I have a projector file that load jpegs from a remote site after it has pulled the info from a db. I have created a preloader that simply says now loading but would like to have it display some sort of progress. I was able to get it to work within the ide by simulating download but it will not work in the projector. Perhaps there is no way to track bytesLoaded and bytesTotal from an exe? I have tried both the MovieClipLoader implementation as well as the retro loadMovie, neither seems to work.
When other people create these applications that are not web based yet need data from a remote site how do you indicate loading?
Thanks,
John
View Replies !
View Related
Jpegs To Fade
tried to use a shape tween to get a jpeg to fade in at a certain point during a movie but instead of fading in it just appears...and yes i have it broken apart...anyone?
View Replies !
View Related
|