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




Can The Stage Be Dynamically Resized And Scroll Bar



My objective is to add horizontal and vertical scroll bars to a .swf at runtime .

the situation is this.

Im trying to create a dynamic changing organization chart tree.

pixels: the size of the chart can vary between 300 X 400 to even 2400 X 1800 etc

all depends on the values present in mysql database.

Now I intend to draw rectangular boxes to represent each entity in my organizational chart

for each rectangular box in the organizational chart I intend to create a separate movieclip like

_root.createEmptyMovieClip ("rectangle1", 1);


with (_root.rectangle1) {
lineStyle (5, 0xff00ff, 100);
beginFill(0xff00ff, 100);
moveTo (150, 25);
lineTo (200, 25);
lineTo (200, 75);
lineTo (150, 75);
lineTo (150, 25);
endFill();
}

and

_root.createEmptyMovieClip ("rectangle2", 2);


with (_root.rectangle2) {
lineStyle (5, 0xff00ff, 100);
beginFill(0xff00ff, 100);
moveTo (200, 25);
lineTo (250, 25);
lineTo (250, 75);
lineTo (200, 75);
lineTo (200, 25);
endFill();
}

etc

I intend to put this in a loop and create dynamically the x and y co ordinates and the number of movieclips (boxes) will vary based on data present in mysql database

ie. there could be many movieclips in the same row

while creating this flash mx 2004 professional application

so now if I define a canvas(stage) size of say 300 X 400 it could accomodate just about say 5 horizontal boxes and 5 vertical boxes max

and if the action script tries to print the 6th box it will print outside the stage and that box will not be visible at all.

but if I choose an ALL inclusive size of 2400 X 1800 it will look really odd indeed if there are fewer boxes...

remember the boxes will be drawn dymaically using actionscript. so if the action script tries to print a 6th box in a 300 X 400 canvas(stage) then a scroll bar should appear automatically.. is this possible ?

so I need a scroll bar both horizontal and vertical for my entire stage(canvas) to appear automatically

is it possible ?

I tried to use the scroll pane component but then it loads *another* swf file..

and *that* .swf file's dimension needs to be static !

so it also will not be suitable for me.

Anticipated thanks your help.

param



FlashKit > Flash Help > Flash ActionScript
Posted on: 01-05-2004, 01:14 AM


View Complete Forum Thread with Replies

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

Can A Stage Be Resized Dynamically
I am asking this question as you folks here seem to know your
****. I have learnt a lot from the people at flash kit so here i am again to ask a question.

I want to know if this is possible at all in actionscript.

I want to know that once a swf is playing whether a user can
resize their stage size for example if i had made a
thing where you could draw things and print it and i wanted the user to be allowed to change the stage size

can it be done please help

cheers pixelmagik

Can The Stage Be Resized?
I have built a Flash file with a fixed width to be embedded in a webpage. Everything works perfectly except the client wants one section of the page to scroll. I used the scroll component, but that is not what he wants. He wants the actual Flash file to scroll within the web page. I know this is possible by setting the size of the stage at a particular width and using scroll tags in the web page, but some of my Flash file is a fixed width and the other needs to be made longer in order to scroll within a webpage.

Is this possible?

Allow Stage To Be Resized Through Flashvars;
Hi,

I have completed my first 100% Actionscript flash banner thing that loads in external images and gets paths from XML.

Now I'm wondering, can the stage be changed to a size specified? Im just thinking that I can re-use this banner on different sites without ever having to open it up in Flash and change the Actionscript.

Stage.width doesnt do anything, but then what about if I used fscommand("scale", "true"), then set in the swfobject width 100%, height 100%, could I just make the swf go to 100% of the container element (ie. div) without it scaling any of the images inside?

I have used the search on this forum and found this link

Does this suit my needs?

[F8] Align To Stage When Browser Is Resized
Hello fellow humans,

I need to know how to align a _mc to the bottom of the stage no matter how large or small the browser is stretched.

right now I'm using this script to change the purpotions of a mc.
topstretch._width = Stage.width;

I know it must be close to the script used above I just cant find anything on the world wide web to tell me more.

Any help would be rad!
~Snake

Retile Background When Stage Resized
I want the background of a proloader to be retiled when the stage is resized. I'm guessing I have to delete the previous sprite and then retile, sort of like this:


