Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Color Tweening Dynamically Loaded Images Makes Them Jump?



Hi,

Can any one help me out? I'm having major problems color tweening dynamically loaded jpgs in flash. It seems if you color tween a mc that contains an image which has not been broken apart, that any color tween applied to that mc will make it jump. I tried this out and sure enough if I break apart the image inside the mc it works fine.

But this is of course not possible when you are using
my_mc.loadMovie("image.jpg");

Has anyone out there had the same problem, or know of a work around?

It seems to be ok if I publish at low quality but this is not really an option as I have lots of drawing which need to be antialised.

any help would be much appreciated,

Kind Regards,

grandmasterC



FlashKit > Flash Help > Flash MX
Posted on: 02-03-2003, 12:52 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Dynamically Loading Images Into Dynamically Loaded MovieClips
I'm read through many of the posts and found several on this topic, none, however, that addressed all that I need addressed. I've tried several of the suggestions but so far nothing seems to work.

What I want to do is alter the width of images loaded dynamically into a dynamically loaded set of movieclips. all of the widths of the images are different, but i want them set to the same width. The width seems to stay at zero, however, and I cannot seem to change it.

Here is my code:

for (var i:Number = 0; i < 8; i++){
var mc = attachMovie("rect_mc", "r" + i, this.getNextHighestDepth());
mc._x = 90 + (i * (mc._width+5));
mc._y = 375;
mc.img_txt.text = "image" + (i+1);
mc.img_mc.loadMovie("myPic" + (i+1) + ".jpg");

mc.img_mc._xscale = mc.img_mc._yscale = (50/mc.img_mc._width) * 100;
};

The last line is the one that does not function properly.

I'd appreciate any help anyone can provide. thanks.

Skipping Missing Images For Dynamically Loaded Images?
Hey all,

I'm creating a image viewer for a photography studio.

I have it dynamically load the images. I'm using a text file to tell flash how many pics there are, the starting number, and the prefix and suffix for the file name ie. Ahp1234.jpg. Im using a simple counter when a person clicks on the "next" button it will add an increment to the starting number. My problem is photography studios often throw out images that didn't come out right, so there is a jump in numbers, and hence I get an error when trying to load an image that isn't there. I was wondering if there was a way to tell if an image has loaded properly using loadMovie. Or perhaps a better method than what I'm using?

I tried

square = new loadMovie;
square.load (_root.Filename);
square.onload = function (success){
if (success) {
//coding
}else{
counter++
}
}

If any one has any insight I would appreciate it.

Thanks.

Font And Color For Dynamically Loaded Text
hey, i know this is a dumb basic question, BUT.....how can i have different fonts size, colr and style in a dynamically loaded text box using flash MX???
a hearty cheers to anyone that can help
-pithcell

Removing Background Color From Dynamically Loaded Pngs
I am working on a dandelion spores animation where the spores begin to blow away a few at a time until all the spores are gone.

My problem is that I am loading the spores at run time using attachMovie() and, for some strange reason, they are coming in with the movie's background color. Being that the spores are pngs with transparency, they should be coming in with no background color. Any idea why this is happening or how to make a work around? Also, the background color goes away as soon as the spore begins it's blowing away animation.

I have to export as Flash 6 and the background color must be able to change without affecting the spores because this is for a banner ad and the background color of the web sites could all be different.

Thanks.


============================================


I was disappointed to find that no one had any suggestions, however, I was able to find a work around in case anyone was interested.

The fix is very very simple although I have no idea why this works or why I was having this problem in the first place. I basically just drew in a simple shape directly behind the area that the spores were going to be placed on. I filled the shape with the background color that I needed and presto! The pngs stopped grabbing the movie's background color.

Dynamically Loaded Images (.jpg Only?)
I'm loading images from outside my movie using the load movie action. Everything I've read and tried myself so far implies that you can only load .jpgs... Is this correct? I want to load .gis or .pngs so that I can have a transparent background. Any ideas?

thanks

Dynamically Loaded Images
Hi, I am working on a product display module for a client.

I have 10 images of the product in a movie clip and am using action script to enable the visitor to rotate the product and zoom in and out.

When I place the images within the flash movie, I get a very smooth transition.

But when i load the images dynamically using load movie, there is a delay before each of these images are displayed giving the rotation feature a very shabby and broken effect.

Please let me know if a smooth transition can be achieved when i use dynamically loaded images and if so, Please guide me on how to do it.

Any help will be sincerely appreciated.

Thanks in Advance.

Dynamically Loaded Images - Help Please
HI, I'm trying to build a portfolio in which each image loads dynamically, a movie clip resizes to the dimensions of the image being loaded, the image fades in and out again when a new image loads. I have had no problem with any of this except getting the dimensions of the images as they load and centering the images. I want the 'holder_mc' clip to tween from "w"(the current width of 'holder_mc') to "a"(the width of the loaded jpg) and I want them to be centered inside the clip i load them into. Below is the script I have used so far. An example of what I'm trying to acheive is at the address: http://www.iso50.com/iso50.html . Any ideas?



PHP Code:



import mx.transitions.Tween;
import mx.transitions.easing.*;

my_mc.loadClip("frames.jpg", "container");

button1.onPress = function() {
    var alpha_tween:Object = new Tween(container, "_alpha", regular.easeOut, 100, 0, 1, true);
    alpha_tween.onMotionFinished = function() {
        my_mc.loadClip("frames.jpg", "container");
    };
};
button2.onPress = function() {
    var alpha_tween:Object = new Tween(container, "_alpha", regular.easeOut, 100, 0, 1, true);
    alpha_tween.onMotionFinished = function() {
        my_mc.loadClip("911.jpg", "container");
    };
};
button3.onPress = function() {
    var alpha_tween:Object = new Tween(container, "_alpha", regular.easeOut, 100, 0, 1, true);
    alpha_tween.onMotionFinished = function() {
        my_mc.loadClip("tree.jpg", "container");
    };
};

w=holder_mc._xscale
h=holder_mc._yscale
my_mc = new MovieClipLoader();
preload = new Object();
my_mc.addListener(preload);

preload.onLoadStart = function(targetMC) {
    trace("started loading "+targetMC);
    container._alpha = 0;
};
preload.onLoadProgress = function(targetMC, lBytes, tBytes) {
};
preload.onLoadComplete = function(targetMC) {
    trace(targetMC+" finished");
};
preload.onLoadInit = function (targetMC)
{
a="imported image width?";
b=="imported image height?";
trace(contentainer._xscale);

var size_tween:Object = new Tween(holder_mc, "_xscale", Regular.easeOut, w, a, 1, true);
var size_tween:Object = new Tween(holder_mc, "_yscale", Regular.easeOut, h, b, 1, true);
size_tween.onMotionFinished = function() {
   var alpha_tween:Object = new Tween(container, "_alpha", regular.easeOut, 0, 100, 1, true);
};
};

Dynamically Loaded Images
Hi I have a problem with some images i've dynamically loaded into a flash Movie. For some reason the images look very poor. They are not scaled (at least not all of them). So i don't know what the porblem is. In the authoring environment they look perfect and once they are published tehy look like hell. Please help !

Dynamically Loaded Images
hi,

i am loading jpegs from an external folder into separate movie clips on the stage. this works fine. however, due to the structure of the movie, i need to attach these loaded clips to another movie clip which exists further along the timeline.

when i try to do this, nothing happens and tracing for the movies returns undefined.

does anyone know if this is because the jpegs are loaded dynamically?

e.g of loading jpeg:

loadMovie("content/design_1.jpg",im_holder1_mc);

and then later in the movie...

image01_mc.attachMovie("im_holder1_mc", "new", 300)
trace(im_holder1_mc.new); (returns undefined and the movie does not load)

anyone got any ideas?

many thanks,

lukemack.

Dynamically Loaded Images?
i know there's a section for this on kirupa.com, but i really need everything spelled out for me. (for instance, i knew the i had to use the code, but i didn't know where i was supposed to put it).

basically, i'd like to have a loaded image like the splash page on www.heftyrecords.com, where it says "loading images..." and then the images show up. i don't want to have to click on a button to load the image; rather, i'd like it to be done automatically. could anyone possibly help further explain this to me?

How Can I Make A Actionscript Button Thart Makes You JUMP 200 Frames Into The Future?
How can I make a actionscript Button thart makes you JUMP 200 frames into the future?

It seems like all the turorials make you program each button for a specific scene and I dont want that since I have a very long timeline and wnat to do frequent jumps in my animation to skip parts.

anyone know how?

Dynamically Loaded Images In Rollover
Hi:
I'm creating an application in Flash where everything is dynamically decided at runtime, including what images to loaded and their positions on the screen. All this is defined in an XML file.

