Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Stop Automatic Resize



Hi I've set a movieClip to resize using ActionScript. But I'm not sure how to stop the resizing once it has met a certain size. In my situation, I want it to stop resizing when both the height and width have met 500px's.
ActionScript Code:
movieClip.onEnterFrame = function(){ movieClip._width = movieClip._width+=2; movieClip._height = movieClip._height+=2; }}



KirupaForum > Flash > Flash 8 (and earlier)
Posted on: 08-13-2006, 12:42 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

ReSize Doesnīt Resize Automatic But Why?
Hey.

Iīm kinda stuck.
have a look: reSizse sucks right now

my problem is that you canīt see the hole background untill u manually resize the browser window. i just canīt figure out why it doesnīt work.

maybe itīs beacuse itīs late, maybe beacuse iīm getting sick or maybe beacuse I just suck at this.

please help anyone?

u can download fla file n everything right HERE

tnx in adv

//Mo

Automatic Resize
Hello all,

How do you do the automatic resize like this web site http://www.dynamicfactory.com/003/na.../font/font.htm


when you resize the window, the flash movie follows it. How do you do that?

Thanks

Automatic Resize
I know in php there is a tag to resize a image simply:

$width = 120;
$height = 80;

if ($width && ($size[0] < $size[1])) {
$width = ($height / $size[1]) * $size[0];
} else {
$height = ($width / $size[0]) * $size[1];
}
-------------------------------------------------
However, how to do this in FLASH????????????

Automatic Resize
Hello all,

How do you do the automatic resize like this web site http://www.dynamicfactory.com/003/na.../font/font.htm


when you resize the window, the flash movie follows it. How do you do that?

Thanks

Automatic Resize Of External JPG?
Hello! I have a JPG which is loaded in an empty movie clip, my client will have to upload other jpg overwriting this one, and the JPGs will be of different sizes, is it possible to create a script that allows the external JPG to resize to a specific size I set? for example: if the client uplaod a JPG of 600x400 can it become smaller automatically to the size of the bevel in which it will be contained? I hope I was clear, if this is possible, could you please post the exact code I have to use? thanks!

Resize Automatic A Image
hello everybody
i created a photobook where i automatic call the images from the directory
and so far everything is working perfect
now the problem is that always have to resize the images in another program.
so my question is, how can i automatic resise (in to another resolution (like 456 x 316)) the image in actionscripting.

this is my script so far

Code:
space._alpha = 0;picts = ["demo/demo1","demo/demo2","demo/demo3","demo/demo4","demo/demo5","demo/demo6","demo/demo7","demo/demo8","demo/demo9","demo/demo10","demo/demo11","demo/demo12","demo/demo13","demo/demo14","demo/demo15","demo/demo16","demo/demo17","demo/demo18","demo/demo19","demo/demo20","demo/demo21","demo/demo22","demo/demo23","demo/demo24","demo/demo25","demo/demo26","demo/demo27","demo/demo28","demo/demo29"];pic = 0; next.onPress = function() {if (pic<picts.length-1 && !fadeIn && !fadeOut) {fadeOut = true;pic++;pict = pic+1;}};back.onPress = function() {if (pic>0 && !fadeIn && !fadeOut) {fadeOut = true;pic--;pict = pic+1;}};_root.onEnterFrame = function() {if (space._alpha>10 && fadeOut) {space._alpha -= 10;}if (space._alpha<10) {space.loadMovie(picts[pic]+".jpg");fadeOut = false;fadeIn = true;}if (space._alpha<100 && fadeIn && !fadeOut) {space._alpha += 10;} else {fadeIn = false;}};


Greetings
Blowreactor

Automatic Resize In Mx 2004?
Hi,

Im wondering if Flash MX 2004 has implemented a function that will automaitcally resize/scale the whole Flash Application/movie so it will fit neatly into any resolution the user might have?

I remember putting together such a feature in Flash MX a year ago, and the code was neither pretty, nor did it work 100%.

It would be nice to just be able to select such a function in the publishing-settings.

Thanks

Automatic Resize In Mx 2004?
Hi,

Im wondering if Flash MX 2004 has implemented a function that will automaitcally resize/scale the whole Flash Application/movie so it will fit neatly into any resolution the user might have?

