Scaling JPG To MovieClip Container
I“m loading a JPG image into an empty movie clip as an Holder.I want to scale the JPG to the Holder“s size.Loading is not a problem, scaling neither, but ....to get the loaded JPG _width and _heigth is burning my mind below is the code section I“m using inside an class Code: var imgHolder = detail.createEmptyMovieClip ("imgHolder", detail.getNextHighestDepth ()); var my_mcl:MovieClipLoader = new MovieClipLoader ();// Create listener object:var mclListener:Object = new Object ();mclListener.onLoadError = function (target_mc:MovieClip, errorCode:String, status:Number){ trace ("Error loading image: " + errorCode + " [" + status + "]"); }; mclListener.onLoadStart = function (target_mc:MovieClip):Void { trace ("onLoadStart: " + target_mc); };mclListener.onLoadProgress = function (target_mc:MovieClip, numBytesLoaded:Number, numBytesTotal:Number):Void { var numPercentLoaded:Number = numBytesLoaded / numBytesTotal * 100; trace ("onLoadProgress: " + target_mc + " is " + numPercentLoaded + "% loaded"); }; mclListener.onLoadComplete = function (target_mc:MovieClip, status:Number):Void { trace ("onLoadComplete: " + target_mc._width + " " + target_mc._height); };my_mcl.addListener (mclListener);my_mcl.loadClip ("cristo.jpg", imgHolder); I thougth I could get target_mc._width and target_mc._height after the Load is complete and then apply the proper xscale and yscale to imgHolder but I get ZERO for both.What am I doing wrong ?Thanks any helpJoćo CarlosRio Brazil
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX 2004
Posted on: 02-27-2006, 04:40 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Container MC Scaling Problem
hi,
i guess a real beginner question -
i am working on an image gallery, in which the thumbnails will float up and down randomly, with the stageHeight as border.
This works all fine, but now I wanted to add it to a container, so I can change it to a new size (making it bounce not on the entire stageHeight).
Pls see code below, just a simple example without the floating function and only two testboxes, but enough to show the problem:
var container:MovieClip = new MovieClip();
addChild(container);
/*including the following lines doesn't display anything anymore - leaving it out works fine:
container.height = 400;
container.width = 400;*/
var firstBox:TestBox = new TestBox();
var secBox:TestBox = new TestBox();
container.addChild(firstBox);
container.addChild(secBox);
firstBox.x = 50;
secBox.x = 350;
Leaving the 2 lines in question out sizes the container to the whole stage again ...
pixum
Problem With Container MC Scaling
hi,
i am working on an image gallery, in which the thumbnails will float up and down randomly, with the stageHeight as border.
This works all fine, but now I wanted to add it to a container, so I can change it to a new size (making it bounce not on the entire stageHeight).
Pls see code below, just a simple example without the floating function and only two testboxes, but enough to show the problem:
var container:MovieClip = new MovieClip();
addChild(container);
//including the following lines doesn't display anything anymore - leaving it out //works fine:
//container.height = 400;
//container.width = 400;
var firstBox:TestBox = new TestBox();
var secBox:TestBox = new TestBox();
container.addChild(firstBox);
container.addChild(secBox);
firstBox.x = 50;
secBox.x = 350;
Leaving the 2 lines in question out sizes the container to the whole stage again ...
pixum
Movieclip Container Question
Hi,
Was hoping someone could help me out with this?
I have a button on the main stage that when clicked loads a jpg into an empty movieclip container, also on the main stage. Is it possible to be able to click on the jpg when its loaded in the container and have it open a larger window?
I have two scenarios: (1) where you click on the jpg and it opens another window that links to a website, and (2) where clicking on the jpg opens the jpg in a larger window but with the ability to specify the size of the new window?
Hope that makes sense?
Changing Container Of A Movieclip
Hello,
From what I understood, attachMovie takes a symbol (e.g. a movieclip) from the library and attaches it to a movieclip. Given this, how can I attach a movieclip that was created dynamically at run-time (hence no symbol defined into the library) to another movieclip.
I try to dynamically change the container of a movieclip.
Thanks for your help,
Cyrille
Add A Bitmap To A MovieClip Container
Hello, I've run into another hitch while fooling around with my little chess game. Heres the problem, I want to load external images into an array called: arrayImages. Then I want to take those images and put them into customized movie clip containers so that the user would be interacting with the movieclips themselves and not the images directly.
The problem I've been running into is adding the bitmap as a child of the movieclip so that it will display. The image is being loaded correctly, running addChild(loader) displays the image as I would want it, except that its not contained in the movie clip (in this instance the movie clip is named pawn).
Any idea's or suggestions about what I might be doing wrong, or basic examples of how to take a bitmap object, and place it in a Movieclip container. so that it will be viewed as a child of the Movieclip.
Thank You!
Attach Code
var arrayImages:Array = new Array();
var arrayLoader:Array = new Array();
var loader:Loader;
var pawn:MovieClip;
const PAWN = 4;
pawn = new MovieClip();
pawn.x = 100;
pawn.y = 100;
pawn.height = 100;
pawn.width = 100;
addChild(pawn);
arrayLoader[PAWN] = "./images/pawn.png";
loader = new Loader;
loader.name = PAWN;
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, ImageLoadComplete);
loader.load(new URLRequest(arrayLoader[PAWN]));
internal function ImageLoadComplete(e:Event):void {
loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, ImageLoadComplete);
arrayImages[loader.name] = Bitmap(loader.content);
//addChild(loader);
//addChild(arrayImages[loader.name]);
trace(pawn);
pawn.addChild(arrayImages[loader.name]);
trace(arrayImages[loader.name]);
}
Load Movieclip Into A Container In The Stage
I have this simple function that works fine to load clip into the stage,
but I'm not able to load them into a movieclip already in the stage that workd as container.
original function is this
---
function drawChBg( lod:MovieClipLoader, clip:String, xp:Number, yp:Number,img:String){
createEmptyMovieClip(clip, getNextHighestDepth());
var name_mc:String=clip;
lod.loadClip("http://"+webserver+":"+portserver+"/lessons/images/"+img, eval(name_mc));
eval(name_mc)._x=xp;
eval(name_mc)._y=yp;
}
----
the new function should be something as...
function drawChBg( lod:MovieClipLoader, clip:String, xp:Number, yp:Number,img:String){
container.createEmptyMovieClip(clip, getNextHighestDepth());
var name_mc:String="container."+clip;
lod.loadClip("http://"+webserver+":"+portserver+"/lessons/images/"+img, eval(name_mc));
eval(name_mc)._x=xp;
eval(name_mc)._y=yp;
}
but this doesn't work
can somebody help me please
thanks
URGENT More SWF Load Into A Container Movieclip
Hi all!
I have several swf files. For example 5. This number I write into a txt file.
So.
I would like make a main swf file, what load each swf files. But. The main swf have to load the number of the swf files from the txt file.
The main movie mission:
Load a number from the txt file. Then he know there is 5 swf files and then
load the first movie, when is stop...finished.....just then load the next swf file and play.....etc. When the last swf file is stopped after then repeat .......
Thx.
Kaol
ps.: sorry , but i can't speak and write english very good!
External MovieClip Loads Twice Into Container MC?
Has anyone had this problem? I have a button which loads an external SWF into a container MC on my stage. Every now and then (especially when the system's resources are taxed) the external movieclip loads twice into the container, and stopping it via the "pause" control only stops the first SWF--the other goes right on playing underneath it.
Here's my code:
Code:
btn01.onRelease = function() {
container.unloadMovie();
myMCL.loadClip("assets/01.swf",container);
}
Unloading the container before loading in a new SWF made the duplication happen less often, but it still happens now and then. Does anyone have any idea what might be going on here?
Thank you in advance for your help. I'll be presenting this project tomorrow!
Fake 3d, Load Movieclip Into Container
Hey!
Well the topic says pretty much ,
I cant figure out how to load a movie clip into a container in a "fake 3d" like they have done on this site: www.esprit.com there you see three movies in probably 3 containers.
Anyone got any clues or help? Would appreciate it alot.
Thnx in advance.
/Tob
Need To Change Path To Container Movieclip
Hi guys,
I've been going through the Transitions Between External SWF tutorials and all is going well except I wish to situate my buttons in a movieclip and not on the main timeline as the tutorial teaches.
The tutorial does point out; 'If your buttons are not located on the main timeline, you will have to change the path to the container movieclip. If your buttons are not on the main timeline, you must change container to the appropriate path.'
Does anyone know how I'd do that to the below code? (for some reason the code tags were messing up so I've just copy and pasted.)
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "main";
container.loadMovie("main.swf");
} else if (_root.currMovie != "main") {
if (container._currentframe >= container.midframe) {
_root.currMovie = "main";
container.play();
}
}
}
If anyone can point out what I need to alter - THANK YOU in advance!
Need To Change Path To Container Movieclip
Hi guys,
I've been going through the Transitions Between External SWF tutorials and all is going well except I wish to situate my buttons in a movieclip and not on the main timeline as the tutorial teaches.
The tutorial does point out; 'If your buttons are not located on the main timeline, you will have to change the path to the container movieclip. If your buttons are not on the main timeline, you must change container to the appropriate path.'
Does anyone know how I'd do that to the below code? (for some reason the code tags were messing up so I've just copy and pasted.)
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "main";
container.loadMovie("main.swf");
} else if (_root.currMovie != "main") {
if (container._currentframe >= container.midframe) {
_root.currMovie = "main";
container.play();
}
}
}
If anyone can point out what I need to alter - THANK YOU in advance!
Displaying Movieclip On Container Roll Over
I'm trying to make something similar to the Vimeo video player but I can't figure out how to make the video controls visible only when you roll over the video clip. I tried creating a movieclip in the background the same size as the video that changes the video controls alpha to 100 onRollOver, but when I roll over the controls, they disappear again. I guess I can add _alpha=100 to the controls onRollOver, but is there a better way to control this functionality?
Need To Change Path To Container Movieclip
Hi all, I have a typical Newbie question. Brace yourselves...
Basically, I have this code to load external movies:
Code:
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "page1";
container.loadMovie("page1.swf");
} else if (_root.currMovie != "page1") {
if (container._currentframe >= container.midframe) {
_root.currMovie = "page1";
container.play();
}
}
}
However, the code is placed within a movieclip off the main timeline and a note on the tutorial I used says:
If your buttons are not located on the main timeline, you will have to change the path to the container movieclip. In this example the buttons are located on the main timeline, therefore 'container' targets the container movieclip correctly. Though, if they are not on the main timeline, you must change container to the appropriate path.
Does anyone know what I need to do to change to the path of the container correctly? I made a few _root. corrections but nothing seems to work. I think I'm missing the obvious.
Also - I bit of a side question - The external movies I am loading use:
Code:
this._lockroot = true;
ActionScript. Would this disrupt all the _root. commands the above code is using? (the buttons to load the external movies are placed in the main.swf, which loads the external movies via a container movieclip)
(^ Hope that makes sense!)
Textfield.movieclip? (container W/ Scrollbars)
pls help!
My loop creates instances of a movieclip onto the stage in the order:
clip1
clip2
clip3.. vertically!!
Sometimes around 30 movieclips are created and as a result overlaps the stage and some clips cant be seen when the movie is playing. I need to add some sort of container with scrollbars for the clips so that i can scroll down if there are a lot of movieclip items. Firstly I need to know, can I put a movieclip inside a textfield? To be referenced like:
Code:
textfield.attachmovie(movieclip)
If not, which container w/ scrollbars can I use for this?
Any suggestions welcome.
Thanks.
Preload External JPGs In Container MovieClip
I have a main movie timeline which has a container movie loaded into it with various external SWFs. These external SWFs have external JPGs associated with them which are loaded in using loadMovie. What I'd like to do is to load all the JPGs while loading the external SWF so that ALL preloading can take place at the same time. At the moment the external SWF is fully loaded and then the JPGs must be loaded afterwards.
Could anyone suggest the best way of going about this? Thanks!
Pause External SWF Loaded In Container Movieclip
Hi there,
I have a flash movie that loads external SWFs into a container movieclip in the main movie.
The actual animation frames in these external SWFs are a couple of layers down in each clip, ie: a movieclip within a movieclip within a movieclip.
I need to add a pause button in the main movie that will pause the currently playing movieclip. I think the problem lies in my not referencing the movieclip properly.
Click the link below to download the FLA files to see what I'm talking about!
http://www.artboxgraphics.com.au/temp/ABKslideshow.zip
(Main movie FLA + 2 External Clip FLAs)
Ideally I would like the "pause" button to function more as a "pause/resume", but I'm happy to take things one step at a time!
If anyone could show me how to do this it would be VERY much appreciated. I have burned many hours on this!
Cheers,
Chris
How To Detect Width & Height Of Container MovieClip
Hi,
I am trying to make a container MovieClip in which I would like to load another Movie.
The loaded Movie would have to know, what size the container would have in order to set the position of some images dynamically.
Is there a way to get the ClipHolder's width and height?
I tried to use _parent._width on the main timeline of the loaded movie to retrieve the values but the results I got were always weird...
thanks in advance!
How To EMPTY A MovieClip With Actionscript That Acts As A Container For A Menu (help
Hi, Im making a menu system.
It has a lot of buttons on the right side and when the mouse cursor goes over the buttons, an bigger image of it "plays" on the left side via a "empty" MC that acts a container.
The actionscript inside the button is like this.
on (rollOver) {
_root.femp.femp2.attachMovie("mc1", "fighteremp2", 1);
_root.femp.gotoAndPlay(1);
}
however when the mouse cursor ROLLS OUT the button, I want the button to dissapear. its not working for some reason. if anyone can help me out that'd be awesome because Im a total noob at flash but Im being really ambitious and learning a lot!
How To EMPTY A MovieClip With Actionscript That Acts As A Container For A Menu (help
Hi, Im making a menu system.
It has a lot of buttons on the right side and when the mouse cursor goes over the buttons, an bigger image of it "plays" on the left side via a "empty" MC that acts a container.
The actionscript inside the button is like this.
on (rollOver) {
_root.femp.femp2.attachMovie("mc1", "fighteremp2", 1);
_root.femp.gotoAndPlay(1);
}
however when the mouse cursor ROLLS OUT the button, I want the button to dissapear. its not working for some reason. if anyone can help me out that'd be awesome because Im a total noob at flash but Im being really ambitious and learning a lot!
Scaling A Movieclip
Hey guys,
I've got an jpeg image in flash in a movieclip, instance name 'image1'.
I was wondering how I can place two buttons, a "+" and a "-" in my scene that scale the movieclip by increments of approx 25%, and also don't go beyond 100% or 25%.
Asking a bit here, thanks people.
Gatorage
Swf Vs Movieclip Scaling
I have a few questions relating to swf vs movieclip(or any other visual object) scaling.
If I have the swf scale how do i read the current width of the swf from within flash? and can this be constantly updated?
How do you prevent some objects from scaling with the swf... meaning they stay at 100% while the swf gets steched larger or smaller?
Scaling Movieclip
Hoping Chris or someone can help me with this one...
I have a background image I'm wanting to scale to the Stage.height and Stage.width but, keep it in proportion to itself as well.
For some reason, I can not figure this out.
Here's the code I have so far...
quote:Stage.scaleMode = "noScale";
Stage.align = "TL";
var stageListener:Object = new Object ();
stageListener.onResize = positionContent;
Stage.addListener(stageListener);
stageW = Stage.width;
stageH = Stage.height;
bulbsWide = (stageW > lightbulbs._width);
bulbsTall = (stageH > lightbulbs._height) && (stageW < lightbulbs._width);
function positionContent():Void {
if (bulbsWide) {
lightbulbs._width = Stage.width;
lightbulbs._yscale = lightbulbs._xscale;
} else if (bulbsTall) {
lightbulbs._height = Stage.height;
lightbulbs._xscale = lightbulbs._yscale;
} else {
lightbulbs._width = Stage.width;
lightbulbs._yscale = lightbulbs._xscale;
}
}
positionContent();
I've tried a lot of variables on this as well.
Including entering the actual width and height of the movieclip like so...
quote:bulbsWide = (stageW > 811);
bulbsTall = (stageH > 592) && (stageW < 811);
What am I missing?
Scaling MovieClip
Hi,
I'm working on a small project. I have a movieclip of a rectangle, 200x100. It's 50pixels from the top and right edge. Then I want the square to expand to all the edges. Now I've told the square to scale to 1500 so it fills the whole artboard and then some, however I want it to fill the board exactly, in all directions so that I can use the ease out effect. How can I do this when the square isn't centred on the board?
Elisabeth
Scaling A MovieClip
I need to scale a movie clip from 100% to 300%...but I need to do it in a smooth continous motion, not just jump from 100% to 300% instantly, but have a smooth transition. the scaling will be done on a rollOver event for a different movieClip.
any ideas.
Scaling Movieclip... Please Help
hello everyone!
I am a newbie.... i hope someone can help me here...
I have a map (drawn in flash) which is in a movie clip titled "map" and instance as "map_drag".
This instance can be dragged using the startDrag(); and stopDrag(); (simple dragging so far...)
According to my design, I want to load this movieclip onto the main stage at a percentage of 50% (as the original movieclip has a width of nearly 1200 pixels...)
I have tried setting the movieclip property
map_drag._xscale = 50;
map_drag._yscale = 50;
but i think i am getting confused about what handler to put this code on to and where to put this code, on the movieclip instance or the timeline???
please help me out here....
Thanks
Scaling Movieclip
hi to all!
can anyone tell me how can i scale a movieclip by clicking it and drag the corner points of it.
Scaling A Movieclip
I want to achieve the effect that can be seen in http://www.thefwa.com. where no matter what the screen size is, the bottom disclaimer information will always be at the bottom.
I currently tried this, but it will scale to a certain amount then it disappears. I want to be able to position different movieclips at the bottom of the screen and they will also always scale. If anyone can help it would be greatly appreciated.
var myListener:Object = new Object();
myListener.onResize = function() {
updateLocations();
};
Stage.addListener(myListener);
updateLocations = function () {
// Values of the initial .swf width and height
initialWidth = 950;
initialHeight = 600;
// Get the current stage width and height
currentWidth = Stage.width;
currentHeight = Stage.height;
// Position copyRight information
copyRight._x = Math.round(initialWidth+((currentWidth-initialWidth)/2)-copyRight._width);
copyRight._y = Math.round(initialHeight+((currentHeight-initialHeight)/2)-copyRight._height);
};
updateLocations();
Movieclip Scaling
Hi,
I am trying to implement a own scrollbar component, based on the simple cusom scrollbar:www.kirupa.com/developer/flash8/scrollbar.htm
My proble is that I want the conent to be dyamic, varing in size. For this I need the scollbar dragger to change in size depending on content size. What is th best way to change size for a movieclip dynamic loaded from library? Scaling seems difficult, I want to be able change the size for the movieclip to a certain height. Anybody have a method for it? My plan is to createemptyMovieclip and the attach the movieclip from library and resize it.
Scaling A Movieclip In Time
I've been searching through the forums but haven't found exactly what I need. Here is the situation:
I have a MC called "expander" and four buttons on the stage. When you click on a button I want the MC to change its xscale smoothly over time to a particular xscale amount. Lets say button one would scale the MC to an xscale of 200, two would be 400, three 600 and four 800. I can't seem to get the right code to do this without jumping directly to the final size or causing the script to hang.
Thanks in Advance,
S
Scaling Movieclip Using Actionscript
Hey guys...wasnt sure whether to put this in newbie or actionscript forum, so i just decided on here.
I have a movieclip that when you mouseover/rollover it, it swells just a bit, and when you roll off it swells back down. I didnt want to make a movieclip with a hittest and nextframe/prevframe - as i want to extend my knowledge of object manipulation directly in actionscript. Ive tried a few methods and all have proven non usful. Im sure this is an easy question for you AS gurus, but nonetheless a very useful trick. Thanks in advance!
Jesse
[MX] Movieclip Scaling Problem
Hi
I've got an XML driven file which I'm having problems with.
Basically what it does is it pulls in text and images from an XML file and displayes them in a scrollable list. I'm trying to set it so that if the user moves the mouse over the images they will scale up to 176% of the initailly shown size. And when the user moves the mouse out of the image it will return to its original size.
I can get this to work fine on a simple movie clip with an image in it but the problem is when its being pulled from an XML file.
The code I have had working on a basic (not XML driven) movie clip is as follows:
on (rollOver) {
setProperty("_root.imageArea2", _xscale, "176");
setProperty("_root.imageArea2", _yscale, "176");
}
on (rollOut) {
setProperty("_root.imageArea2", _xscale, "100");
setProperty("_root.imageArea2", _yscale, "100");
}
Any suggestions on this please?
I can attach the full XML driven file if that helps any?
Scaling A Movieclip Over A Set Time.
Hi guys,
i cannot seem to work out how to solve this problem:
I'm trying to give the impression of somthing getting smaller by scaling it.
I have a scale of time that stats at 0, and ends at 1.
When the movieclip is at 0 it is full size, by the time the time the timer reaches 1, it should be much smaller.
0------0.25--------0.5-------0.75----------1
BIG----------------MED------------------SMALL
Say the movieclip stats at 100x100 and by the end it should be 5x5
What would be the formula to scale the movieclip based on the 0 to 1 timer?
Any help would be great.
Cheers.
Scaling Movieclip Not Proportionally
Hi, I have a Problem, I'm making the gallery where i want that when somebody clicks close the movieclip in which the actual picture is loaded turns a littlebit and goes backwards, thatswhy I want to somehow make from the rectangular movieclip the trapezoid, is it possible in flash
actually I want to scale it so how you scale the shape rectangle clicking ctrl and scaling its only one side
is it possible
Thanks a lot
Scaling Causes MovieClip To Be Unclickable
Hi Everyone,
I have a Movie clip which I use as a login box...it has 2 dynamic text fields, a Login & Close button. I import it onto the stage using attachMovie and it works fine...I can type in my username and password.
The problem is...
I want to scale it on rollOver / rollOut using _xscale & _yscale. But as soon as I rollOver it and the Movie Clip gets scaled...all of the different components become unclickable. I can't click on the dynamic text fields, can't click on the login button. Any ideas? I tried creating an empty MovieClip container and scaling the container, but I get the same results.
I've tried a lot of code variations, Here is the basic idea...
attachMovie("Login_Box_Complete", "login_box", this.getNextHighestDepth());
login_box.onRollOver = function() {
this._xscale = 120;
this._yscale = 120;
}
Thanks!!!
Scaling A MovieClip With A Slider
Hi gang
I'm still trying to build my little map viewer, I've not managed to solve my previous problem, but decided to change direction and work on the slider/scaler
I'm using the following code on a blank controller clip to scale the map when I drag the slider:
onClipEvent (enterFrame) {
mapWidth = 80;
mapHeight = 50;
_root.target._xscale = (mapWidth*200 ) / (_root.dragger._x);
_root.target._yscale = (mapHeight*200 ) / (_root.dragger._x);
}
The problem is that the map is shrinking, I think its because it's in relation to the dragger. but I'm not sure.
How would I get the map to display at 100%, so that when I drag the slider it just increases, and when dragging back goes back to 100%
thanks
Guy
Scaling A Masked Movieclip
a while ago either senocular or eyezberg gave me an example of scaling a movie clip from a button with ease.
I have tried to use the movie clip I am scaling as a mask but every time i make it a mask all attempts to scale it by button no longer works.
Does anyone know why I can't scale a masked movie clip?
http://www.zephn.com/scaler.zip is the source i am working with
MovieClip Duplication And Scaling
Hi, All
I'm attemping to accomplish this effect:
[1] http://www.marumushi.com/apps/social...ialcircles.cfm
Click on "play" (top left)
I have been fiddling with it for some time now.. here's what I've got till now (.fla/.swf/.as):
http://www.moral.frac.dk/circles/
look into the .as file if you need a quick view
How's the smooth re-scaling done in [1]?
Thanks in advance
[edit]: now with correct url
Scaling Movieclip With Rollover Button
Hi all,
I would like your help please on this problem I have.
I have two elements in my Flash movie, a movieclip (scaleBox) and a button (myButton).
The movieclip is a rectangle graphic. It is about 100 pixels long.
The button actionsscript is:
------------------
on (rollOver) {
myW = scaleBox._width;
for(i=1; i<10; i++) {
myW= myW + 1;
scaleBox._width = myW;
}
}
-------------
The code above executes 10 times (i<10) and the rectangle's width will expand to 110 pixels but the problems are:
1) The rectangle just expand from 100 to 110 pixels e.g. I want the rectangle to increment to 110 pixels.
100,101,102,103,104..so on to 110 rather than jump from 100 to 110 pixels.
2)When I execute the rollover, the rollover just executes once. I mean, when I place the cursor over the button I would like the rectangle to keep expanding until I put the cursor out of the Button hit area. I'm aware that I have to make a rollout script.
Could those two problems have one solution? It does sound as if there is by comparing them both.
Cheers,
John
Resizing Movieclip Without Scaling Content?
Hi!
Is there a way to scale a movieclip without scaling the content within that clip?
I'm working on a site where I want to use a scroll area that has different height depending on resolution. Now when I put text inside the text gets streched vertically... Is there a way to prevent that from happening? The same will apply to pics placed inside the movieclip...
If I use a textfield instead of just typing directly inside the movieclip the text is scaled keeping the correct dimensions but I want the text to stay at a constant size...
Niklas
How Do You Prevent A Textfield From Scaling With A Movieclip?
I'm having the user press a button to create a new instance of a movie clip on the stage. There is a slider that then adjusts the size of the clip to their specification. There is also a textfield inside (or attached) to the MC with text that they can edit. My problem is that I don't want the textfield to scale with the MC. I want it to stay the same size so they can fit more text. With everything I try, the text just gets bigger along with the movieclip. How would I go about doing this correctly? Thanks!
OnEnterFrame: Scaling Movieclip Problem
Hello.
I have made an onEnterFrame on a clip named 'scaler' wich is inside a clip 'picture'. When the scaler is dragged the picture clip resizes itself according to your mouse position.
I got this far, but when compiling this and dragging around the 'scaler' clip I can see my being-scaled-clip freaking out (it blinks alot)
this = 'scaler'
this._parent = picture (the holder of 'scaler' and 'mc')
this._parent.mc = mc (a clip inside 'picture' aswell)
Can someone explain me why this is?
Thank you.
Below my code:
Code:
this.onEnterFrame = function() {
this._parent.mc._width = this._parent.mc._xmouse;
this._parent.mc._height = this._parent.mc._ymouse;
this._x = this._parent.mc._width-(this._width/2);
this._y = this._parent.mc._height-(this._height/2);
};
Scale Movieclip Without Scaling Inner Sprites
is there anyway that you can resize a movieclip so that it aligns properly with another movieclip that gets resized as teh same time.
but ...
within one of the movieclips, have all the sprites inside it stay at 10px X 10px (compared to the global view).
so the movieclip grows, the inner sprites x and y stay the same but seem to change accoringly(this is what i want), but i don't want the sprites width and height to resize in comparison to the global view.
thanks. hopefully someone understands what im asking for.
How Do I Stop Automatic Movieclip Scaling?
I'm relatively new to actionscript and flash... but have lots of experience in Java and other programming languages (wrote my thesis for Genetic programming in Java, C++ and Ant-wars finite automata language)
I'm trying to create a liquid gui. I'm got the stage set for not scaling and all that good stuff, and for the most part, it works with just an image/slideshow but if I try to have to work for anything else, it falls apart.
What I am trying to accomplish is pretty simple, I feel. But I'm having a hell of a time because of scaling issues that seem to be related to movieclips not staying the size I set them. For instance, if I move a button 'in' 100 pixels, the size of the movieclip it was on shrinks by 100, but then in order to fill the 'parent' movieclip, it scales it up thus making my entire 'sub-movieclip' look bigger than it should.
I want a multi-page liquid GUI. A row of buttons across the top. Click a button, it brings up a 'page' of information in the content area, click another button, it brings up a different 'page' of info in the content area. Etc. The pages will be different and will need their own resizeHandler in order to size appropriately. (for instance, one 'page' is just a image slideshow (where I want the images at full-window but maintain aspect ratio) ... another 'page' is one image with some text that I want to resize a certain way... another is a form... etc...etc...)
And example (different style and purpose, but it's basically what I'm shooting for) of a static version of what I want is here: http://www.tonygajate.com/flash/index.html
basically I want that, but have it be liquid and resize appropriately.
I see this kind of stuff in a statically sized thing all the time... but I want it liquid. The liquid aspect is making it tough... ideas, help, links? Would it be better to simply use frames and HTML... I could have written it in that in about 15 min, but I was looking for some smoother transitions and a more cohesive, modern look than straight HTML gives me.
I can post some code or psuedo code if no one has overarching idea-type help...
Scaling A Movieclip, But Not Line Thickness
Hi. I'm making something sortof like the Nintendo Wii Mii creator where you can drag vaious body parts onto the charecter, and then resizethem individually. Check out the attached swf to see an example.
The problem I'm having is when you scale it up, the outlines stay proportional to the overall size, so when the shape is scaledto a large size, like full screen, the lines of the shape are relitivly, something like line size 50.
Is there any way that any of you can think to make the relitive line size stay the same, so like, at the regular size, its around line size 3, and at full size, the shape is bigger, but the reletive line size is the same.
Thanks in advance.
(To use the attachement, use the arrows to scale it in whichever directions, and the curved arrow to rotate, the other buttons arn't functional yet
Scaling A Swf When Loading Into Target Movieclip
Is it possible to scale a swf that gets loaded into a target movieclip?
Or can a swf that has been created at a certain size be scaled down to a new specified size when published?
Thanks for any help.
Positioning And Scaling A Movieclip In Relation To The Stage...
I'm using the "Full Browser Flash" technique and all is working well with one exception, I can't seem to get a movieclip to scale itself to the stage size and then animate.
Example:
I have a movieclip that spans the width of the stage. The code to implement this technique for the FBF stage is working. What I want to do is 1) detect what the size of the stage is, 2) position the movieclip off of the stage using the detected stage size [i.e.: (._x=0-Stage.width)] and 3) animate this movieclip from it's off screen location to it final position.
Let's say the stage size is detected to be 800 pixels wide. This would scale the movieclip to 800 pixels wide. Then the movieclip would be positioned off the stage at an x coordinate of -800. Then the movieclip would animate to the x coordinate of 0.
Make sense?
Please advise. Thanks.
Movieclip Scaling Simultaneously With Array Function
Hey!! I got a bunch of mc inside an array. A function scaling them up and down on rollover/out. What I'd like is to add a function to get specific mc outside the array scale the same way. So when "ps" is scaling down-up, I'd like "s1" do the same thing (..."pe" = "s2"; "pl" = "s3"; "pw" = "s4"; "pm"= "s5"; "pc" = "s6").
I know there's several ways to do it (http://www.actionscript.org/forums/s...cale+movieclip), tried to tweak that tips... but unsuccessful with my code:
ActionScript Code:
var btnArray:Array = ["ps", "pe", "pl","pw","pm","pc"];
var home:MovieClip = this;
for(var i in btnArray)
{
var mc:MovieClip = btnArray[i];
home[mc].onRollOver = function()
{
scaleButton(this, 90);
}
home[mc].onRollOut = function()
{
scaleButton(this, 100);
}
}
function scaleButton(btn:MovieClip, s:Number)
{
btn.onEnterFrame = function()
{
if(btn._xscale < s)
{
btn._xscale += 2;
btn._yscale += 2;
}
else if(btn._xscale > s)
{
btn._xscale -= 2;
btn._yscale -= 2;
}
}
}
Tanks!
|