ActionScript 2.0 :: Scaling MovieClips Using Loadmovie Function

Jan 20, 2005

I am loading some thumbnails (jpgs) into some movieclips using loadmovie. Easy enough. I want to scale the movieclip to increase the size of the thumbnail on rollover. The problem is when I use loadmovie and load the external JPG it sets the the JPGs default registration point to (0,0) and when I scale the thumbnail it scales from the top left corner. I would like it to scale from the center. This is the code I am using:

onClipEvent (load) {
var thumb = "thumbtest.jpg";
loadMovie(thumb, thumb_loader);
thumb_loader._yscale = 70;
thumb_loader._xscale = 70;
} on (rollOver) {
thumb_loader._yscale = 100;
thumb_loader._xscale = 100;
} on (rollOut) {
thumb_loader._yscale = 70;
thumb_loader._xscale = 70;
}

Is there anyway to change the registration point so it scales from the center and not the top left?

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Loading And Scaling MovieClips?

Sep 15, 2010

I'm loading an external SWF file, which become a MovieClip, using Loader(). That part is working fine. I then need to scale the MovieClip to match the stage, so that when I set the width and height of the movie doing the loading in SWFobject, the MovieClip will scale too.

For example, the SWF being loaded may be 320x240, but we decide later that we want it to be 640x480 on the page. We can just change the width and height in the javascript call to SWFobject, and it should scale everything. To top it off, I'll need an AS2 version too because we might need to load AS2 SWFs.

[Code]...

View 3 Replies

ActionScript 3.0 :: User Defined Scaling Of Movieclips?

Nov 21, 2008

Is it possible to have a movieclip in FlashCS4 that can be scaled by the user once the file has been posted on the web? Scaled by dragging the corner of a loader or something?

View 1 Replies

ActionScript 3.0 :: Tween MovieClips - Proportional Scaling X And Y

Jan 28, 2011

I'm currently using the Tween-class to tween my movieclips (just the basics as x-position, etc.). But I'm struggling to tween scaleX and scaleY as the tween does not seem to take care of the centerpoint of the movieclip. I want the movieclip to scale proportional and not just from left to right.

View 3 Replies

ActionScript 2.0 :: Stage Resize And Scaling Movieclips?

Jun 30, 2007

how do I code stage resize with scaling movieclips? I can do stage resize and position/scale movieclips relative to stage size..but i don't how to have a scalable movieclip retain its scale relative to stage size. how do I code this? for example, i have a movieclip originally 50px wide, and the stage 100px wide..when i click the mc, it scales up to 80px wide. and when I resize the stage to 50px,(50% of stage size) i want the mc to scale to 40px too(50% of mc size).. and when I click it again to restore to it's original size, i want it to scale to 25px(50% of original size). then finally when i scale the stage back to 100px, the mc again is 50px wide.

View 2 Replies

ActionScript 2.0 :: Setting A Movieclips Width, Without Scaling It?

Jan 18, 2008

I have been hacking together two different tutorials to create a menu with changing images, and some animating text. Everything looks great, except the menuitems, which i try to resize dynamically depending on the menuitem-movieclip-contained dynamictext. When i resize this movieclip, the whole movieclip scales, and everything looks odd.

this is my first flash project on my own, so be nice :-)

fla file can be found at: [URL]

View 2 Replies

ActionScript 2.0 :: Preloading - Scaling & Moving Movieclips [fla: CS3]

Jul 6, 2008

Click on a thumbnail and the corresponding image is preloaded BEFORE scaling and moving smoothly from the thumbnail position to a target position. (the thumbnail is actually the container for the loaded image, and therefore also moves to the target) I have got everything to work, except that the thumbnail moves whilst the image is still loading. This problem defeats the purpose of the gallery, and I'm starting to get blurry vision now!

I hope I have made everything clear, but since this is quite difficult to explain, I have attached the fla and images. *You will need to simulate download in flash for the current preloader to work. P.s. much of the script was (heavily) adapted from an fla I found somewhere, in which the images are arranged into a circle.

View 6 Replies

IDE :: Proportional Scaling MovieClips Relative To Stage?

Jan 30, 2009

how to proportionally scale multiple movieClips relative to the stage size.

I understand movieclip placement relative to the stage, and I have been using a code to scale MovieClips as a fullscreen background (also proportionally)

But

I can not figure out for the life of me how to scale other movieclips in relation
to the stage size.

for example I have a background_mc that proportionally scales with the stage
to fill without distortion.

HOW do I then place another MC say center aligned (I know how to do that) that will scale with the background without distortion?

Ideally I would like to place several MC's on my stage all scaling in proportion with the stage yet independently.