I am loading a particular image, say Image 1 onto the screen and on rolling the mouse over that, it changes to the rollover image, Image 2, which is also dynamicaly loaded at runtime from the disk drive using the loadMovie method.

The problem with this approach is that the rollover is really slowly, gets stuck sometimes and the images flicker. This is obviously because Image 2 is loaded from the harddrive everytime the mouse is rolled over Image 1. And when the mouse rolls out, Image 1 is again loaded from the hard drive. I'm loading thses images by checking the onMousOver events in the Movieclip containing the image.

Is there a better way to do this to be efficient and also to avoid flicker? Any help would be greatly appreciated. Thanks!!

-Gautam

Animating Dynamically Loaded Images..HOW?
Hi,

I want to animate dynamically loaded images. The images move from right to the left and are loaded from an XML file:

<Slides>
<slideNode jpegURL="images/aktie01.jpg">Banden</slideNode>
<slideNode jpegURL="images/aktie02.jpg">Mobiele bandenservice</slideNode>
<slideNode jpegURL="images/aktie03.jpg">Zakenrijders</slideNode>
</Slides>

The problem is how to animate the variable number of images from right to left like a carrousel. so the first image appears again when the last one leaves the screen.

Preload Dynamically Loaded Images - How?
How do I preload dynamically loaded images? For example - in the samples folder of Flash MX there is a slideshow, but none of the photos have a preloader. If I have a slideshow with dynamically loaded images, I want preloaders in front of them all. Any help?

Can Dynamically Loaded Images Be Aligned?
I use Flash MX

I 'm loading some images dynamically from an xml document.

When I bring them in, always, the top left of the target clip corresponds to the top left of the image I bring in (left justified to the x point of the target clip).

What I'd like to do, is have them align to the center of that clip.. is it possible?

Here's the open-source file I've been working with :

http://www.macromedia.com/support/fl...slideshow_xml/

Any help is appreciated.

-Craig

Images Loaded Dynamically Effect
Hello all, I was on www.lennykravitz.com and I was in the "gallery" section. I wanted to know how to create something like this. Where your thumbnails and your images load dynamically, your thumbnails are clickable and call up the bigger image in the viewer window, and the window changes shape according to the size of the image. Can anyone point me to a tutorial of this or help me create my own. I have found some help, I can either find a tut on the changing window size or a tut on the images loading, but not one on how to put them together like this site has. Any help would be appreciated. Thanks

NIck

Loading Bar On Dynamically Loaded Images
Hi,

Is it possible to have a loading progress bar for a dynamically loaded image within a flash movie. Or even better, to incorporate it's loading time into the main movie preloader?

If anyone could help out with this it'd be much appreciated, thanks...

Transparency In Dynamically Loaded Images
I have created a Flash application where users can upload images and then have them dynamically loaded into the movie. The problem I am running into is that any transparency within those uploaded images is simply being filled with black.

Is it possible to retain the transaparency of images dynamically loaded into a Flash movie?

Thanks in advance.
Aaron

Is It Possible To Preload Images That Are Dynamically Loaded
is it possible to preload images on frame that are dynamically loaded into the timeline later in the timeline. If so how would one go about that?

[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

Scale Dynamically Loaded Images
i am using flash cs3 with actionscript 2.0

i was wondering if theres any way to scale an image that was dynamically loaded using script... or would i have to edit the actual image i am loading in?

this is the code that dynamically loads the image:


PHP Code:



loadMovie("joe.jpg", _parent._parent.about_section.targetArea);




i want to scale down "joe.jpg" using script...

[F8] Dynamically Loaded Images & AttachBitmap
ok.. Im sure this has an OLD problem.. (as I have seen several posts around on it).. however I dont have much (barely any) exposure to the bitMap class or using attachBitmap()


my application was/is working fine.. until I got to the point where I need to work on the 'controls' that manipulates the images I am loading in.

these 'controls' basically only scale & rotate the image when clicked...
and of course if using the MovieClip loader class.. the images are NOT loaded/attached as bitmaps..so there is NOT control over the smoothing, and things look jagged/pixelated when rotating or scaling..

I have tried forceSmoth = true;
http://livedocs.adobe.com/flash/9.0/...=00001912.html

syas CS3 but also states AS2.0.. so Im think F8 just doesnt have it? even though a FlashPlayer should recognize it?

anyways.. didnt work, so I tried to attachBitmap.. and I still cant seem to get it to work. the images show-up but I dont think it is fomr the attachBitmap call..and from the original movieClip loader 'call' of loading the images..as when I scale them.. they still get 'jagged'

so my question(s) (two fold here) are:

1.) I need help on correctly implementing the attachBitmap on the INIT call back of my clipLoader...

