ActionScript 2.0 :: Scaling Images Loaded Via MovieClipLoader Object?
Jan 27, 2009
I'm working on a Flash application that has thumbnails and fullsize versions of an image. The steps I'm taking:
- import the image at runtime, and attach to a movieclip (we'll call it polaroid, since that's what I'm calling it).
- resize polaroid via polaroid._width=3; polarois._height=3; to get my thumb
The image quality is OK for pictures, but it's also fairly important that text not look too pixelated. Is there anything relatively simple (i.e. not too taxing on RAM) I can do here? Even a blurring layer would do the job, if there is any such thing.
View 8 Replies
Similar Posts:
Jan 22, 2009
I've got a gallery that loads images in using MovieClipLoader. Unfortunately once the images are loaded they don't seem to want to be resized.I've added an empty MC to the stage for each one and loaded the image in, then I try to resize it to fit the screen. Tracing the size after the onLoadComplete event returns 0 and changing the size makes the clips disappear from the screen.
View 1 Replies
May 8, 2009
I have a grid with 17 columns and populating it with images through XML. I would like to scale the images on Mouse over. I can get this to work but the problem is that some of the images when scaled are below the surrounding images. I thought maybe setChildIndex, but perhaps I was not implementing it correctly.
View 1 Replies
Nov 8, 2010
Is there a way to use 9-slice scaling with images loaded at runtime? To clarify, let's say that I build an application that lets a user skin a button with whatever image they want. This would be an image that's not embedded with the swf. Is there a way to set that runtime image as a background and use 9-scaling?
View 1 Replies
Apr 9, 2009
Im building a site for a photographer, all images are xml driven.. When a thumb is clicked the full size image is loaded into an empty movie clip.
I am after a similar effect as seen here..[URL] If you resize the window the image resizes to scale...
I have managed to align the rest of the movieCLips to the stage when it is resized in its right positions just can't get the image to resize!.
View 3 Replies
Feb 23, 2010
Here's the code which i use to center scale and all the other stuff[code]...
View 1 Replies
Feb 23, 2010
when i was trying to build in the banner images i bumoped into weird problems. At first my cs4 for pc stoppped working everytime so backup to cs3 this also stopped working everytime so i went working through guest account which seems to work ok.ok back to the other problem. on this link you can see the website there is loading an image in the banner by an movieClipLoader this why i can adjust the image size when it's done loading. I want to make everything sizeable. when the site loads for the first time the image won't show, but when refreshing the site, suddenly the image does show.testing this all local works. But online not! so i tried testing local retrieving the images from the web. i got this sandbox error. oke added system.security.allowdomain("*") for the wildcard, really weird cause it's just an image (bitmap) which is called.[code]
View 11 Replies
Feb 18, 2010
im making this site for a buddy of mine, everything started quite ok. But when i was trying to build in the banner images i bumoped into weird problems. At first my cs4 for pc stoppped working everytime so backup to cs3 this also stopped working everytime so i went working through guest account which seems to work ok.
ok back to the other problem. on this link you can see the website there is loading an image in the banner by an movieClipLoader this why i can adjust the image size when it's done loading. I want to make everything sizeable. when the site loads for the first time the image won't show, but when refreshing the site, suddenly the image does show. testing this all local works. But online not! so i tried testing local retrieving the images from the web. i got this sandbox error. oke added system.security.allowdomain("*") for the wildcard, really weird cause it's just an image (bitmap) which is called
Code:
image.setMask(mask);
var mclListener:Object = new Object();
mclListener.onLoadInit = function(target_mc:MovieClip) {
[code]....
View 2 Replies
Oct 30, 2009
I have a small problem using MovieClipLoader to load multiple images at the same time. This is the function for loading:
ActionScript Code:
private function loadImage(image:String, container:MovieClip, w:Number, h:Number):Void{
var listener:Object = new Object();
_root.debug.text += "Loading: " + image +"
[code]....
This function is triggered in a for cycle for 4-9 images.The problem is - some of the images don't get fully loaded. It is usually 1 or 2 at most. Some of them don't show at all and some load partially (let's say I see 60% of the image and underneath a gray line). Is there some restriction for multiple connections in Flash? Are the requests made too fast?This problem does not occur in Flash environment, it occurs only online. The listeners execute alright even for the not loaded images. No load error at all.
View 9 Replies
Jan 3, 2011
Which is the best way to load many images with the movieClipLoader class?do I have to create one instance of moveClipLoader for each image or is it possible to use the same for all the images?
View 3 Replies
Aug 6, 2009
I'm trying to load a local SWF then catch a few events that are fired but I can't see why this isn't working.
Here's the code
Parent.swf
_mcl = new MovieClipLoader();
_mcl.addListener(this);
_mcl.loadClip("Child.swf", rotator_mc);
[code]....
Now I was hoping that this would work, and the Parent would have "childLoaded caught 2" in the trace, but it doesn't.
View 1 Replies
Feb 7, 2006
The starting point is that I load an external PNG file into an open SWF application with the following code:
---------------------------------------
var loadListener:Object = new Object();
loadListener.onLoadInit = function():Void {
//do certain actions - not relevant for my question
};
[code]....
That works fine. The problem is how can I later reference to 'flower02.png' as BitmapData which is loaded as a movieClip into the movieClip 'mc1' to execute certain BitmapData methods like in particular 'copyPixels()'?I'm aware that I could use:
---------------------------------------
import flash.display.BitmapData;
var libId:String = "flower";
var flowerBmp:BitmapData = BitmapData.loadBitmap(libId);
---------------------------------------
In this way I could reference my BitmapData by its variable identifier 'flowerBmp'. But this would require that my 'flower02.png' is already in the library which is not possible for my purpose.
View 2 Replies
Feb 17, 2006
I'm doing a small site in which I'm probably gonna use a simple layout and load the actual content as swf's into a box... So far, the listeners for the MovieClipLoader class works fine, but the loaded content (which has the same exact size as the box it is loaded into) is being scaled in a strange way. When I trace the width and height after the clip is loaded I get the numbers I want (mostly) but it still LOOKS stretched. I've checked that the container clip isn't scaled, I've set the xscale and yscale to 100, I've manually tried to set the width and height (with the onLoadInit listener AND the onLoadComplete listener) but the numbers does not work as they should... It does resize, but not to the exact values I give it.
View 4 Replies
Apr 12, 2007
I am loading an external .swf into a container movieClip & using movieClipLoader to preload the .swf. The my progress bar works, but when it reaches 100%, it doesn't show the loaded .swf.
source files:
johnstrawserjr.com/main_movie.fla
johnstrawserjr.com/index2.fla
[Code].....
View 1 Replies
Feb 9, 2009
Code:
var container:MovieClip = createEmptyMovieClip("container", this.getNextHighestDepth());
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(this);[code]....
This always traces the width/height of the content of the external crossball.swf file, not its stage dimensions. So let's say crossball.swf has a document size of 200 by 200 pixels and in it is a shape of 115 by 30 it will trace the last as the width/height of 'container'.Is there any way to get the stage dimensions of an externally loaded swf through moviecliploader?
View 1 Replies
Mar 22, 2011
I'm using a preloader and MovieClipLoader to seemingly good effect and I have an ending sequence to my preloader where it plays out once the target clip is loaded. The ending sequence features within the preloader itself (preloader_mc.endingClip). preloader_mc plays through its frames with:
[Code]...
until it gets to 100% and then gets to a frame telling endingClip to play. All good unless the target clip is already loaded. Then what happens is that the preloader jumps to 100% and only plays the ending sequence. I would like to have a way of checking to see if the target clip has already been loaded so as to avoid displaying only this ending portion of the preloader.
[Code]...
View 4 Replies
Jun 23, 2011
I'm trying to create a wrapper written in ActionScript2, which loads a second AS2 swf then when this loaded swf has finished animating the wrapper will load a second swf. This is the code I have to load the first swf:
[Code]....
View 13 Replies
Jan 10, 2007
I thought it was about time my Pretty Noise Toys had preloaders on them, so I went about using MovieClipLoader like so[code]...
View 1 Replies
Feb 16, 2009
I'm using MovieClipLoader to load in external swfs so that I don't need to include a preloader on each one. I'm really unfamiliar with this technique, including how to use and implement listeners and follow the functionality after using it, I've just been playing with borowed code.basically i've been trying to use this code:
Code:
var loader:MovieClipLoader = new MovieClipLoader();
loader.addListener(this);
[code].....
View 4 Replies
Jan 27, 2005
Im having problems with assessing the size of an image after having loaded it into a movieclip using MovieClipLoader.Im trying to use the onLoadComplete-method to determine when the image is completely downloaded into the imageholder-mc, but Im just getting the original size of the mc, not the image's.[code]
View 3 Replies
Aug 10, 2004
This is going to be related to the oop post.For whatever reason, I can't seem to call myMovieClipLoader.(url,target) to load a MovieClip from within a method of a custom class. It works fine when I call it in the timeline.
View 4 Replies
Dec 17, 2007
I have a swf that loads external images from an xml feed (using moviecliploader) and then rotates through these images every n seconds. This works fine in ie and it loads the images and scrolls through them. However in Firefox sometimes it loads the image and sometimes it doesn't! its like a lucky dip haha Is there any link that you know of to any information on this bug/issue with firefox that might help me resolve this? Found something that might be causing the problem, if Firefox cannot find the image within a certain time it just gives up... is this true?
View 1 Replies
Jan 27, 2005
Im having problems with assessing the size of an image after having loaded it into a movieclip using MovieClipLoader.
Im trying to use the onLoadComplete-method to determine when the image is completely downloaded into the imageholder-mc, but Im just getting the original size of the mc, not the image's. I using the MovieClipLoader incorrectly somehow?
Code:
var MCL = new MovieClipLoader();
MCL.loadClip("IMAGE.jpg", mc_ImageHolder);
MCL.onLoadComplete = function (targetMC) { // perhaps 'targetMC' should be used?
trace (mc_ImageHolder._width); // outputs mc's original size, not image's size
}
View 3 Replies
Oct 29, 2009
I'm trying to set up a website that uses the MovieClipLoader class to load external images & swfs. The loader is working but I can't seem to get the preloader text to work, ie the onLoadProgress. The Percent text just has jibberish when I test the movie. Could some tell me what I'm doing wrong. Attached is the test file that I'm working on
[Code]...
View 3 Replies
Jun 6, 2007
I"m having a tiny problem with unloading an external swf using the MovieClipLoader object. This is what I"m doing:
Code:
if (mcLoader.unloadClip(container)) {
trace(container.testVar) // shows testVar
}
button.clickHandler = function () {
trace(container.testVar) // says undefined when clicked
}
So what's happening is right after I call unloadClip it's still loaded however if I click the button at some point after unloadClip is called it shows that is has been unloaded. So obviously there's a little bit of a delay while things are being unloaded. My question is, does anyone know of a way to detect when the clip is unloaded like with an event listener or something? I want to be able to load up another swf after one is unloaded for the level maps for my game I'm working on.
View 2 Replies
Feb 6, 2009
I am using the MovieClipLoader object to load a swf into a master swf. I am the using a series of buttons to load various swfs into the master.swf - i.e.; navigation. Her is the code that I am using for the movie clip buttons go to frame 2 of the external swf MM_work is the movie clip that acts as a button. The first three lines of the function give the button its various states and interactivity the final line in the function is telling the movement.swf to load into the master.swf (or level 0) thus booting out the previous movie clip.What I want to be able to do is to fade out the current movie clip loaded into the master.swf (level 0) and once that has been completed to then load in movement.swf. Basically fading out the existing movie clip before loading the next one.
View 3 Replies
Oct 28, 2006
I'm making a XML photogallery. Im using a MovieClipLoader to load multiple images on the screen at the same time. I've assigned variable path to hold image
[Code]....
View 6 Replies
Aug 25, 2008
I recently built a preloader using the MovieClipLoader object. I used the following events: OnLoadComplete, OnLoadProgress and onLoadStart. I registered my listeners etc and then I decided I wanted to get a bit fancy. So I decided that within the onLoadProgress I would add an"if" statement, this if statement would basically say if the loaded content equals 70 then animate the preloader graphic off the screen using tweening (very simple). The onLoadProgress is continuously called while the content is being loaded but it seems that it does not want to correctly execute my if condition.
Here is the code for the onLoadProgress.
loadListener.onLoadProgress = function (target:MovieClip, bytesLoaded:Number, bytesTotal:Number) {
trace("onLoadProgress");
txtLoaded.text = String (Math.floor (bytesLoaded / bytesTotal * 100)) + "% loaded";
mcProgress._xscale = bytesLoaded / bytesTotal * 100; // address the bar
[Code] .....
View 5 Replies
Sep 24, 2009
I have an interesting issue, I am trying to load 12 images into their own "Loader" with Scale content set to "true" so they scale down a bit. If I run this in Flash it works great, the 12 images show up fine inside the loader. If I then load it to a website and view it with FF it works fine, however, if i load up IE one or two of them will be fine but the others will be huge, basically not scaling to fit. By Loader, I mean the component loader. I'm sure I'm not the first person to have this issue, my first thought was they are not loading 100% before Flash is trying to scale the content? If that's the issue, how do I preload them?
View 2 Replies
Jan 20, 2004
Is it posible to make a preloader of a SWF that loads an external JPG?
View 1 Replies