ActionScript 2.0 :: Resize Through LoadMovie?
Jan 13, 2010
I am using the folling to load a game into my flash site
ActionScript Code:
var container:MovieClip = this.createEmptyMovieClip("container", this.getNextHighestDepth());
container._lockroot = true;
container.loadMovie("Mobile2.swf");
It works fine but I have another game which is too big in its raw state. Is it possible to scale it using actionscript so when it loads it loads with requested dimensions?
View 3 Replies
Similar Posts:
May 5, 2004
I'm wanting to load different sized .swf into the same field and I want the field to adjust (preferably some smooth transitions for the size change) to fit the size of each different .swf loaded. I've seen it done on quite a few sites but I haven't been able to find a tutorial of any kind addressing this specifically'm keeping it simple, i.e. thumbnails with titles above or off to the side; click one; the field where the .swf will play adjusts itself; .swf loads and plays. When completed, user can click another thumbnail and the previous .swf will "unload" then the field adjusts for the new .swf and the new one loads
View 3 Replies
Jun 4, 2010
I'm working the "Battlefield 2" flashmenu.The flash is based on Flashplayer 7, however it supports png loading.Some functions on the other side are not supported.Now I need to resize a loaded .png image somehow to the parent MovieClips original size.I cannot use the MoveClipLoader class as this is not supported.So I need to stick with the loadMovie method. Then however I have the problem that the loaded image returns width and height values of 0.I think this happens since the image is not completely loaded when flash requests the values.I tried to compare getBytesLoaded() and getBytesTotal() already, these however seem to be not supported either.
View 4 Replies
Jul 30, 2003
i have 2 scripts that work fine on their own... but i can't figure a way to combine them.the first part resizes an 800x600 image to match the screen size:
bgHolder_mc._width=Stage.width;
bgHolder_mc._height=Stage.width/4 *3;
this works fine on its own if the image is on the stage.the other pulls a random image and loads it into bgHolder_mc:
backgrounds = new array ("background0.jpg", "background1.jpg", "background2.jpg");
function randomBackground () {
randomNumber = random (backgrounds.length);
[code].....
View 2 Replies
Sep 19, 2011
I am working on image and i like to scale or resize the image by dragging and resize option.same working as "free transform tool" in flash (design part); i need same functionality in application.
View 7 Replies
Jul 7, 2011
I'm having a bit of a problem here. As per the title, my flash swf file works fine when tested from the IDE, but when I publish it and open it through the browser, the stage doesn't seem to resize along with the window.I post below a bare-bones example. The "back" movie clip should resize, only it remains at the starting dimensions
Code:
import flash.events.Event;
import flash.display.MovieClip;
[code].....
View 9 Replies
Jul 29, 2009
I have Buttons which I have rotated vertically within a Canvas, that is working fine. The problem occurs, when the user resizes the window to a small size a vertical scroll bar appears, I would rather have each button squashed upto a smaller size.
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="40" maxWidth="40" xmlns:myComponents="myComponents.*"
horizontalScrollPolicy="off"
[code].....
View 2 Replies
Dec 8, 2010
I'm having a little issue with the resize event and resize effect of a VBox.
I have something like this:
<mx:VBox id="container"
backgroundColor="0xFFFFFF"
backgroundAlpha=".9"
paddingTop="15"
paddingLeft="15"
[Code]...
View 3 Replies
Jan 4, 2009
I have a main movie here that loads in an external swf through a container mc. everything is aligned and positioned to where it should be, and they are also set to that value onresize. the problem is, when my swf is loaded in, it works fine and is in the right position, same when you resize it. BUT, if you resize the window before the swf is loaded, it misaligns, until you resize!!
View 2 Replies
Sep 28, 2010
I have a datagrid that occupies 100% of browser screen. I want the grid to automatically resize when the browser is resized to small or full screen.
View 1 Replies
Sep 9, 2009
I've got a large bitmap (1920 x1306) that my client wants as a bg image, scaled to the swf size on load (930 x 575); but that can "grow" up to its original size if/when a user expands the browser window. All the rest of clips in the display list are to remain in place (except for a copyright clip, which they want to always be 14 pix above the bottom of the browser frame. I've tried loading the bitmap dynamically at full size and then using scaleX,scaleY to set it's initial smaller (930x575) size, and I've tried just setting the height/width of the dynamically loaded image using the math of scaleX,ScaleY just in case the scaleX "transformed" the bitmap so that it couldn't return to its original size. Both make the bitmap the right size. But the resize function below did nothing to it, (or the copyright.y.) THEN I tried just putting the bitmap into the display list (both sizing methods work here, too). But even as an original member of the compiled display list, the resize event is still not reaching the target. Everything I've seen on the web says this should work - but...no luck.
Here's the AS3 code in the 1st frame of my swf:
import flash.display.Stage;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
[Code]......
View 1 Replies
May 11, 2010
i am creating flex 3 component when i re size the window i need to re size the labels and text.how to do this?
View 1 Replies
Jul 23, 2009
I am really stuck with a loadmovie action that I cannot find the solution to. I have a website that I had to split up as the loading time was too long. I have used a loadMovie function and it loads the external movie but the problem is that the external movie requiring a little bit of time to load I want a preloader to come first.
I have attached screenshots of this (wssmain liks to the arch_mc1) . The problem is that the movie loads but the preloader doesn't play. Anybody has any ideas why?
The first screenshot shows the wssmain whereas the second (preloader2) shows the arch_mc1. If the fla files are required I will make them available for download.
[Code]...
View 2 Replies
May 2, 2011
I load my external image into emptymc which is inside mc_container:loadMovie("myimage.jpg", mc_container.emptymc); //placed on main timeline.This works fine. However when I go to a different frame within mc_container(specifically a frame without an instance of "emptymc") emptymc gets unloaded. As soon as I go back to a frame containing "emptymc" it no longer has the jpg.Is there a way I can keep the jpg loaded in emptymc without having to load it again?
View 2 Replies
Jul 2, 2009
I am very new to Flash and have been going around in circles for days trying to figure this out.I can't get swf to loadMovie when on server. I understand I need to use the path relative to the html page.[code]
View 1 Replies
Jan 18, 2010
I've been trying to load a simple .swf (home.swf) and have it play automatically on my existing fla project (as2). These are the steps I have taken.. 1) create MC, named "holder" 2) within first frame of MC, entered in.. loadMovie("home.swf","holder"); Nothing is showing, I'm not sure what I'm doing wrong. If you can help, I can send you the files I'm working with.
View 2 Replies
Jan 30, 2009
I am working on my first flash website and have been working on loadMovie & unloadMovie. The commands have been working for me and it will load & unload the external .swf in a contentHolderMC. The problem that I am encountering is the loaded .swf width is correct but the height is being reduced, I would guess to about 75%. Is there a way to maintain the external .swf's size? Even if I need to put the code into the external .swf.
I have tried creating a mask inside the contentHolderMC to match the size of the external .swf. When I have looked around for clues to the resizing, I am finding tutorials on how to resize the external .swf into a smaller Movie Clip. That's not what I am trying to do.
View 2 Replies
Feb 11, 2009
I have this problem: in my swf on frame 100 is a code:
Code:
loadMovie("second.swf", _root.clip1);
I have mc with isntance name: clip1 The movie second.swf loads into the position of clip1 but it's originally very big and I want it to make it smaller so it will fit to my site, if possible i would also like it not to be resizeable (so when someone will have smaller browser window it wouldnt move)
View 4 Replies
Oct 1, 2003
I need to be able to load the movies over the top of one another so that you can still see the movie under it....Can this be done ?????
View 8 Replies
Feb 15, 2009
I am using loadmovie AS2 function PHP Code:
stop ();blankmov.loadMovie("newmovie.swf") to load external movie in my main flash file and it works fine, except one problem which is the new movie that loads in the main movie becomes transparent so there is no background displaying in this new external movie. Is there a way to use loadmovie function so that new movie holds its background and it does not become transparent?
View 1 Replies
Aug 18, 2009
I'm making a game where every level is a separate swf. The problem is, when each level starts, it doesn't load entirely before displaying on the screen, and gives me unpredictable results. I also don't want load waits between each level.Is there some way to do all my loadMovie's at the start, loading them into some place where they wont actually be on the stage, and then calling them out one by one as you play each level of the game?
View 3 Replies
Dec 4, 2009
I'm having a problem loading a external.swf from another folder outside of my main.swf. This external.swf is being loaded into a empty.swf movie clip. It works when the external.swf and the main.swf are in the same folder, but when i place the external.swf into a images/folder and change the action toloadMovie ("images/external.swf", "main"); it no longer works. Did i target it wrong?
View 1 Replies
Jul 20, 2010
I'm not much of a flash programmer, and am a bit lost. What I want to do is the following. I'll have a SWF with two layers, which is being called from a PHP page on my site. The top layer is just an invisible button, and I'd like it to link to a URL that I provide from the PHP page. The bottom layer I would like to load a separate SWF file, whose path I can also provide from the PHP page. I have the URL and the SWF path working just fine in PHP, but I don't know how to pass those values to flash, or how to get loadMovie to work like I want it. Can anyone provide some guidance?
View 7 Replies
Jun 4, 2011
First things first, please don't recommend I change to AS3 for this. I know, but It's far too late for that and not my project to be dictating..So I'm loading some external swfs in with the loadMovie command, in the normal manner with a button:
Code:
on (release) {
loadMovie("swfs/example-1.swf", _root.container);
}
But what I need, is to wedge a preloader in there somehow. As the swfs are around 1mb each.I'm already using the following as a preloader for the main file, so an adaptation of it would be very welcome so I can co-ordinate the graphics.With this on frame 1:
Code:
var amountLoaded:Number = _root.getBytesLoaded() / _root.getBytesTotal();
preloaderText.text = Math.round(amountLoaded * 100) + "%";
And this on frame 2:[code].....
View 1 Replies
Oct 9, 2009
Im using AS2. Now, i got this trouble: when i load an external movie into the main one, i had some errors if i put it into a containter mc, with this code: Code: loadMovie ("movie.swf", containter_mc); The scroll bar not only move the movie.swf object, but the container_mc too... So, i just load the movie without using a container, with this code: Code: loadMovie ("movie.swf", 2); And suprise! now the scroll bar works just fine. But... How can i position the movie into the main one? Like: movie._x = 200; movie._y = 200; How can i do that in the right way? (Sorry, but my english its not good enough ha! )
View 2 Replies
Feb 16, 2011
I'm loading many movies in a moan movie into mc instance name "movieHolder" I need something to happen only IF the first movie is not loaded. How can I check WHAT movie is currently loaded in movieHolder?
View 14 Replies
Jun 22, 2011
The "scroll_right" image shows up, but in Debug, _root.win_Main.scroll_right.bar does not exist after this code is called. However, _root.win_Main.scroll_right DOES exist.
Code:
var win:Object = _root.win_Main;
win.createEmptyMovieClip( "scroll_right", win.getNextHighestDepth() );
[code].....
View 5 Replies
Mar 10, 2011
I have a flash movie that loads an external image into a movieclip with the following code:
Code:
//Load image
loadMovie("myimage.jpg",_root.moviebox.picturebox);
[code].....
View 1 Replies
Feb 24, 2009
I want is it load an external swf on the click of a button, then unload it to load another swf on the click of another button. heres a sample code of what did.
Code:
stop();
//loading first movie
container.loadMovie("movie.swf");
[Code]....
View 0 Replies
Oct 9, 2009
I am using AS2 to create the whole movie. Now, I got this trouble: when I load an external movie into the main one, I had some errors if I put it into a containter mc, with this code:
Code:
loadMovie ("movie.swf", containter_mc);
The scroll bar not only move de movie.swf object, but the container_mc too...
So, I just load the movie without using a container, with this code:
Code:
loadMovie ("movie.swf", 2);
And surprise! now the scroll bar works just fine.
But, How can I position the movie into the main one?
Like :
movie._x = 200;
movie._y = 200;
View 1 Replies