2.) Im un-clear as to what happens with the original loaded images? Do we need to clear them somehow? It seems as if there would be double data if not removed? or am I just way off base here?


summary/background of project:

using a custom class (written by FK member MyFirndIsATaco, that I really like) that take an array of images and loads them all.. giving you your normal callBacks.. this is derived form the ClipLoader class, and has another callBack for onProgress for the loaded progress for ALL the images in your array..

so from searching.. I am trying to execute/attachBitmap() on the onInit callBack function that fires after EACH image is done loading.

the only part of that you need to worry/know about it this:


PHP Code:



//declare vars (in loop)var mainPart = partXML.firstChild.childNodes[h].attributes.bImage;var indiPartHolder = mainContainer[sectionID].createEmptyMovieClip("indiPartHolder_"+(h+1),  mainContainer[sectionID].getNextHighestDepth());                    mainLoad.addToQueue(mainPart, indiPartHolder);//end loopmainLoad.loadAll();




here is the function/callBack I am having trouble with.


PHP Code:



function onMainInit(mc:MovieClip):Void {    trace(newline+"PART NAME (INIT): "+mc.partName);    //force smoothing    //mc.forceSmoothing = true;        var bitmapCon:MovieClip = mc.createEmptyMovieClip("bitmapCon", mc.getNextHighestDepth());    var bitmap:BitmapData = new BitmapData(mc._width,  mc._width, true, 0x000000);       bitmapCon.attachBitmap(bitmap, mc.getNextHighestDepth());    bitmap.draw(mc);    //check for partImage #1    if(mc._name == "indiPartHolder_1"){        mc._parent.currentPart = 1;                mc._x -= Math.round(mc._width/2);        mc._y -= Math.round(mc._height/2);    }else{        mc._visible = false;        mc._x -= Math.round(mc._width/2);        mc._y -= Math.round(mc._height/2);    }    mc.onPress = function(){        trace("MY NAME IS: "+mc._name);        mc._parent.startDrag(false, ((mc._width/2)+25), ((mc._height/2)+100), (Stage.width - (mc._width/2)-25), (Stage.height - (mc._height/2)-110));        mc._parent._parent._parent.focusClip = mc._parent;        var partNum:Number = mc._parent.currentPart;        mc._parent._parent._parent.partDesc_txt.htmlText = "<b>"+sectionID+"</b> "+partXML.firstChild.childNodes[partNum].attributes.name;            }    mc.onRelease = mc.onReleaseOutside = function(){        mc._parent.stopDrag();    }}




Id like someone to help me understand better what I am doing wrong?
Also about the clean up of the movieClipLoader loaded images??


update: ok I seem to have the smoothing working now?

I changed this:

bitmapCon.attachBitmap(bitmap, mc.getNextHighestDepth());

to this:

bitmapCon.attachBitmap(bitmap, mc.getNextHighestDepth(), "auto", true);


however.. Id still like to know about 'clean-up' portion still??

Also.. now that I have done this.. the startDrag() code as well as the 'positioning' code I have is totally out of whack now? Why is this? In my mind.. I just created a new clip.. and copied the same image into it??

so the values and what not should be the same..no? (as far as X/Y placement..etc..etc)

thanks gang...


update 2:

(it always happens like this..doesnt it?)

well after I posted.. I saw a typo..

this:

var bitmap:BitmapData = new BitmapData(mc._width, mc._width, true, 0x000000);

should have been this:

var bitmap:BitmapData = new BitmapData(mc._width, mc._height, true, 0x000000);

DUH! lol..

anyways.. things seem to be good... so any conversation on the clean-up of the original loaded images from the ClipLoader() class is appreciated.. (maybe one doesnt have to do anything? and Im just crazy?)

[F8] Positioning Dynamically Loaded Images
hey!
i'm loading some images into the site i'm building dynamically and want them to come onto the screen bang in the middle. i'm loading them into an empty movieclip, called empty that's on the root timeline. here's my not-working script:


Code:
tempWedge.onRelease = function(){
launchImage();
loadMovie("illustration/"+_root.whichImage+".jpg", empty);
posEmpty();
trace(empty.width);
}
function launchImage(){
Tweener.addTween(overlay,{_alpha:80, time:0.4, transition:"easeInOutSine"});
Tweener.addTween(btmNav.bubble,{_alpha:0, time:0.4, transition:"easeInOutSine"});
}
function posEmpty(){
empty._x = (Stage.width/2) - empty.width;
empty._y = (Stage.height/2) - empty.height;
}


my trace of empty.width comes back as undefined. can anyone spot what i'm doing wrong here?
thanks guys!
emma.

Animating Dynamically Loaded Images
hi all,

a quick question,
I have loaded an image into flash using a url in a text file and now i want to animate it so it scrolls up the screen.... is this possible and if so how would i go about doing it?

cheers, milly

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

Get Width Of Dynamically Loaded Images?
I have several images loaded and displayed dynamically on the stage, but they are all currently positioned at (0,0). To display them properly I need to be able to get the width of each image (or the MovieClip its loaded in).

I've tried this:


ActionScript Code:
for (var i:Number=0; i<data.result.length; i++){
        var imagePath:String = "http://mydomain.com/" + data.result[i];
        var instanceName:String = "image_" + i
        var thePic = "picture_" + i;
        thePic = _root.createEmptyMovieClip(instanceName, _root.getNextHighestDepth());
        _root[instanceName].loadMovie(imagePath);
        trace(_root[instanceName]._width);      //TRYING TO GET THE WIDTH
    }

Why does this last line output several 0s? How can I get the width of each image or parent MC?

Clickable Dynamically Loaded Images
The following script loads images from an array and places them on the stage.


Code:
var images:Array = new Array();

images[0] = '1.jpg';
images[1] = '2.jpg';

for(i=0; i<images.length; i++) {
pic = attachMovie("holder", "pic"+i, i);
pic._x = 10 + i*120 + i*10;
pic.image.loadMovie(images[i]);
}
I want to make the images clickable by associating this:


Code:
onClipEvent (enterFrame) {
this.onRelease = function() {
trace(this._name);
}
}
with the movie clip called 'image'.

The problem is that this._name is equal to the instance name of 'image'. How would I get it to show 'pic0' and 'pic1' instead?

Dynamically Loaded Images Look Colourless.
Hi!

I'm working on a page that needs dynamic jpg loading. My problem is that all the pictures loaded from a folder (that is on server) look a litle desaturated or colourless. Black looks like gray and red is not as red as it's in the original picture. I can't figure out any reason. Is flash lowering the quality of dynamically loaded jpgs?

I'm using forceSmoothing = true on MovieClip that loads images and loading is done by using instance of MovieClipLoader class. I have set JPEG quality to 100% in publish settings, didn't help. This problem is really driving me crazy. If you have some solution or idea why this desaturation is happening, please let me know.

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");

How To Scroll Dynamically Loaded Images
How would I scroll dynamicall loaded images. I would like to use XML but that not required.

Masking Dynamically Loaded Images
Hi,

I'm trying to load two images dynamically (into mc placeholders) each movieclip is on a different layer over the top of each other. I want to mask the top movie clip and animate the mask to reveal the image below. When the timeline moves to the point where the mask is, the mask doesn't work and reveals the whole movieclip below. Any ideas?

Swapping Dynamically Loaded Images
Hello,

I am trying to build an image viewing application that essentially loads in a large series of images (~300 @ 512px by 512px) and allows the user to drag across the image area to move to a particular image in the series. I've got this implemented, and it works "alright," but it swaps images somewhat slowly and will often skip images, even when dragging quite slowly.

Because the images are dynamically loaded, AFAIK, I have to grab the image data and attach it to an empty clip with smoothing turned on, which is what I am doing to each as it is loaded (and unloading the image after a BitmapData object has been created).

Currently, images are loaded at increasingly negative depths, and swapped to depth=1 when a particular image is to be displayed (and to depth=-1 when they are swapped out).

I should note that setting '_visible' to false on all images other than the one being displayed does not appear to improve the performance. Incidentally, is there a way to set '_visible' to false before it loads, so it is invisible until '_visible' is explicitly toggled (as opposed to setting it to false in an load event handler)?

I need all the images to remain loaded so the swapping can be as snappy as possible.

Any insight as to how I can improve the performance?

Thanks!

(XP, 1GB RAM, 2.8GHZ P4)

Dynamically Loaded Images Look Colourless.
Hi!

I'm working on a page that needs dynamic jpg loading. My problem is that all the pictures loaded from a folder (that is on server) look a litle desaturated or colourless. Black looks like gray and red is nod as red as it's in original picture. I can't figure out the reason. Is flash lowering the quality of dynamically loaded jpgs?

Im using forceSmoothing = true on MovieClip that loads images and loading is done by using instance of MovieClipLoader class. I have set JPEG quality to 100% in publish settings, didn't help. This problem is really driving me crazy. If you have some solution or idea why this desaturation is happening, please let me know.

How Do You Size Dynamically Loaded Images?
Hi,

I am loading images from mysql into flash using php, I need to make thumbnails out of these images, so they need to be resized as they are loaded in and then displayed to one set size. Does anyone have any ideas?

thanks

Gavin

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

Images In Dynamically Loaded Text
Is it possible to place images in a dynamic text box? The <img src> tag didn't work. Is this even possible at all?

Dynamically Loaded Images And Scrolling
Hello....I am currently creating a section for a client that needs to be updated frequently by them...I need help in creating a scroller similar to the claudio ease scroller....However, i want to be able to load images into the scroll box dynamically and have the scroller adjust to the image sizes when they are changed by the client...I tried loading the images dynamically directly into the Claudio-ease scroller and it does not accomplish this....Instead it scrolls only as far as you set the box and not to the sizes of the images....

Rollovers On Dynamically Loaded Images
For the life of me, I cannot get any rollovers to work with the images that have been loaded from XML. I can target them and set the _alpha and whatnot, but rollover/out/press functions don't seem to work :[
I've tried many different ways... does anyone see what's wrong?



Code:
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
title = [];
type1 = [];
type2 = [];
type3 = [];
ypos = [];
total = xmlNode.childNodes.length;
//////////
for (i=0; i<total; i++) {
ypos[i] = (135 * i) + 225;
title[i] = xmlNode.childNodes[i].childNodes[0].childNodes[0].nodeValue;
image[i] = xmlNode.childNodes[i].childNodes[1].childNodes[0].nodeValue;
type1[i] = xmlNode.childNodes[i].childNodes[2].childNodes[0].nodeValue;
type2[i] = xmlNode.childNodes[i].childNodes[3].childNodes[0].nodeValue;
type3[i] = xmlNode.childNodes[i].childNodes[4].childNodes[0].nodeValue;
//////////
///create thumbs
var thumb_mc:MovieClip = _root.main.createEmptyMovieClip("thumb"+ (1 + i), _root.main.getNextHighestDepth());
thumb_mc._x = 0;
thumb_mc._y = ypos[i];
loadMovie (image [i] , thumb_mc);




//////////////////////////////////////////////////////////////////////
///////////////////////////////FUNCTION////////////////////////////
//////////////////////////////////////////////////////////////////////

thumb_mc.onRollOver = function () {
trace("YUP-over"); //should work
}
thumb_mc.onRollOut = function () {
trace("YUP-out"); //should work
}

//////////////////////////////////////////////////////////////////////
///////////////////////////////FUNCTION////////////////////////////
//////////////////////////////////////////////////////////////////////






}

} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("data.xml");
/////////////////////////////////////
THANK YOU for your help.

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

AS 2 Caching Dynamically Loaded Images
hey,

wonder if anyone can shed light on this for me...

ok, i've built a site that loads in images (jpeg) dynamically. a php file looks at my image directory, and makes all the filenames into a list... then in flash i take that list and populate an array with the filenames.

then with my interface the user can navigate to the next / previous image, which then uses the movieClipLoader class to load the jpeg into the movieclip, and i use onLoadProgress to throw in some code to control my preloader graphic.

the problem i'm having, is that flash doesn't seem to be caching the images once already loaded (as in, if the user goes back to a previously loaded image, the image gets preloaded all over again).

the strange thing is... sometimes it caches images, and sometimes it doesn't... (although with the latest images i've uploaded its not caching any) so i'm ruling out anything wrong with my actionscript (famous last words) and was thinking it was an issue with the server or even the jpegs (maybe different compression settings?!).

can anyone offer an explanation?

cheers,
martin.

Jumpy Dynamically Loaded Images
I've been working with this problem all day now with no luck.

I'm using Lee's carousel to create a circular menu that rotates very slowly. I have the menu on a seperate swf to make life easier. However, when the main swf loads the menu, the images in the menu get very pixely and jumpy.

Is there a solution to this? Or should I just put the menu into the main swf instead?

Hyperlinking Dynamically Loaded Images
I have a slideshow that I've put together based on a tut from oman3d.com. I know very little about actionscripting and need to modify the code to allow me to hyperlink each individual image to their own url. Here's the code I'm using now. Any assistance would be greatly appreciated.