I remember putting together such a feature in Flash MX a year ago, and the code was neither pretty, nor did it work 100%.

It would be nice to just be able to select such a function in the publishing-settings.

Thanks

Automatic Textfield Resize..
im loading text to my textfield from an external source.

the textfield has fixed dimensions so when i load my external text file, the overlapping texts are cropped. is there a way to automatically resize the height of the textfield to contain all the texts of my external text file? thanks for the responses... good day guys...

FLV Player Automatic Resize - Help
Hi there.

I've done the flash video player tutorial and everything is working great, feeding right in from my XML file and everything.

HOWEVER - not all of my videos are the same dimensions. How in the world do I keep the player from resizing/stretching to fit the strangely proportioned videos? If an flv is 200 wide, I need it to stay 200 wide within the window (leaving dead space on either side), not stretch to 420 to fit the player window.

Any help would be greatly appreciated. Getting desperate.

Thanks!

-Jena

Vertical Scrollbar (automatic Resize)
How can I get the vertical scrollbar to automatically adjust to the height of the textbox?

FYI: I'm just grabbing the scrollbar component and dropping it to the right to the textbox (inside). The first time I tried this it worked fine, but now for some reason it doesn't resize, it comes in small and it stays small no matter where I put it or what size the text box is. It scrolls fine, it just doesn't look right.

THANK YOU,
X

Basic Automatic Stage Resize....?
I am after just a very simple code for Auto resizing of the stage, just to allow multi-resolution displays to view my site equally....

I have seen some, but was not sure where the code was going, and or if I was missing any, thus I was unable to get them to function correctly...

I have also seen some to be used in the Html for the browser, but they all seem to limit to just explorer...

Any and all help is appreciated....


~ RaVeN

Projects.SeducingInternalNeeds.com

Automatic Stretch Resize Mask
how did these guys do it? i'm still trying to figure it out. anybody have any ideas?

http://www.makingthemodernworld.org.uk/

Dynamic TexField Automatic Resize
hi,
i could swear that i saw this somewhere on the net, but cant seem to find it either on gotoandlearn or the world at large.
what i would like to be able to do is load either a .txt file, or xml into a dynamic scrollable text field. this in and of itself is no problem, but what i need is for the text field to resize itself to exactly fit the loaded text.
i am not really familiar with the textField class, and am having difficulties figuring it out from the help files.
can anyone point me in the right direction?
or have i (once again) totally confused everyone?
thanks in advance,
freddy

Dynamic Gallery - Automatic Resize To Window
Hopefully this will be the last question about the dynamic Flash gallery I've been putting together. So far, the finished product can be found here: http://www.phenixdesigns.net/testing/art_index.html

First of all, thanks so much to everyone on the boards for their help with this.

And now, I've got one more question. It's not a necessity, really, as I've got the gallery working as I'd like it to. It's just a little added something that I think would be nice.

The only comparable example (that I've been able to find) to what I want to do is found at http://www.suicidegirls.com.. Be warned before clicking that it is an adult website with nudity.

When viewing pictures in their gallery, the full-size images resize when you change the window size. They also resize if you change your screen's resolution. I'm assuming that they have the full-size images in a high resolution on the site and that there is some code, be it XML or AS, that tells Flash to resize the image based on screen resolution/window size.

I've searched through the forums and on Google and I haven't found anything that really fits what I'm looking for. I did find some posts about dynamic image resizing, but as I said, they didn't seem (to me, at least) to really fit into what I'm looking to do. If I overlooked someone's post, please point me in that direction.

Otherwise, can anyone help me with this? I do have all of the images for the gallery I'm building in high-resolution, so it would be no problem to use those instead and just have the script scale them depending on screen resolution/window size.

Again, thanks so much for the help! Couldn't have done it without you folks.

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...

Stop Automatic Stage Resizing
Hi guys?

Can anyone tell me how i can stop flash from resizing my stage whenever a moviclip exceeds the pre-set screen boundaries?

its driving me nuts: i've got a scrolling game and i'm happy for the map to be big, but placement of other game content depends on keeping the stage the same size throughout.

I greatly appreciate any help!

best wishes

I Cant Resize Windows And Stop Resize.
I'm going mad here! - I know this is probably really simple but i have a flash movie and i want the links to pop up in a new window of a defined size - i also want to turn off resize and get rid of the toolbar and scrollbar.

If anyone can help me Id be really grateful! :-)

Thanks - Dan (dan@introspection.f2s.com)

Stop Resize In A RESIZE
hey...there's a open source running around somewhere...
with a resize setup for loading a JPG into a empty MC...
and there's a border that resizes to that image once it's loaded..
it's even tweened to scale smoothly... (below)

problem 1:
it's a bit hefty for the eye... but it works sweet...
but i'd like to manage to work some Zigo tweens into it...
i was wondering if anyone has the super powers to
figure out how to recode it so the resizing is done through
those easing classes and tween and them through fuse...
problem 2:
i modded the resize... inside the border...this little crop box i created...
i added movie clips that are looping through a doTween setup...
so instead of lines defining the border (which will be resized according to which jpg or png is loaded) ... i have movie clips running up and down each of the total 4 sides...

but when they resize....it stretchs the in a very ugly way...
it's like in design class when the type teacher said...
don't stretch the type...i was reaffirmed why...cuz it looks like crap.

is there a way to resize a movie clip...
and have the movie clips running inside that movie clip stay constrained? ; to remove unproportional scaling?

Code:

spacing = 50;
containerMC._alpha = 0;

MovieClip.prototype.loadPic = function(pic){
   _root.containerMC._alpha = 0;
   this.loadMovie(pic);
   _root.onEnterFrame = function(){
      var t = containerMC.getBytesTotal(), l = containerMC.getBytesLoaded();
      if (t != 0 && Math.round(l/t) == 1){
         var w = containerMC._width + spacing, h = containerMC._height + spacing;
         border.resizeMe(w, h);
         delete _root.onEnterFrame;
      }
   }
};
MovieClip.prototype.resizeMe = function(w, h){
   var speed = 5;
   this.onEnterFrame = function(){
      this._width += (w - this._width)/speed;
      this._height += (h - this._height)/speed;
      if( Math.abs(this._width-w)<1){
         this._width = w;
         this._height = h;
         _root.containerMC._x = this._x - this._width/2 + spacing/2;
         _root.containerMC._y = this._y - this._height/2 + spacing/2;
         _root.containerMC._alpha = 100;
         delete this.onEnterFrame;
      }
   }
};

can someone take a crack at this? it's giving me allergies...
thanks in advance!

anybody run into any flash chat rooms where people can have live feedback and pass some flash nerdtalk? cuz i'm way down for that.

22/m/actionscript,tokyo

Stop Resize Swf
I have one problem, i am not Sure how to define it to search for it on google, i'm sure that is a lot of answer on the internet, but i will try here...

How to stop resizeing my fullsrean swf movie when the size of the browser reach the original size of swf, after that if i resize browser to be smaller scroll will bi show up....

example.... http://www.rolex.com/en/

my AS2 code is

Code:
//start Stage re-size code
Stage.align = "TL";
Stage.scaleMode = "noScale";
// ---> Create a new listener object
var stageListener:Object = new Object();
// ---> Define the resize function...
stageListener.onResize = function() {
// ---> first, get the new dimensions of the stage....
var stageWidth:Number = Math.round(Stage.width);
var stageHeight:Number = Math.round(Stage.height);
trace("Stage size is now " + Stage.width + " by " + Stage.height);
// ---> now, set the footer BG w & h to the stage dimensions...
footerBG_mc._width = stageWidth;
//footerBG_mc._height = stageHeight;
footerBG_mc._x = 2;
footerBG_mc._y = stageHeight-25;
// ---> now, set the footer links to the stage dimensions...
footerLinks_mc._x = (stageWidth/2) - (footerLinks_mc._width/2) ;
footerLinks_mc._y = stageHeight-18;
// ---> now, set the background clip alignment to match stage...
wallPaper_mc._x = (stageWidth/2) - (wallPaper_mc._width/2);
//wallPaper_mc._y = stageHeight/2;

// ---> now, size the outLine_mc to the stage dimensions...
//outLine_mc._height = stageHeight-2;
//outLine_mc._width = stageWidth;
outLine_mc._x = (stageWidth/2) - (outLine_mc._width/2);
//outLine_mc._y = (stageHeight/2) - (wallPaper_mc._height/2);

};
// ---> Apply the listener...
Stage.addListener(stageListener);
// ---> Run the function...
stageListener.onResize();

//--------------------//
Mouse.hide();
var followMe:Object= new Object()
followMe.onMouseMove=function(){
newMouse._x=_xmouse;
newMouse._y=_ymouse;
}
Mouse.addListener(followMe)




and on the HTML page is







Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<style type="text/css">
#center { position: absolute; top: 50%; width: 100%; height: 1px; overflow: visible }
#main { position: absolute; left: 50%; width: 100%; margin-left: -50%; height: 600px; top: -300px; background-color:"#cccccc"}
body {
overflow-x:visible;
background-color: #333333;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
</style>
<title>Centered</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="swfobject.js"></script>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>

</head>
<body>
<div id="center" >
<div id="main">
<img src="950x10.jpg" alt="" />
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','100%','height','600','src','main','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','main' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="950" height="600">
<param name="movie" value="main.swf" />
<param name="quality" value="high" />
<embed src="main.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="950" height="600"></embed>
</object></noscript>

</div>
</div>
</body>
</html>
my page
http://www.dupli.co.yu/index22.html

How Do I Stop Resize On External SWF?
I have a site where I want an swf to load into a panel MC that scales to accomodate it. It works to the extent that the panel MC scales and the swf loads, but when it does load the swf has also incresed in size. For example; the swf is 400x300. The panel MC grows to 400x300 but the loaded swf is much larger, say 700x500. I think the reason is that the placeholder MC that the swf loads into is contained within the panel MC and so it grows to. Does anyone know a way round this? I've tried using some code to resize the placeholder MC once the swf has loaded but it doesn't seem to work. What am I doing wrong?

Here's the code on the buttons;

on(release){

// reset swf load var
_root.textLoad = false;


// clear movies from other buttons
_root.panel.placeholder.unloadMovie("services.swf" );
_root.panel.placeholder.unloadMovie("contact.swf") ;


// stretch panel
panel.onEnterFrame = function(){
if(_root.textLoad != true ){
_root.widthStretch(400, this._name, 3);
_root.heightStretch(300, this._name,3);
}
};


// set delay and load
var delay = setInterval(aboutReveal, 3000);
function aboutReveal(){
_root.textLoad=true; // set swf load var
_root.panel.placeholder.onEnterFrame = function(){
_root.panel.placeholder.loadMovie("about.swf");

};

clearInterval (delay);
}
}

I've used setInterval to allow time for the resize to work nad widthStretch and heightStretch are functions set in the first frame of the main timeline.

Thanks in advance for any help and I apologise if i haven't explained myself very well.

Cheers.

Resize After You Stop Drag
I'm tryin to figure out how to resize my falsh movie within the browser only after you stop resizing the window. I have it working a little bit right now as you actually resize teh window. It does it in real time, but it's a little cluncky and it jerks somtimes as you drag down the size of the window.

What I'm after is something like these sites after you resize the window.

http://www.alessiopizzicannella.com
http://www.edlokawa.com/

How would I go about including something like that?

Full Browser Flash Stop Resize?
I have built full browser Flash sites like www.agilitygraphics.com and
there is one thing I don't like about them. I would like to be able to
have a minimum size, at which the browser would add the scroll bars
back. If you look at the site above, it resizes really small but never
give the viewer a scroll bar. The file is 800px by 600 px, but you can
resize way smaller and never get a scroll bar. Is there a way, where I
can add something to the file, where its like: if browser window is
smaller then 800 x 600 add scrollbar to browser? So like a minimun size?
Like a conditional to the embed?

Thanks for the help!
Brian

After Stop In Last Frame 30 Sec, How Can It Automatic Go Back To First Frame?
Hi Guys:

Could you let me know how I can set up a script in last frame stop for 30 sec. and then back to first frame play again. It is just like a loop.

Thanks


silky

Swf Stop Resize On Original Swf Size- Scroll Shows Up
I have one problem, i am not Sure how to define it to search for it on google, i'm sure that is a lot of answer on the internet, but i will try here...

How to stop resizeing my fullsrean swf movie when the size of the browser reach the original size of swf, after that if i resize browser to be smaller scroll will bi show up....

example.... http://www.rolex.com/en/

my AS2 code is

Code:
//start Stage re-size code
Stage.align = "TL";
Stage.scaleMode = "noScale";
// ---> Create a new listener object
var stageListener:Object = new Object();
// ---> Define the resize function...
stageListener.onResize = function() {
// ---> first, get the new dimensions of the stage....
var stageWidth:Number = Math.round(Stage.width);
var stageHeight:Number = Math.round(Stage.height);
trace("Stage size is now " + Stage.width + " by " + Stage.height);
// ---> now, set the footer BG w & h to the stage dimensions...
footerBG_mc._width = stageWidth;
//footerBG_mc._height = stageHeight;
footerBG_mc._x = 2;
footerBG_mc._y = stageHeight-25;
// ---> now, set the footer links to the stage dimensions...
footerLinks_mc._x = (stageWidth/2) - (footerLinks_mc._width/2) ;
footerLinks_mc._y = stageHeight-18;
// ---> now, set the background clip alignment to match stage...
wallPaper_mc._x = (stageWidth/2) - (wallPaper_mc._width/2);
//wallPaper_mc._y = stageHeight/2;

// ---> now, size the outLine_mc to the stage dimensions...
//outLine_mc._height = stageHeight-2;
//outLine_mc._width = stageWidth;
outLine_mc._x = (stageWidth/2) - (outLine_mc._width/2);
//outLine_mc._y = (stageHeight/2) - (wallPaper_mc._height/2);

};
// ---> Apply the listener...
Stage.addListener(stageListener);
// ---> Run the function...
stageListener.onResize();

//--------------------//
Mouse.hide();
var followMe:Object= new Object()
followMe.onMouseMove=function(){
newMouse._x=_xmouse;
newMouse._y=_ymouse;
}
Mouse.addListener(followMe)
and on the HTML page is


Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<style type="text/css">
#center { position: absolute; top: 50%; width: 100%; height: 1px; overflow: visible }
#main { position: absolute; left: 50%; width: 100%; margin-left: -50%; height: 600px; top: -300px; background-color:"#cccccc"}
body {
overflow-x:visible;
background-color: #333333;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
</style>
<title>Centered</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="swfobject.js"></script>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>

</head>
<body>
<div id="center" >
<div id="main">
<img src="950x10.jpg" alt="" />
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','100%','height','600','src','main','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','main' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="950" height="600">
<param name="movie" value="main.swf" />
<param name="quality" value="high" />
<embed src="main.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="950" height="600"></embed>
</object></noscript>

</div>
</div>
</body>
</html>
my page
http://www.dupli.co.yu/index22.html

Resize Flash Movie, Make HTML Page Also Resize?
Hi All Flashkitters

I'm trying to do something that I believe is probably pretty simple and I'm guessing it involves some Javascript along with the Actionscript.

It's like on Fantasy Interactive's website, when you click on different sections of the site, the Flash container movie resizes, and makes the HTML page also resize vertically, to be able to scroll the content. Does anyone know how to acheive this? Its a handy function, I'd love to master it. It opens a big door for building flash sites that can hold real content.

So, anyone can point me in the right direction, I am greatful to.

Dynamic Resize Issue: Resize From Corner, Not Center
Okay. So I just got this little slide show I'm doing to load the next image (i'm still working on making it loop, so if anyone wants to help me with that, too feel free!)

As each new picture is loaded in the slideshow, I have a border that automatically resizes to fit it. Right now it's resizing from the center, is there any way to make it expand out from the top right corner instead of the center (since the orientation of the pictures are different, it looks a bit unnatural for what I'm doing)

Here is the code for my actions layer and if anyone can take a look and tell me what I need to change/add to make this work, I appreciate it!!


Code:
#include "mc_tween2.as"
space = 10;
photo_mc._alpha = 0;
MovieClip.prototype.loadPhoto = function(photo){
photo_mc._alpha = 0;
this.loadMovie(photo);
_level0.onEnterFrame = function(){
// modified the total and loaded so as to round it up
// to smaller number.
var total = Math.round(photo_mc.getBytesTotal()/1024);
var loaded = Math.round(photo_mc.getBytesLoaded()/1024);
if (total != 0 && loaded>=total){
var w = photo_mc._width + space;
var h = photo_mc._height + space;
border.resize(w, h);
delete this.onEnterFrame;
}
}
};
MovieClip.prototype.resize = function(w, h){
//the higher the slower the resize of the border
var speed = 6;
this.onEnterFrame = function(){
this._width += (w - this._width)/speed;
this._height += (h - this._height)/speed;
if( Math.abs(this._width-w)<1 && Math.abs(this._height-h)<1){
this._width = w;
this._height = h;
photo_mc._x = this._x - this._width/2 + space/2;
photo_mc._y = this._y - this._height/2 + space/2;
photo_mc.alphaTo (100, 0.5, "linear")
delete this.onEnterFrame;
}
}
};
image_mc.onLoad = setInterval( nextImage, 7*1000 )
;
-SD

SWF Resize On Browser Resize Causes Nav Buttons To No Longer Work.
Hello. I have a full browser width/height resizing swf. I can't figure out why, but the navigation rollover states no longer work after resizing the browser. My rollovers are handled by a button class linked to each nav button movie clip within the library. Other things of note. I am using the 3 frame AS3 preloading technique which holds all my assets in its own movie clip on frame 3.

My document class only really handles preloading. And a class for all my assets, acting as the "real" doc class is linked to that MC on frame 3.

Here is the URL to the problem:

http://spiritservices.mindgrabmedia.com/stmary/

Thanks in advance.

On Stage Resize, Resize Multiple Copies Of An Object Help
Hey everyone, I'm having some troubles figuring out the code for this. I have 12 button objects that are being created evenly across the stage, and I would like to have them resize on a stage resize event.

Here is my code so far:


Code:

//--------------------------------------
// CONSTRUCTOR
//--------------------------------------
public function BasicFullScreen(){

initVideo();
createButtons();
stage.addEventListener(Event.RESIZE, resizeHandler);

}


//Create Buttons
private function createButtons():void{

for(i==0;i<12;i++){
//trace(i);
button = new MovieClip();
button.graphics.beginFill(000000);
button.graphics.drawRect(0,0,(stage.stageWidth/30),(stage.stageHeight));
button.graphics.endFill();
button.x = (stage.stageWidth/12)*i+(stage.stageWidth/40);
button.y = 0;
button.alpha = .5;
addChild(button);

}

}

private function resizeHandler(event:Event):void {
//What to put in here?
}
I'm not sure what to put in the resizeHandler function to resize all the button objects.

Thanks for any help,

Matt

Resize Bg On Browser Resize While Maintaining Image Proporti
im using the following code to resize background images on browser resize:

Code:

var listener:Object = new Object()

bg_mc.width = Stage.width;
bg_mc.height = Stage.height;

listener.onResize = function(){

bg_mc.width = Stage.width;
bg_mc.height = Stage.height;

}
Stage.addListener(listener);


the problem i'm having is that my background image does not maintain proportion on resize. so, when i resize my browser to a width of 100px, the entire width of my background image is compressed into the 100px area.

is there some additional code i can add to the snippet above to maintain the proportions of my background image on resize?

thanks,
brandon

How Can You Resize A Stage And Have Flash Resize The Objects As Well?
Is there any way you can resize your stage in Flash and either have it keep the objects all cenetered or have it compensate for the objects and adjust them accordingly?

This tends to be a problem when I start a new file and then forget I want the stage to be much bigger.

Any help is appreciated...

How To Dynamically Resize Clips With Resize Handles
Hi Guys
was wondering if someone could help me figure out a way how to free transform objects on stage. I saw it in action at
http://www.myholidaysweater.com/

Objects can be uniform scaled, rotated with the handle when you click on the objects.

its a very cool feature.
Any tip greatly appreciated

adrian

Q: Resize Textfield Width And Height On Resize
Does anyone know if it is possible to resize a text field dynamically when I change the size of my Flash? I want the text to do what html does on a page when you resize it. Would this be possible? Any help would be appreciated. Thanks!

Resize Movieclip BG Per Stage Resize
I'd like to have a movieclip that scales in the background per the resize of the browser. I'd also like to have menu 200 pixels to the left of the stage width. How would I set it up in AS3? Thanks

Automatic Pop-up
Anyone knows the javascript to automatically open a small pop-up window...

Automatic Etc
My first effort wouldn't start automatically, it was because I had a stop; this one hasn't a stop but a loading bar, which doesn't show up, and it doesn't start by itself, what am I doing wrong?
http://www.users.bigpond.com/matilda...ter%20card.htm

Automatic Swf To Gif
Hey guys,

Say, I have this amazing banner (see attachment). the name is dynamically set. Is there some way to export and save a gif of this swf dynamically? I want to be able to pass a variable (the name) to the swf and have the swf export a gif where the 'Your Name' is replaced by the variable.

Any ideas? Thanks!

Automatic Pop Up
Hello! Does anyone knows how to create an automatic pop up, Centered and sizable.
Meaning while the movie is playing at a certain keyframe it pops up with some text and the user will be able to close it.

Thanks Mangu.

Automatic Scrolling
I have a dynamic text in flash and i use ASP to get value written to it.My probelm is to make the content of the text field to be scrolling automatically when the page gets loaded and if i keep the mouse over it .it should stop.
its for a news flash in my project which comes in the first page.i dont want to make the text field entirely to be a movie..i want tonly the content to be scrolled..Please help me..its bit urgernt.

Automatic Closing Pop Up
Im designing a site and im going to have a flash movie pop up in a window off the start without handles and such, and when the movie is done i want the window to close, what action script code would i need for this to work.

thank you

Automatic Inputbox
I was just wondering how to script so that when a movie starts to play, the input box would be selected automatically, so that the user would not have to click on to the box before they can type?

Automatic Scaling?
Can someone show me how to make a flash movie that could get info from the comp to find the resolution and then size it self to the computers resolution? If so it would be much apreciated.

thanks Azrael

Automatic Scroller
Does anyone please know how to make text scroll automatically like the cast list at the end of a film?

I wish to be able to stop the scrolling aon the click of a button and them be able to restart on clicking the button again.

I also want the be able to have the scrolling at a certain speed.

All help much appreciated

Automatic Scrolling
Hi everyone,

I got a bit of a problem, here's the situation. I want to make a news section in my web page and it has to be flash 4 compatible. What i'm looking to do is a scrolling text box with the up and down arrows. That was quite easy, but i would like it if the text would go up automaticaly and i could have a pause button to make it stop and then use the up/down arrows to view my text. I've tried many ways to play with variables and i'm yet to succeed. If anyone has and idea how to do it or know that it's not possible with flash 4 then please let me know. Thanks a lot, and have a great day...

Lise

PHP Automatic Email
Hi Yall!!

I'm using a PHP counter on my site that works great. However, in order to view how many people go to my site I have to go to my site myself and that's a bit annoying. Is there anyway I can add to my PHP counter script to automatically send me an email every time I get a hit, or 10 hits?

Here's my current script:

<?

$filename = "PHPCounter.txt";

$fp = fopen( $filename,"r");
$Old = fread($fp, 100);
fclose( $fp );

$Old = split ("=", $Old, 5);

$NewCount = $Old[1] + '1';

$New = "Count=$NewCount";

$fp = fopen( $filename,"w+");
if (flock($fp, 2)) {
fwrite($fp, $New, 100); }
fclose( $fp );

print "Count=$NewCount";

?>

PHP Automatic Email
Hi Yall!!

I'm using a PHP counter on my site that works great. However, in order to view how many people go to my site I have to go to my site myself and that's a bit annoying. Is there anyway I can add to my PHP counter script to automatically send me an email every time I get a hit, or 10 hits?

Here's my current script:

<?

$filename = "PHPCounter.txt";

$fp = fopen( $filename,"r");
$Old = fread($fp, 100);
fclose( $fp );

$Old = split ("=", $Old, 5);

$NewCount = $Old[1] + '1';

$New = "Count=$NewCount";

$fp = fopen( $filename,"w+");
if (flock($fp, 2)) {
fwrite($fp, $New, 100); }
fclose( $fp );

print "Count=$NewCount";

?>

Automatic Print
Is it possible to automatically print a bunch (hundreds) of ".swf" files in a folder with actionscript? If so, how can I get a hold of this?

Automatic Size
another question for my site . i want to make it resizable ... how ?

Automatic Close...
Hi everyone, how can i make a flash movie that closes its own window automatically after sometime without displaying any message. I hope it is possible thanks

Copyright Đ 2005-08 www.BigResource.com, All rights reserved