ActionScript 2.0 :: Scaling Loaded Image Or Movie In Flash Container
Oct 11, 2010I need to scale the loaded image or movie in a flash container without loss of quality, how to do it?
View 1 RepliesI need to scale the loaded image or movie in a flash container without loss of quality, how to do it?
View 1 RepliesI'm trying to add zoom functionality to Lex Talkington's great Panning Class HTML Code: [URL] and have run into the following issue: I cannot seem to get the image to scale without also scaling the container _rectangle. Here's my code
[Code]...
[URL]
Click on one of the menu options - "corporatecommunications" or "events&entertainment"
I fixed the earlier progressBar problem, but when you click on an image thumbnail to load it, it pops up regular size for maybe 1/30th of a second before being scaled to the proper size.
Here's my code:
Code:
// set a variable to hold image name
var imageNow:String;
// scale empty movie clip that will hold the image
function iHoldSize() {
[Code].....
i'm a designer trying to step up my flash skills and have a scripting problem that's causing me trouble. essentially i have a child swf loaded into a container in a parent swf and want the child to be able to instruct the parent. to explain in full, the child contains an flv with bespoke video player components. it's container sits in one frame of the parent. when the flv finishes playing, i need the parent swf to move onto another frame.
as it's a controllable flv, it isnt possible to predict the exact length of time the child will need to be present, so it literally needs to tell the parent it's finished playing at that very point.
[Code]...
I am trying to create a gallery where the thumbnails scroll across the bottom and when you click on the thumb a new large image opens up on top of it from the same image.
What i would like to do is open up the large image but draw a box around this image so it blanks out the background of the site and all you see is that picture.
Its a similar function to the way this site works;
[URL]
I am completely new to ActionScript. I am nesting an SWF in another SWF container to be able to send the clicks from the flash object to the javascript outside. I am able to receive the clicks outside and that part works fine. But the inner content is not scaled to the size of the outer container. I use mxmlc from the 3.5 SDK, without any additional parameters except the actionscript filename, to compile the actionscript to SWF. How can I make the inner content fill up the container?
Here's the ActionScript:
package
{
[code].....
I've search through all the threads with "scaling" and "resizing" and can't find the solution.
Basically I have a GUI element on a gallery that I don't want to scale, while the rest of the page is free to resize/scale.
I think I need to add a listener of some sort to the stage, but I'm not sure how to do this.
I've got a container(sprite) with children(sprites) added to it. When I scale the container, I would like to get the new width of a child, but when I trace the children's width I always get the original dimensions, even though everything gets visually scaled as it should. How do I overwrite the children-width ?
Update: I just found out that the children.graphics-"dimensions" could have caused the problem. When I leave the graphics, everything seems ok. Is it possible to scale the graphics at same time as the child-sprite?
I have a container object that i add children to. I want to change the height & width of the container without the children scaling. In this case I draw a rectangle in flash which I'll use as the container object then export for AS.
[Code]...
I used guestbook form here:[URL] and when I load it into a container in the flash website the guestbook doesn't read the data from txt file. It works ok when it's alone.
View 1 RepliesI am targeting a a movie clip. The problem is that all the syntax I have found for targetting clips looks like this: _root.sample_mc.sample2.mc. etc. The problem is, my target clip is in an swf that I've loaded into a container clip from my main timeline. So, essentially, I have a home.swf that loads menu.swf into a container called 'location'. In menu.swf, I have an MC called center, which contains the MC I am targetting called 'target'.
View 2 RepliesI'm having problems scaling images in Flash with ActionScript 3.0. The only way I can see to get the quality decent is by using smoothing, which drastically hurts performance.
The thing that confuses me is that I made the same site in ActionScript 2.0, targeting Flash player 7, and the image quality is fine when scaling even without smoothing. As soon as I target Flash player 8 (or 9 with Actionscript 3.0) the quality degrades when scaling.
I don't have to move back to Actionscript 2?
can scale a group of images with different sizes into one fixed size?
In other words, I have an array of images coming into my movie. that have different sizes. I place each image upon a Mc that resides inside another movie clip and resize accordling. The problem is, all of the images have to be the same size. I want to be able to import any size image and scale and resize it to a specific size.
I'm working on a fullscreen application that doesn't run flash on the browser. Running Flash player 10. When you open the file, I have fscommand to run fullscreen, the flash file is built at 1280 x 800, and I have an image (menu screen) that starts off the flash file. I'm trying to find a way to center the image to the native SCREEN resolution, not the flash resolution. Is that possible?
I have this code running on the menu MC:
onClipEvent(enterFrame){
this._x = Stage.width /2;
this._y = Stage.height /2;
}
I've tried other variations of this, and no luck. On my 1280x800 native resolution monitor, it's great. Tested it, and it works. However, if I run the same file on a 1920x1080 monitor, the image is on the lower right hand corner. Also, the image at the moment has a center anchor point, but I'm sure you realized by my simple code. Also, just escaping the fullscreen mode, and scaling the window also screws up the formula. So I'm not sure what I can do to make it dead center no matter the screen res, or size of window. The reason I need to do this, is also because there are times where I have to change the flash resolution, and I don't want to go into the image everytime to adjust the center.
I have a problem where the images look a little pixelated because they have been scaled down alot, just need a way to make everything appear smoother.
I need the game I'm making to look high quality and also work at different resolutions so when I made all the graphics I made them massive and same for the stage size in flash.
The stage size is 2000*1500 and it's being scaled down to 800*600 which is an exact ratio, I didn't expect to see pixelization when scaling the images DOWN, that's why I made them so large.
If there's no options for smoothing things out, then does anyone know the best option for swapping images at run-time? This way I can have pre-made images for all the most popular resolutions.
I have code that allows users to upload images, which are of any dimension and file size, and have applied that data to a bytearray and a loader class, which is then displayed and saved to the server. The server has a memory size limit per file of 256k. Everything works well unless the image is too big. How to change the size of that source image so the server will accept it. I've been trying to assign the loader data, or the bytearray, to a Matrix, or a Bitmap, or a BitmapData, figuring one of these can scale the dimensions of the image which will bring down the file size. (To be completely clear: this isn't movieclip.scaleX -- that doesn't affect the size of the source image)
Code:
var _clickMe:ClickMe = new ClickMe();
var _imageLoader:Loader=new Loader();
var bytes:ByteArray=new ByteArray();
var fileRef:FileReference = new FileReference();
var _faceBitmap:Bitmap = new Bitmap();
[Code] .....
I am trying to load different image galleries into a container flash file. Each image gallery will be in a speparate swf that can be loaded/unloaded from the main swf. I get the first gallery to load and function fine, using the following code:
var ldr:Loader = new Loader();addChild(ldr);ldr.alpha = 0ldr.y = 110ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, loaded, false, 0, true);ldr.load(new URLRequest("folio.swf"));
[Code]...
i need basically is i want my flash banner in the browser to be resized according to the browser width i have published that banner and the resulting published HTML file from flash works out just fine but the problem i am facing is that i want to insert that resizable flash to an existing HTML page but when i copy that flash file from the published HTML page to the html file where i want the flash banner to be displayed it does not work..
View 5 RepliesI am needing to load an external image (probably jpg) into a movie. I am using an empty movie clip, giving it an instance name and the code:
Code:
instance1.loadMovie("image.jpg");
What I also need to do is be able to either place that image in a specific location on the stage or just center it. Any advice you can give me on that?
I am attempting to do something like this: Use two movie clips. One is a holder that contains the second movie clip, which is where the image is actually being loaded. Then, I am using the following math:
Code:
instance1.isntance2.x - instance1._width/2 instance1.isntance2.y - instance1._width/2
Does this look like it would work? Is there anyway I can set instance1 to have a width that is equal to the size of the main movie (1024 x 768)?
I'm trying to resize an image loaded in a movie clip, so that any image I load will always fit correctly in my movie.The script is pretty simple, it reads an xml file where they should be 6 records. Loads the image in the Thumb attribute in on of the 6 containers eg. _root.screen.Event1
Code:
for (i=0; i < 6; i++){
MyEvent = Event[i].attributes ;
_root.screen["Event"+i].Title.text = MyEvent.Title ;
[code]....
It works but not as expected. It looks like only the container is scaled down not the image really.
I am making an infinite menu that is fed by xml. my xml looks like this
<images>
<image>
<path>images/angel.jpg</path>
<url>circle.swf</url>
<caption>nr 1</caption>
</images>
Right now when you click on the image the circle.swf is loaded in the movie. actionscripting is like this
this is where the images are loaded:
[Code]...
I'm not sure if this can be done, but I'll try my luck here I've loaded external jpg image using loadClip method... Now i want to attach the same image to another dynamically created movie clip. I know i can attach images from library but i need it on this way.
It have to be attached as JPG. I know for bitmap data class and I am already using it but don't know how to attach jpg.
I want to have an swf load an image file in an image container within the swf from the querystring. 1. In the query string I'd like the extension of the image file to not show:
2. In the swf I might have more then one place where the same howdy.jpg loads, but in different sizes. Which method would keep the aspect ratio of original and resize to fit varying container sizes?
3. I have some javascript parsing code with an swf example that I got from this page. [URL] But when I tried to alter the fla for my use it didn't work. I wasn't able to find 1 line of actionscript in the query.fla.
i've looked at several ways to centre a dynamically loaded image into a movie clip for the purpose of zooming the image once loaded. I am loading multiple images (16 in total) at a time and they are all 360 x 360 in size. So what i want to do is set 180,180 to be the centre of the loaded image.
This sounds easy to me but in practice i'm finding it impossible (although i know it isn't as i've seen similar examples doing this).
[Code]...
I'm having some strange luck in building an image slide show.I load the image paths into an array from an XML page and then step through the array elements w/ forward and back buttons.I have an empty image clip on the stage where I create an empty movie clip inside each time a new image is loaded.I load the image into the second movie clip like this:[code]Now, 98% of the time this works perfectly, but there is some certain times where the image resizing is completely ignored and the image gets loaded as it's normal size.Can anyone see why the image sizing get's ignored in some instance?
View 1 RepliesI'm having a difficult time trying to figure out how to make loaded external SWFs the same size to fit into the movie clip they are being loaded into (in this case just a rectangle named container). I need all of the swf content showing but none of it outside of the movieclip. I saw another thread posted that just said to make all of the SWFs the same size.
View 2 RepliesI 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 RepliesI am working on a project where I require to load an external swf movie in a container at frame3 when I click on a button at frame1. And at he same time the movie should fit exactly into that container. And at the end of the movie it should bring back me to the frame1, where all my buttons are there. Another thing is my first frame of the external movies which I have to load is blank so I want to load a movie directly from frame2 or a specific frame.
View 1 RepliesI have to place a flash movie into an existing layout. It is replacing placeholder image of the same size. The DIV holding the image has a negative top margin. When the flash movie is placed in the same spot there is a gap at the top of the DIV equal to the amount of negative margin. I cannot seem to get the movie to move to the top of the DIV (FF3).
View 1 RepliesIs 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