ActionScript Code:
loaderContainer:Sprite = new Sprite();addChild(loaderContainer);loaderContainer.mask = smask;function resizeLoader():void {            if(loaderContainer.numChildren > 0) { loaderContainer.removeChild(backGroundSprite); }    loaderContainer.y = stage.stageHeight-62;        smask.x = 0;    smask.y = stage.stageHeight    smask.width = stage.stageWidth;        var backGroundSprite:Sprite = new Sprite();        backGroundSprite.graphics.beginBitmapFill(new Pattern(0, 0));    backGroundSprite.graphics.drawRect(0, 0, stage.stageWidth, 62);    backGroundSprite.graphics.endFill();    loaderContainer.addChild(backGroundSprite);        trace(loaderContainer.numChildren);    }resizeLoader();stage.addEventListener(Event.RESIZE, resizeLoader);


This does not seem to be working. Am I going about it the wrong way?

Need Script To Work Regardless Whether Stage Is Resized
So I made a listener that moves around MCs when the stage is resized and it works great. However the script doesn't work until the stage is resized . Below is the script and I would really appreciate it if you could show me how to get the script to work regardless if the browser is resized.

var stageResizeListener:Object = new Object();
stageResizeListener.onResize = function() {

back_mc._x = Stage.width-back_mc.width;
back_mc._y = (Stage.height+1)/2;
next_mc._x = Stage.width-next_mc._width;
next_mc._y = (Stage.height+1)/2;
};
Stage.align = "TL";
Stage.scaleMode = "noScale";
Stage.addListener(stageResizeListener);
Stage.addListener(sizeListener);

Calculate How Much Pixels The Stage Resized.
How can I calculate how much pixels the Stage resized?

What I want to do is this:

ActionScript Code:
var stageListener = {};
Stage.addListener(stageListener);
stageListener.onResize = function():Void  {
    var dif:Number = //how much pixels the stage resized
    //
    this.myMC._width = Stage.width - 70 - dif;
   
};


Can anyone help? Pleeeeaaassseee...

Textboxes Resized Dynamically
Hello flashers!

I need some help. I need to create a dynamic text box with a graphic background that loads the text from a txt file. I want it to be dynamically resized in height along with the background (I donīt want to use a scroll bar) to make the text fit.

Can anybody please tell me how to do this.

Thanx!!!

MovieClip Dynamically Resized?
i am wondering how i would write actionscript that would increase the hieght of MovieClip1 to equal the size of MovieClip2.

MovieClip2 is an empty movieClip that upon load of the page populates with a number of movieclips dynamically via an xml sheet. this movie clip will vary in hieght depending on the amount of items in the xml sheet.

Movieclip 1 contains a rectangle of a default size.

What i need is Movieclip1 to resize automatically to match whatever MovieClip2 is at any given time.

any help would be greatly appreciated!

Stage.stageheight Works Until Resized. Workoround?
i took a mathematical approach to centering my movie clips. it all seemed good for a long time. until i resized it (i need it full screen). every time i resize it stage.stageheight goes hey wire. is there another way to effectively center my movie clips. i need wish it to be something like stageheight since i need it to center on especific objects inside movieclips like in speedtest.net where it centers on a place of a map. i already got the math down so help please.

Can Flash Movie Be Dynamically Resized?
Can Flash movie be dynamically resized? What I mean is the swf movie embedded in an HTML file for example takes on a different size, length, for example.

Say the original size is 800 (w) x 600 (h) px when the movie starts. now user has clicked a link and the next MC that's loaded into the original movie is taller because of a lengthy text area, say 800 (w) x 900 (h) px. Can the original movie be resized, if it doesn't fit the screen then the browsers scrollbar can be used.

Thanks for any ideas.

Dynamically Loaded Image Quality When Resized
It seems that Flash's algorithm or whatever for resizing images isn't that great... because when I dynamically load a JPG image and resize it using the _width and _height properties, the quality suffers GREATLY (and I'm not talking about quality loss because of over-zooming.. I'm talking about images resized to be smaller...).

Is there a way to get around that? There must be because the creators of the site www.manipulator.com seems to have solved it!

If anybody knows the solution, I'd be grateful for the help!

p.s. I've seen a post where somebody said use movieclip._quality="BEST" to the movie clip holding the image, but it doesn't really seem to work.

How To Get Resized Component Size When Using Stage Scale Mode ShowAll
Hi

Could anyone please tell me how I can get the modified height or width of a component (e.g. a button) when the stage scale mode is set to showAll. Here is a simple (I had hoped) task. Put one button component on the stage, set the scalemode of the stage to showAll. If I wanted to keep the button in the centre of the stage as I resize the stage (in showAll mode), how can I do this? stage.stageWidth updates, but the buttom component width property always stays the same,

Dynamically Loading "Resized" Images?
Ok, this is ganna sound a bit odd.

But let me first say that i am dynamically loading Images into an image scrollbar. Now there are going to be a fair amount in this scrollbar and i am looking for ways to reduce loading time.

So is it possible when loading them to only load the size of information required to show them in their thumbnail size? This would ease on bandwidth and load much faster for slower connections. Then ofcourse the full image would load fully when someone clicks on one, but thats not a prob.


Any ideas?

Thanks!

Set The Stage Size Dynamically?
Can the stage dimensions be set dynamically from inside or outside flash? And I don't mean within the embed tag. Sounds impossible but I thought I would ask.
~Dev

How To Set The Stage Color Dynamically
Does anybody knows How to set the Stage Color Dynamically?
Raymond

Resize The Stage Dynamically
Hi,

I have a Flash button that resizes dynamically depending on the length of text in a .txt file (thx wdhall) and was wondering if the Stage can be resized to fit around the button, dependant on how big the button is?

Basically, the button's size is determined by the length of text after it becomes a .swf. So scaling the .swf will not work as the button will also scale in proportion to the Stage.

Or can I just make the Stage transparent? (I know, a stupid question)

Many thanks again.

Dynamically Set The Stage Size
Is there a way to set the stage size based on parameters I feed a swf through the url line?

In essense I want to work around the fact that Stage.width and Stage.height are read only. Any ideas?

Is It Possible To Resize The Stage Dynamically?
Does anyone know if it's possible to resize the stage dynamically? Basically starting out with a small stage and then when going to a section of a site with a large amount of content you would change the size of the stage to a larger height value and allow the browser to scroll it.

I saw something along those lines here: http://www.bigspaceship.com/

Go to the Portfolio section and then click on All Projects.

Are they resizing the stage, or doing something else to get the browser scroll bars when it loads all the new content?

Dynamically Remove A Mc On The Stage?
I'm embarrassed even asking this, but I'm blanking out.

What is the trick to dynamically remove a MC that is physically on the stage at design time? If I remember right I have to swap it into a certain depth or something?

Dynamically Adding MCs To The Stage
Hello,

I've been trying to figure this out for some time but apparently this isn't something for an ActionScript noob. So I need some guidance from someone who knows something.

I need to take a collection of movie clips and get them to scroll across the stage left to right one after another. When it gets to the end of the list, start over in sort of a marquee effect. The movie clips contain nothing but a single word of text in four different color states. I can deal with the event handling and state management. What I'm lost on is getting the MCs to appear on the stage and start moving. They can be added one after another in a set interval. But it would be best if they were placed randomly instead of in alpha order.

My thought was to create an array and place the MC names into that and then use a randomizer to grab them and then a function to spit them out onto the stage. Creating the array was the easy part. I'm stumped on the rest.

Can anyone give me some guidance on how best to approach this?

Thank you!!

>>M

Dynamically Scaling The Stage
I have had a wonderful tool in AS2 where I can take this movieClip, resize it and move it off the stage, and at run time, only what the movieClip is over is seen and at full screen. I would absolutely love it if anyone could help me get it to work in AS3. Here is the AS2 code:

function camControl():Void {
parentColor.setTransform(camColor.getTransform());
var scaleX:Number = sX/this._width;
var scaleY:Number = sY/this._height;
_parent._x = cX-(this._x*scaleX);
_parent._y = cY-(this._y*scaleY);
_parent._xscale = 100*scaleX;
_parent._yscale = 100*scaleY;
}
function resetStage():Void {
var resetTrans:Object = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
parentColor.setTransform(resetTrans);
_parent._xscale = 100;
_parent._yscale = 100;
_parent._x = 0;
_parent._y = 0;
}
// make frame invisible
this._visible = false;
// Capture stage parameters
var oldMode:String = Stage.scaleMode;
Stage.scaleMode = "exactFit";
var cX:Number = Stage.width/2;
var cY:Number = Stage.height/2;
var sX:Number = Stage.width;
var sY:Number = Stage.height;
Stage.scaleMode = oldMode;
// create color instances for color
// transforms (if any).
var camColor:Color = new Color(this);
var parentColor:Color = new Color(_parent);
// Make the stage move so that the
// v-cam is centered on the
// viewport every frame
this.onEnterFrame = camControl;
// Make an explicit call to the camControl
// function to make sure it also runs on the
// first frame.
camControl();
// If the v-cam is ever removed (unloaded)
// the stage, return the stage to the default
// settings.
this.onUnload = resetStage;

Here is the code I have so far in AS3, but I've been stuck for a while on this:

function camControl():void {
parentColor.setTransform(camColor.getTransform());
var scaledX:Number = sX/this.width;
var scaledY:Number = sY/this.height;
parent.x = cX-(this.x*scaledX);
parent.y = cY-(this.y*scaledY);
parent.scaleX = 100*scaledX;
parent.scaleY = 100*scaledY;
}
function resetStage():void {
var resetTrans:Object = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
parentColor.setTransform(resetTrans);
parent.scaleX = 100;
parent.scaleY = 100;
parent.x = 0;
parent.y = 0;
}
// make frame invisible
this.visible = false;
// Capture stage parameters
var oldMode:String = Stage.scaleMode;
Stage.scaleMode = "exactFit";
var cX:Number = Stage.width/2;
var cY:Number = Stage.height/2;
var sX:Number = Stage.width;
var sY:Number = Stage.height;
Stage.scaleMode = oldMode;
// create color instances for color
// transforms (if any).
var camColor:Color = new Color(this);
var parentColor:Color = new Color(parent);
// Make the stage move so that the
// v-cam is centered on the
// viewport every frame
this.onEnterFrame = camControl;
// Make an explicit call to the camControl
// function to make sure it also runs on the
// first frame.
camControl();
// If the v-cam is ever removed (unloaded)
// the stage, return the stage to the default
// settings.
this.onUnload = resetStage;

I'd appreciate any help.

Stage Size Dynamically
is there a way to set the stage size dynamically?

for example, I'm doing a form whith several textfields. The number of textfields depends from a list of previous choices the user made. So there's no point of having a stage 400 px long if there are only two choices, but if we have 45 choices then I'd like the stage to "strech" accordingly.

I have to insert the flash into a table inside an html file.

I thought of using Stage.height=x; but no luck (I've tried checking it out in the html file, itworked fine with a fixed height but not to define the size dynamically depending on the number of fields) - tx

Dynamically Get Size Of Stage?
I am trying to get the size of the stage through actionscript, Anybody?

Need To Dynamically Resize The Stage Via A.s. Please Help
hi,

my problem: i need to somehow change the
size of the stage through AS.

i have a scene at the start which detects
the users screen res, then it needs to resize
the stage according to the users screen res.

ive then got 2 scenes after that, one configured
for 800x600 stage size and the other is
made for 1024x768.

i know i can just create 2 swfs with different sizes,
but i want to avoid that.

NB: simply 'stretching' the stage to the screen
wont do. the whole point is so the movie
doesnt get resized, it changes the STAGE SIZE
according to the users resolution.

any help much appreciated!

Need To Dynamically Resize The Stage Via A.s. Please Help
hi,

my problem: i need to somehow change the
size of the stage through AS.

i have a scene at the start which detects
the users screen res, then it needs to resize
the stage according to the users screen res.

ive then got 2 scenes after that, one configured
for 800x600 stage size and the other is
made for 1024x768.

i know i can just create 2 swfs with different sizes,
but i want to avoid that.

NB: simply 'stretching' the stage to the screen
wont do. the whole point is so the movie
doesnt get resized, it changes the STAGE SIZE
according to the users resolution.

any help much appreciated!

Dynamically Placing Mcs On The Stage
well this should be easy for some. i have this simple array for movie clips that will be the navigation.


ActionScript Code:
var navSections = ["aboutUs_nav","hybridGuide_nav","programs_nav","seedTechnology_nav","agronomy_nav","orderOnline_nav","contact_nav"];
 
for (var i=0; i<navSections.length; i++){
    this.attachMovie(navSections[i],navSections[i],i);
};

i just don't understand the logic with placement of the elements on the stage. what i want are each of these to be 20 pixels apart from each other. any thoughts?

Stage Scroll Help
sorry - have solved this one - cant find a delete post button anywhere :(





























Edited: 04/04/2007 at 08:11:49 AM by knickknackpaddy

Dynamically Moving Objects Across The Stage
I need help in moving an object across the stage. I have got it to move each time I click on a button, but I want it to move from point a to point b (_x Axis). Not in an instantaneous fasion but in a gradual fasion..

here is the code I wrote:
button1.onPress = function() {
var a = 6; //the plus value or the speed
var sP = 311.1; //Stop Point
var stP = 215.1;//Starting Point
var gX = (getProperty("button2", _x) + a);
//var mX =
if(gX < sP){
setProperty("button2",_x,gX++);
}
};

Need Change Flash Stage Dynamically
I need load some *.swf into the standalone file: index.swf.
but the *.swf(s) have difference resolution, while it load into the index.swf, there's a blank.
I just want index.swf change its resolution to those *.swf. but "stage.width" is read only, so how can I get a dynamic stage in index.swf?
the index.swf is standalone one, not in a HTML

thanx~

Resizing Main Stage Dynamically
I've seen this before and haven't found it by searching. The main stage or movie clip changes it's x/y coordinates when a navigation button is clicked. For example, when the "News" section is clicked, the main stage changes to 300x100.

There are a few sites that i've seen do this. Any places I can look or any code out there?

Dynamically Aligning Mc With Stage Using Actionscript
Trying to align mc on the center of the stage. Here is an example.

http://www.robitussin.com/coldandflualert/index.asp

Can anyone help out?

// this sets the vars on root frame
var targX = Stage.width / 2;
var targY = Stage.height / 2;
var xscale = 200;
var yscale = 200;

onClipEvent (enterFrame) {
//this variable stores the current x position of the clip
cX = this._x;
cY = this._y;
sX = this._xscale;
sY = this._yscale;
//this variable stores the distance between the clips current x position
//and where we want it to go
//I am setting the targX variable in the root so that it is easy to target with our button
difX = cX-_root.targX;
difY = cY-_root.targY;
scalX = sX-_root.xscale;
scalY = sY-_root.yscale;
//this moves the clip 1/5 of the distance every frame.
//Because the difference between the clips current location and its destination
//will get smaller each frame, so will the amount the clip travels each frame.
//This is what makes the clip appear as though it "eases into" it's final destination
setProperty(this, _x, cX-(difX/8));
setProperty(this, _y, cY-(difY/8));
setProperty(this, _xscale, sX-(scalX/8))
setProperty(this, _yscale, sY-(scalY/8))
}

thanks

How To Dynamically Add Button To A Movie/stage?
I am using Flex Developer and I am designing a Flash Lite app which uses AS2. However I cant find anyway of adding a control such as a button to the stage from code. Do I need to buy a tool to do that or can I add controls/containers from code?
E.g. in AS3 you create the button object then do an addChild(button) and it adds.

Any sample docs apprecietd..

Naming Clips ALREADY On Stage Dynamically
I have a design with a group of lights already on the stage...there are a LOT of them so giving them all an instance name would take to long, how do I dynamically give a group of movie clips instance names if they are already on the stage? I am trying to create a type of twinkle effect but I need to be able to layout everything on the stage the way I want it instead of using one of the many tutorials I have found where someone creates the movie clips and the stars(lights) dynamically.

Thanks!

Adding Content Dynamically To The Stage
Hi -

I have an XML file with a list of photos. I have loaded the XML file into
Flash (CS3 / AS 3.0) and I am iterating through the list to load the photos.
The problem is only the last photo displays. I would like to load each photo
and then create a movie and "copy" the loaded content into the movie clip.
Here is my code:

var myFrontLoader:Loader = new Loader();

function loadClips() {
url = new URLRequest(photoArray[arrayPosition]);
myFrontLoader.load(url);
myFrontLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,
progressHandler);
}


function progressHandler(event:ProgressEvent):void {
if (event.bytesLoaded == event.bytesTotal) {
holderClip = new MovieClip();
holderClip.addChild(myFrontLoader);
arrayPosition++;
if (arrayPosition < photoArray.length) {
loadClips();
} else {
// done!
}
}
}


Any ideas?

Thanks,


Rich

FMX- Changing Stage Height Dynamically
Hello!

I'd like to know if anyone knows how to change the height of the stage dynamically, with ActionScript.
Is there a way to change the height of the stage with a pixel value?
I don't want to scale down the whole movie just make the stage bigger, just like when you change it manually in Modify-Document.
Thanks!

Changing Stage Height Dynamically
Hi,
I couldn't find anything in the documentation, but is it possible to dynamically change the height of the stage?

I am using 'dimensions: pixels', and 'noscale' as publish settings. What I would like to do is, when the height of a movieclip gets bigger (because of its dynamically loaded content), to make the 'stage.height' bigger too, so you can scroll more downwards.

I know stage.height is read-only, but it would be nice to have just the right amount of space at the bottom of the page, depending on how high the movieclips are. Reading back, I wonder if i state my question clear, hopefully I use the right terminology.

so if stage.height would work i would like to do something like:


ActionScript Code:
stage.height= MC._y+ MC._height +30;


thank you,

Jerryj.

Scaling Stage Mask Dynamically
Hi Guys,
Got a slight problem with getting a mask that covers my stage to scale when the browser window is resized.
Basically when the browser window is resized i need the stage to resize with it, and the mask that covers the stage to resize with it to, so it shows more and more of the bg and elements can scale to the width of the entire stage.

Heres where i am on the first frame of the main timeline:

stop();
Stage.align = "TL";
Stage.scaleMode = "noScale";

sizeListener = new Object();
sizeListener.onResize = function() {
_root.mc_menu_all.mc_menu_bg._width = Stage.width;
_root.mc_menu_all._y = Stage.height/1.7;
_root.mc_logo._y = _root.mc_menu_all._y+80;
_root.mc_mask_main._width = Stage.width;
_root.mc_mask_main._height = Stage.height;
};
Stage.addListener(sizeListener);

I don't know if it matters whether i have more than 1 frame on the root timeline, or whether i have to call the script everytime?

If anyone can help with why the above code is not working its much appreciated (got a presentation tomorrow!

Can be seen here http://testsite.imageview.co.uk/djh/site.html

Cheers,
Pat

Dynamically Add Video Object On Stage
Hello there.

I've got into a problem when working with the Video object in Flash 7.
I created a MovieClip with a video instance inside, named "video".
This MovieClip is associated with an action script class called "FlashVideo",
witch creates a NetConnection and a NetStream object to play a FLV video.

This is the class (quite simple):


ActionScript Code:
class FlashVideo {     public var video:Video; // Refer to the video instance inside the MovieClip     public function FlashVideo() {         var nc = new NetConnection();         nc.connect( null );         var ns = new NetStream( nc );         this.video.attachVideo( ns );         ns.play("http://www.helpexamples.com/flash/video/water.flv");    }}


Now I add an instance of the MovieClip on my stage, but the video doesn't play...
Any hints about this?

Thanks,
Ian L.

Change The Stage Size Dynamically
Hi all,
How to change the Stage height and width dynamically in flash 8?
Give me any idea?

Thanks in advance

Dynamically Track All TextFields On Stage
I have several "page" swfs (Flash 9, AS3) that are loaded at runtime by a "navigation" swf (Flash 9, AS3).

I want to trigger a method in my navigation swf each time that a dynamic TextField is displayed on stage in one of the "page" swfs? These TextFields are put on stage at design time somewere on the fla timeline. So these textFields can be nested in mc's and have whatever instance names.


Is this possible?


Tnx,
Gert

Adjust Stage Height Dynamically
Hey, I'm working on this charting thing and it duplicates MCs vertically and I need to be able to adjust my stage to accomadate more or less MC's. Can somebody help me out a bit?

FMX- Changing Stage Height Dynamically
Hello!

I'd like to know if anyone knows how to change the height of the stage dynamically, with ActionScript.
Is there a way to change the height of the stage with a pixel value?
I don't want to scale down the whole movie just make the stage bigger, just like when you change it manually in Modify-Document.
Thanks!

Stage Size 100%, But Where's The Scroll Bar?
I would like to use a tiled background in a flash movie like this guy did http://www.shanehornermusic.com/. It looks like he is accomplishing this by setting the width and height of the embedded flash movie to 100% in the HTML. The only problem on this site is that when the browser window is smaller than the flash stage, no scroll bar appears. Not too great for usability on smaller monitors.

Is is possible for flash to tell the browser to show a scrollbar if the browser's viewport is too small to see the entire stage?

Scroll Many MC's But Only Keep Visible 1s On Stage
Last edited by funkyflash : 2006-01-20 at 09:54.
























I'm stumped about how to design this type of script. I want to scroll 10 MC's horizontally and continuously. However, it takes alot of resources to do this, so it would be better if there was a way to only create the MC's that are on or touching the stage. The stage will only fit 2 MC's but theoretically, you would need 3 MC's to be visible at all times because they could be partially on the stage, if that makes sense.

I searched the web and found this source FLA about creating scrolling tiles:

http://www.senocular.com/flash/source.php?id=0.122

However, I'm pretty new at this and having a really hard time trying to decipher and understand its design.

If anyone could at least get me started on how to design this script, this noob would be most grateful!

BTW, I forgot to mention: each of these MC's are being animated to sway left & right using elastic easing to correspond w/their horizontal movement (& the amount of sway is relative to their speed!) to create more fluid-like motion. haha, that's why it's so cpu intensive.

Dynamically Placing Movie Clips On Stage
Hi I am hoping somone can help me with this problem,

I had an idea of a project i would like to build and my actinscript has improved a lit so I just need a little help with some of it as I am not sure whether it can be done.

I create some movie clips and place them in my library only they have not been dragged onto the stage yet.

What I would like to know is whether I can have a button which once clicked would somehow put the apropriate movieclip i wanted onto the stage in a certain spot so that the user could then drag the movieclip around.

The whole piont is that I dont want the movie clips on stage at the start I want to be able to select them from a menu or click a button and i get an instance on the stage.

a good example I have found is http://www.pearldrum.com/dreamkit/index.html

So just so poeple are clear I want to be able to place clikps onto the stage with the click of a button or from a menu or something and I want to know if it can be done firstly and also what the actionscript is

Thanx all
Pixelmagik

Can Actionscript Dynamically Put A SWF On The Stage In A Specific Spot?
Hey everyone. I have not found a good way around this problem.

I want to do the following

Dynamically load another swf ( which is smaller than the main stage ) into a specific area on my stage and play it only once it has downloaded. I want to pre-load this swf into the area on my stage, once it has loaded I want to run part of my main timeline to be some type of transition and then play the loaded movie. ( Idealy I want to pre-load it into a specific frame if possible )

I cannot find a way to do what I want. ( I suffer from newbiness )

Do I have to do the following, on button click run main timeline for exit transition, load movie that has its own built in pre-loader into my desired location?

However, if I run this code
_root.CreateEmptyMovieClip(empty1,10);
//some type of size, positioning code required.
_root.loadmovie("load1.swf",empty);
it totally overwrites my entire stage.

I have not found a way to move and size my empty movie clip called "empty1" once I create it

any ideas would be a great help.

Using Ascript To Resize Stage And Change Res Dynamically
The movie I am creating needs to be played on 2 formats:
1. The web
2. via CD

My problem is this: I need the cd version to have a stage size of 1024/768 and the bitmaps i use to be quite high resolution, however when the movie plays on the web, I need the stage to be smaller and the res to be less so the download time is cut down. I also asked earlier about converting framerate, but thats another issue. So, is there a way in actionscript to use some type of flag to identify whether the movie is being played over the web or on a cd, and thus resize the stage, its contents and tone down the resolution. If not, can you think of any other solution to this. I would hate to have to basically do the movie twice.

[F8]attaching A Dynamically Generated Movieclip To The Stage
I have a class that dynamically generates a movieclip instance. I want to be able to attach that movieclip instance to the stage. I obviously can't use attachMovie method because it'is only good for attaching something from the library.

How can I achieve this functionality? Thanks.

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