Code:

this.createEmptyMovieClip("container",1);

var imagesNumber:Number = 10;
for (i=1; i<=imagesNumber; i++) {
container.attachMovie("image"+i,"image"+i+"_mc",i);
myImage_mc = container["image"+i+"_mc"];
myImage_mc._x = (i-1)*myImage_mc._width;
myImage_mc._alpha=25;

// need this link to be unique for each image, I can predefine what image 1, 2, 3 etc. should link to, but have no idea where to begin. Tried switch statements, if's, etc. to no avail.
myImage_mc.onRelease = function(){
getURL("http://www.link.php", "_parent");
}

myImage_mc.onRollOver = function(){
this._alpha=100;
}
myImage_mc.onRollOut = function(){
this._alpha=25;
}
}

container.onEnterFrame = function() {
this._x += Math.cos((-_root._xmouse/Stage.width)*Math.PI)*15;
if (this._x>0) {
this._x = 0;
}
if (-this._x>(this._width-Stage.width)) {
this._x = -(this._width-Stage.width);
}
};

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

Anchor Point For Dynamically Loaded Images?
Hi folks,

I cannot figure this out but I'm sure there is a simple solution for it:

I dynamically load an image, say a jpeg, into a movie clip. Now I want to rotate the image, or scale it, *relative to its center point*, not from the top left anchor point.

But, no matter what I do, the image always seems to scale and rotate from that 0/0 point!

I've tried putting a movie clip "imageholder" into a movieClip. Then I've made sure the anchor point for "imageholder" is in the center. Then I load the image using imageholder.loadMovie("theimage.jpg") but when I rotate the imageholder it again has its anchor point at the top left!

I know this can be done because I see tons of swfs out there that do it!!! Any advice? There is no ActionScript for "set anchor point", right?

Thanks,

Juggle5

Finding Size Of Dynamically Loaded Images
I am trying to find the size of images I am loading dynamically into a movie clip. The problem I am having is the trace is always behind by one image.

EX:

222 Img Width
13 trace output (13 is the initial size of the movie clip)

-then/next call to function-

151 Img Width
222 trace output


Here is the code from the function.




PHP Code:



var img = "faces_lg/img" + this.id + ".jpg";
ph.loadMovie(img);
trace(ph._width);

Centering Dynamically Loaded JPEG Images?
I'm loading multiple JPEG images of different sizes directly into an existing movie clip in Flash 6. I want them to load into the same movie clip, each replacing the one before it, and I need them to all center in the stage.

The problem is that the loaded JPEGs align their top left registration point to the movie clip's center registration point.

When loaded, the different size JPEGs all have their top-left corner aligned to the same point on the stage (the movie clip's original center point), but since they are different sizes, most are not centered.

Is there a way to cause the dynamically loaded JPEGs to align their center to the movie clip's center?

Fading Dynamically Loaded Swf Files Containing Images
Hi everyone!

I really need help. Iīm working on a solution to load 22 swf files into a main swf and then fade them in and out while browsing through them all(pushing buttons).

I donīt want to load them at the same time but when the user pushes another button then i wanīt to load the next and so on(all with a preloader).

I have made an example where i succeeded doing this but with one big fla wich dosenīt work with more then 10 images. I really need to load them dynamically and fade them over each other. Iīll submit the swf that i have made.

Hope someone can help me!!!


//Johan

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

Dynamically Loaded Images Pixelating When At Angle. Please Help
Hi all,

Thanks for reading this...

This is driving me up the wall!!! I have some images and swf's which are loaded dynamically in to the main swf. These images need to be set at an angle for the site but look really 'pixelly' when I view them. They look fine when the angle is set to 0 - also, I made a mock-up .fla to see why this could be happening, set the pics at an angle and it worked fine.

I know it's due to the angle but is there a way of getting round this? I'm using MX at the moment but would it be any different in MX 2004?

Many thanks and I hope to hear from you.

Take care,

Mark

Copyright Đ 2005-08 www.BigResource.com, All rights reserved