I have not been able to find any documentation on this. lots of tutorials on backgrounds and color fills and the like but nothing on proportional scaling of independent mc's

this is the code I use for my background_mc (can it be modified or should it be thrown out the window to achieve independent scaling?)

Code:

import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;

[Code]....

View 7 Replies

ActionScript 2.0 :: Scale Movieclips Using Loadmovie

Jan 20, 2005

I am loading some thumbnails (jpgs) into some movieclips using loadmovie. Easy enough. I want to scale the movieclip to increase the size of the thumbnail on rollover. The problem is when I use loadmovie and load the external JPG it sets the the JPGs default registration point to (0,0) and when I scale the thumbnail it scales from the top left corner. I would like it to scale from the center.[code]Is there anyway to change the registration point so it scales from the center and not the top left?

View 1 Replies

ActionScript 3.0 :: Proportional Scaling MovieClips Relative To Stage

Jan 30, 2009

I need some assistance on how to proportionally scale multiple movieClips relative to the stage size. I understand movieclip placement relative to the stage, and I have been using a code to scale MovieClips as a fullscreen background (also proportionally) But I can not figure out for the life of me how to scale other movieclips in relation to the stage size. for example I have a background_mc that proportionally scales with the stage to fill without distortion.

HOW do I then place another MC say center aligned (I know how to do that) that will scale with the background without distortion? Ideally I would like to place several MC's on my stage all scaling in proportion with the stage yet independently. I have not been able to find any documentation on this. lots of tutorials on backgrounds and color fills and the like but nothing on proportional scaling of independent mc's this is the code I use for my background_mc (can it be modified or should it be thrown out the window to achieve independent scaling?)

[Code]....

View 2 Replies

ActionScript 3.0 :: Scaling True But Embedded MovieClips Glitchy

Mar 7, 2011

[URL]. I just created this piece which is two clips embedded in another. I used UILoader to embed each video, and I have scaling = true. Why is it that when I tab back and forth, the maps look slightly different every time? Shouldn't they scale exactly the same way every instance?

View 9 Replies

ActionScript 3.0 :: Stage To Prevent Scaling Of Movieclips On Fullscreen?

Mar 3, 2011

in flash AS1,2 you just input this code Stage.scaleMode="noScale";

on a frame of the main stage to prevent scaling of movieclips on fullscreen.I tried the same thing in AS3 and its not working for me. so my question is how would i apply this in AS3?

View 8 Replies

Scaling Objects With OnCuePoint Function?

Oct 23, 2009

I'm working on a project in which I'm using a background movie playing in a Movie Object and on top of that I'm showing texts and images sort of like they are in the movie itself. The way I did this is by making the movie in After Effects and giving every frame in the movie the required position, alpha and scale parameters for each object in the flash movie.

[Code]...

View 1 Replies

ActionScript 3.0 :: Adding A Scaling Function

May 19, 2011

I have this actionscript program that explodes a bitmap as you run the cursor through it. What i want to be able to achieve is as the bitmap particles move to the bottom left of the screen, i want them to grow in size, and as they move to the top right i want them to get smaller and so look like a 3D effect. I am having no luck with assigning scale variables to the bitmap particles.

View 1 Replies

ActionScript 2.0 :: Scaling Navigation With Hide Function?

Jul 17, 2008

i took a look at many menus and treid to find the right one for me. I think I've found it: http:[url]...at the bottom, theres a menu that scales in relation to the mouse position. an when you roll over it comes up. the selected item is shown also when it's closed again. how to realize this. I only worked some times withe the laco tweening class but how can i build up that really cool menu?

View 4 Replies

ActionScript 3.0 :: Replacing The LoadMovie Function

Oct 11, 2009

I have a website which needs to 3 images into 3 movieclips when the page loads. The page gets the URLs for the 3 images from an XML document, ie.

<imgurl>graphics/panda.jpg</imgurl>
<imgurl>graphics/panda2.jpg</imgurl>
<imgurl>graphics/panda3.jpg</imgurl>

What I want to do is make a function which gets the image URL for each image and puts them into a target movieclip each. In AS2, the loadMovie function could do this. In AS3, I've figured out how to add an image to a movie clip, like this...

[Code]...

View 6 Replies

IDE :: TypeError: Error #1006: LoadMovie Is Not A Function

Nov 9, 2009

I've been trying to load an external SWF but keep getting this error:

TypeError: Error #1006: loadMovie is not a function.

This is the code I have:

Code:
location.loadMovie("video.swf");
"location" is the mc that loads "video.swf"

This used to work in other versions of flash but for some reason now it doesn't in these higher versions of flash?

View 3 Replies

ActionScript 2.0 :: LoadMovie Function Not Loading JPEGs Into MC

Apr 22, 2004

I've used loadMovie() often in the short time I've been using Flash. But never to load a JPEG dynamically. For a site interface, I have little thumbnails, which open to new browser windows. This is partly annoying though, as each one opens in it's own window, so the user would have to close a whole bunch of 'em after clicking all those thumbnails. To try to fix this, I read that JPEGs can be loaded at runtime onto the stage. I've already seen the photo gallery tut, but I only require a pop-up window with one image and no left/right buttons, etc. I've tried following the tutorial for the first few steps, making a shape the size I want the images to be, converting it to an MC, and naming the MC instance on the stage.

Then, I created a new layer on frame 1 with Code:
loadMovie("CS_00_1.jpg", _root.picture);
But when testing it, I see nothing.

I've tried a few different things. Before, the fla was in a separate folder, so I had to include "Screens/" in the name. Just in case that was the problem (I didn't get any errors in the Output), I moved it into the directory with the images. I tried absolute and relative addressing. I opened up the image in PS and resized it to the size of the symbol on the stage and made sure it wasn't Progressive (I read in a thread that Flash doesn't load Progressive JPEGs), but still nothing. I even tried loading a file that didn't exist to make sure it was looking in the right place the other times (as it didn't give me any error).

View 6 Replies

ActionScript 3.0 :: Disable RollOut Function On Movieclips On Click Function?

Sep 13, 2009

I'm doing a basic site with frame labels on the main timeline whose name corresponds to the btn names. A simple  otoAndPlay(evt.target.name); I have a basic navigation setup of 7 mcs with mouse eventlisteners for CLICK, ROLL_OVER and ROLL_OUT.
 
Example:
prepare.addEventListener(MouseEvent.CLICK, navigate);plans.addEventListener(MouseEvent.CLICK, navigate);retire.addEventListener(MouseEvent.CLICK,

[Code]....
 
Does anyone know a better way to do this so when my mcs are clicked they display the rollover content/art? In essence I'm trying to achieve that when the user clicks a btn it goes to that "page" and the corresponding btn stays highlighted. Pretty standard web navigation technique but I just don't know what the best way to do this in flash is and with  how my site is setup.

View 1 Replies

Loadmovie Function To Load Movie In Liquid Template

Feb 24, 2009

I am using loadmovie function to load movie in a liquid template.[code]Movie loads fine in right position but as soon as window gets resized it goes out of its place to the TC position.What can do here to make movie stays in its place once window is resized?

View 2 Replies

ActionScript 2.0 :: LoadMovie With SetTimeout Delay Function Not Working

Aug 16, 2009

I'm trying to load a .swf into a containerMC with a button action. I want it to delay the loadMovie action for 1 second to allow an out animation to finish playing. The buttons (next and back) are in a MC on the main timeline of the swf.

I have this code in 1st frame of main timeline:

_global.nextMC = function() {
_root.containerMC.loadMovie("images/folio/chevron.swf");
};

[Code].....

I feel like I'm close, but probably just am missing something here in my setTimeout syntax.

View 2 Replies

ActionScript 2.0 :: Loading External Swf Files Through The LoadMovie Function

Dec 7, 2005

I want to load an external .swf file through the loadMovie function. The problem is flash takes sometime to load the file and therefore what ever commands I put below the loadMovie function, will not work. Placing this commands say 10 frames from the loadMovie function works but when online and you have a slow internet connection, it yet again fails. How do I solve this problem? I tried using onLoad but from what I gathered from several sites, it will not work with LoadMovie.

View 6 Replies

ActionScript 2.0 :: LoadMovie Function Block Out MovieClip To Fade In

Sep 21, 2003

When you use LoadMovie to load a SWF, does that SWF stay loaded, or does it get reloaded every subsequent time you use the LoadMovie function for that same SWF? I use the LoadMovie function in several buttons to load SWFs into my movie. In those same buttons, I use a function which fades a different (already present) movieclip in. However, the LoadMovie call seems to block out the movie clip which needs to fade in; when I click the button, it loads the SWF just fine, the movieclip just doesn't fade in (or it does, but I can't see it), when I comment the LoadMovie call out, the movieclip fades in just fine (and I can see it). Also, I load the SWFs into an empty movieclip, which is beneath all other layers, so that's not the problem.

In my button:
Code:
on(release){
_root.home.fade(0,100,10);
_root.content.loadMovie("home.swf");
}

I've tried:
Code:
on(release){
_root.content.loadMovie("home.swf");
_root.content.swapDepths(1000);
_root.home.fade(0,100,10);
}
But, that doesn't get me anywhere, either.

View 4 Replies

ActionScript 2.0 :: LoadMovie Function Called From An Embedded Swf Is Responding

Nov 13, 2004

im using this method [URL] transitions.htm to load movies and create transitions between them for my site.. I have read the technique thoroughly and im fairly sure the code and structure I have used is correct however the loadMovie function called from an embedded swf is not doing anything and I cant work out why.. on the main timeline there is a container movie that the swf files are loaded into, the intro sequence is loaded through an action on frame 1:

_root.currMovie = "introsection";
container.loadMovie(_root.currMovie+".swf");

this works no worries.. but when the container is targeted from inside the introsection.swf movie nothing happens, this is the code used: _root.container.loadMovie(_root.currMovie+".swf") I have tried variations with this and nothing works.. the container movie has the correct instance name and the code works from the main timeline but not from within another swf.

View 11 Replies

ActionScript 3.0 :: Flash MovieClip / Bitmap X,y, Width,height After Scaling For CopyPixels Function?

May 18, 2010

I have a 50x50 fixed rectangle in the center of the stage. I am using this rectangle as a "hit area" to copy pixels of a bitmap that is draged by the user to line up an area of the image he/she would like to crop.I have preview of the hit area displayed while the bm is being dragged which works well. However, once the bitmap is scaled using the slider component the preview area no longer reflects what is in the hit area.

Code below:

function mouseDownHandler(e:MouseEvent):void
{
// Contraint #8 - Define drag bounds[code].....

View 1 Replies

ActionScript 2.0 :: Random LoadMovie Function - Location Of External SWFs

Apr 5, 2005

I'm having a problem with embedding a Flash movie that loads an array of SWFs- specifically, ones that exist in the same movie as the .fla loader file. When I move the external SWFs and .swf load_movie file into a separate directory from the HTML file, they do not load properly. I get just a white window. [URL]. When I keep the SWF movie clips and load_movie.swf in the same (root) folder as the .html file, then everything loads properly, though. But this would extremely clutter up my directory!

The code is as follows:
MovieClip on Stage
onClipEvent(data){
//test to make sure it's completely loaded, when swf's load this way onData is called with each 'chunk' of data
if(bytesLoaded()==bytesTotal()){
this.onEnterFrame=function(){
if(_currentframe==_totalframes){
_root.loadNextMovie()
[Code] .....

I 'm not sure if there is a way in loadMovie to specify another folder, or the best way to solve this problem. I'm relatively new to Actionscript.

View 3 Replies

ActionScript 2.0 :: No Resize/scaling A Movie Clip On The Scaling Stage?

Mar 11, 2008

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.

View 2 Replies

ActionScript 3.0 :: Scaling Button Background Without Scaling Text?

Feb 23, 2009

I'm building some navigation that extends all the way from left to right across my SWF. When the window resizes, I'd like the nav buttons to get wider but not have the text on the buttons get wider.

The buttons themselves are rectangles with a vertical gradient and a stroke around the outside. I'm using 9-slice scaling so the stroke doesn't scale, but the middle (gradient) gets wider or narrower.What'd be great is to be able to select an object or layer and say "don't scale, even if the rest of this movie clip scales". Is there a way to do that, or will I have to do it via actionscript?

View 1 Replies

ActionScript 2.0 :: Use LoadMovie Function Inside Loop To Load External PNG Files / When Game Is Loaded

Jan 19, 2009

I'm trying to use a loadMovie function inside a loop to load external PNG files when my game is loaded. Unfortunately, I can't get even a single loadMovie to work correctly, much less execute a bunch of them.The code is on the root time line, and is targetting an empty movie clip that is nested inside about 3 levels. There is a button, with a movie clip on it, and the empty clip I'm trying to load into on that.so the full target path is myBox_00.smallBox.myLogo(myBox_00 is the button, smallBox is the movie clip, and myLogo is the empty)[code].I even tried using a JPG image instead of a PNG and still no luck. The best I could do was number 4; and that didn't work, all it did was SOMETHING instead of NOTHING... unfortunately that something was to make the button (myBox_00) disappear entirely T_T.I've never had much luck with loading external images. What am I missing here?

View 9 Replies

ActionScript 3.0 :: Scaling Movieclip Not Scaling But Repeating?

May 20, 2010

i have a diagonal movieclip that I am trying to scale along with the background video. The background video scales perfect, I am attaching the diagonal movieclip (br in the code as bottomright) with addChild
Instead of scaling with the window, it seems to repeat such as the image is displaying. this is the main section of the code that is doing the scaling
 
var br:mc_bottomright = new mc_bottomright();
addChild(br);
//proportional scale
if ((stage.stageWidth / stage.stageHeight)> (owidth/oheight))

[code]....

View 4 Replies







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