ActionScript 2.0 :: Assessing The Size Of An Image After Having Loaded It Into A Movieclip Using MovieClipLoader

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


Similar Posts:


ActionScript 2.0 :: Size Of Image After Having Loaded It Into Movieclip Using MovieClipLoader

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

ActionScript 3.0 :: Resizing A MovieClip According To The Size Of A Dynamically Loaded Image?

Jun 10, 2009

I wonder if any of you can point me in the right direction. In my stage I have a movieclip where I want to load several images with different sizes. This mc called "container" adds the loader to the stage so I'm asking for the loader width and height once has finished loading and then passing these to the width and height of the mc container so it resizes accordingly. But...it doesn't work. Here is my code:

[CODE]
var pic:Loader;var totalImages:int = 10;for (var i:uint = 0; i<totalImages; i++){ pic = new Loader()  container.addChild(pic) pic.load(new

[code].....

View 3 Replies

ActionScript 2.0 :: Change Size Of Loaded Swf File (image Or MovieClip).

Sep 17, 2011

I have successfully loaded an external swf file into my own one. now what i want is to change the size of the loaded file.

the loaded file is an image and its height:500 and width:500 but what i want is to resize it to 200x200

How can i do that.

here is my code to load external image
var peelawayimage = _root.createEmptyMovieClip("peelawayimage", 7);
var mcImage = new MovieClipLoader();
mcImage.loadClip(_root.video_image, peelawayimage);

View 9 Replies

AS2 :: Flash - Use AddEventListener On A SWF/MovieClip Loaded Via MovieClipLoader?

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

AS3.0 :: Flash - Set Size Of The Loaded Image?

Sep 23, 2011

I'm loading images from xml file. I want the images to have standard width when they are displayed.

Here are the snippets of the code that do the image processing:

var allThumbs:MovieClip = new MovieClip();
addChild(allThumbs);
allThumbs.width = 200;
allThumbs.height = 200;

[Code].....

this lines, where I wanted to resize the images before they show up in the ScrollPane.

View 1 Replies

ActionScript 2.0 :: Cannot Set Image Size Of XML Loaded Images

Jun 4, 2007

I'm Loading an image into a MC based on an XML file. I'm setting the initial alpha to 0, loading the image, then setting the alpha to 100 once I see that it is fully loaded. The problem is that I want the image to be resized, which is not working. Every time I check the size of the MC once the image is loaded I get 0x0. Here preload code.

Code:
function preload(num) {
eval("image"+num).loadMovie(url[num],1);
eval("image"+num).onEnterFrame = function() {

[Code]....

View 6 Replies

ActionScript 2.0 :: [MX] Detecting Size Of Loaded Image?

Nov 17, 2002

hare is the line I use to load image to movie clip IMG:

Code:
IMG.loadMovie("photoz/"+LPIC[DAIKTYNAS[preinuse][b]]);
ignore the details..

[code]......

View 6 Replies

ActionScript 3.0 :: Add Description From Xml To The Full Size Loaded Image

Sep 5, 2010

I have a picture gallery that loads a few thumbnails into a holder via  xml and AS3. When you click on the thumbnail it loads the full-size  image into a Loader.How could I add a description from the xml to the to the full size image.[code]

View 4 Replies

ActionScript 3.0 :: Loaded Image Auto Change Its Size To Fit A Mc?

Aug 25, 2009

mc.loadMovie("01img.jpg",0);

i use a mc load a pic i want the pic can auto fit the mc's width and heigth

View 6 Replies

ActionScript 3.0 :: Add Description From Xml To Full Size Loaded Image

Sep 5, 2010

I have a picture gallery that loads a few thumbnails into a holder via xml and AS3. When you click on the thumbnail it loads the full-size image into a Loader.How could I add a description from the xml to the to the full size image.

View 2 Replies

Actionscript 2.0 :: Change Mc Size After MovieClipLoader?

Sep 21, 2009

i have some problems with image loading. Just tried loadMovie but that doesn't worked for such a 'big' (over 100kb) image. The image loading worked perfectly until i changed the size of the containing movieclip next line.That was the point when i recognized that Flash is just stupid and needs a listener for that kind of thing.So i googled and found something like that (i made a function out of it and adjusted some things):

Code: Select allfunction loadPicture(datei:String, ziel:MovieClip, props:Array){
var mcLoader:MovieClipLoader= new MovieClipLoader();
var preload:Object  = new Object();

[code].....

View 2 Replies

ActionScript 2.0 :: MovieClip Size Once Jpeg Loaded

Jun 16, 2005

I am creating an empty movieclip and loading a jpeg into it. The mc does not seem to resize to account for the jpeg's size, also the parent mc (thisClip) which is also created dynamically (with attachmovie), is set at 500 why:

thisClip.createEmptyMovieClip("theJpeg", 2);
thisClip.theJpeg.loadMovie(url);
thisClip.theJpeg.onEnterFrame = function(){

[Code]...

View 8 Replies

ActionScript 2.0 :: Moviecliploader Document Size External Swf?

Feb 9, 2009

ActionScript Code:
var container:MovieClip = createEmptyMovieClip("container", this.getNextHighestDepth());
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(this);
mcLoader.loadClip("crossball.swf", container);
function onLoadInit(mc:MovieClip) {
trace(container._width);
trace(container._height);
}

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 9 Replies

ActionScript 2.0 :: Set The Size Of An External Swf Loaded Into A Target Movieclip?

Jun 27, 2009

how i can set the size of an external swf i have loaded into a target movieclip ive got the external swf loading into the target ok but its too big.

View 2 Replies

ActionScript 3.0 :: Size Of Movieclip With Image?

Apr 20, 2010

I have a loop where I load a couple of images and I want to place them in the y-axis on stage, with 20 pixels space between them. To do this I have to know the height of each image, but as you know, I can't get the image height before it completed loading.I really don't want to do one loop for the loading, and another loop for the placing.

Code:
for (var i=0;i<productXml.productCategory.product.length();i++) {
var product_mc:MovieClip = new MovieClip();
var imgLoader:Loader = new Loader();[code].....

View 2 Replies

ActionScript 2.0 :: Referencing BitmapData Loaded With MovieClipLoader()?

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

ActionScript 2.0 :: MovieClipLoader - Content Loaded As SWF Appear Stretched

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

ActionScript 2.0 :: MovieClipLoader Doesn't Show Loaded .swf

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

ActionScript 2.0 :: Can't Resize Images Loaded From MovieClipLoader

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

ActionScript 2.0 :: Get The Stage Dimensions Of An Externally Loaded Swf Through Moviecliploader?

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

ActionScript 1/2 :: MovieClipLoader And Checking Whether Clip Was Previously Loaded

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

Professional :: Knowing When A Swf Loaded In MovieClipLoader Has Finished Animating

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

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

ActionScript 2.0 :: Sound Disappears From Movie Loaded Via MovieClipLoader

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

ActionScript 2.0 :: Using MovieClipLoader And Making A Loop To Find The End Of A Loaded Swf?

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

ActionScript 1/2 :: Load An Image Using MovieClipLoader?

Nov 27, 2011

I have loaded an image using MovieClipLoader and am using the following code to scale it to fit a photo frame:
 
var mcLoader:MovieClipLoader = new MovieClipLoader();
..
..  add listeners ...
 
mcLoader.loadClip(filePath, frame.imageHolder);[code]....
 
The code works for most of the images except images with resolution 2880 x 2880.  It did not scale properly - part of the image on the right does not show. The lower image scaled properly, but the upper one did not.The math seems to be correct

View 8 Replies

ActionScript 2.0 :: Getting The Width Of A MovieClip After New Image Was Loaded On It?

Aug 22, 2010

I'm doing an image gallery from xml file, and the thumbnails have diferent sizes. Around the thumbnail there is a border, both are diferent movie clips (thumb and border). they reside inside a main movieclip wich is being duplicated.

So I need to resize the border according the new size of the thumb movieclip, but flash actually gets the value from the starting value of the thumb, not the size after the file was load on to it.

I just thought flash would read the new value if i set the var for the width after the load movie, but that ain't happening =(.

My code so far:

Code:
function createButton(newObj, thumbNode, bigImageNode){
duplicateMovieClip(thumb_base, newObj, depthCount++);
var tempName = eval(newObj);

[Code].....

View 3 Replies

Actionscript 3.0 :: Replacing A Loaded Image In A MovieClip?

Apr 27, 2011

Hi there I am still a novice to Actionscript 3 and would like some help please. I am creating a grid style image gallery that is XML driven. What I need help with is getting my images to, at random times, swap out with another image. Each image is added inside a Movieclip and can be unloaded. What I need is to load another random image into the now empty MovieClip. Hope this is ok description.

[Code]...

View 1 Replies

ActionScript 3.0 :: MovieClip On Dynamically Loaded Image?

Jun 9, 2009

I am using Flash CS3 and ActionScript 3.0.I think there is someone who spends 2 minutes of your valuable time in providing solution for my problem or issue.

My description for my problem(with layer numbers/names) starts from here: Layer-1: I am loading an external image(.jpeg) onto the stage dynamically when "Submit" button(which is created & placed in Layer1) is clicked using the following sample code:

[code]...

The jpeg image is loaded perfectly and works fine.

Layer-2:When I click on this loaded image, a Pop-up must be visible. So, I created Pop-up in Layer2, which is nothing but a MovieClip(with instance-name myPopup), is a rectangular box with light-yellow colored background, which makes us to feel like a pop-up). So, I created this Pop-up in a layer named "Pop-up". My requirement is : Whenever I click on the image loaded, I need to view the Pop-up upon this loaded image near to the pixel-position where CLICK_Event has occured.To view an example of my requirement,just go through the following [url]Once you open the above url, then you right-click on the right-side image(which is a geographical map). You can view a Pop-up with some of the items(viz., Directions from here, Directions to here, Zoom in, Zoom out & Center map here)

Layer-3:In the same way, in my application ,I want to display few hyperlinks on this pop-up. So, I had created TextFields on the stage(which are hyperlinks) using "Text Tool from ToolsBox" in Layer3 named as "TextFields". I am accessing these TextFields using
<TextField-instance>.htmlText to make it a hyperlink.So, here my problem is: After loading of the jpeg image, When I try to click on the image, the Pop-up(MovieClip) and "Submit" button appears to be under the loaded image and the TextFields are visible over the loaded image.Hence textfields/hyperlinks visibility works fine i.e., on the loaded image as hyperlinks.

Now, What I should do in order to make the MovieClip(Pop-up) and "Submit" button visible on the loaded image?

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved