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




How To Remove Carousel From Stage?



i want to put 2 buttons on the stage, one for attaching the carousel (from tutorial) and one for deleting it.all i can manage to remove is the tooltips!i know its easy but i cant seem to manage itany suggestions?thankscressa



Actionscript 2.0
Posted on: Sat Jun 16, 2007 5:59 pm


View Complete Forum Thread with Replies

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

Trying To Remove XML From The Carousel.
OK, here's what I'm trying to do:
I want to remove the XML portion from the Carouse. I want to use regular 'ol movieClips that I create and call in using the Linkage ID. I tried creating an Array and call the items from that, but I think I'm doing something wrong.

Here's what I've got so far: It's not all of the code.. just what i believe to be relevant.
Code:

var myArray:Array = new Array("Wire_Hold", "Ward_Hold", "Raid_Hold", "Command_Hold", "Clinic_Hold");

function setup() {
   numOfItems = myArray.length;
   for(var i=0;i<numOfItems;i++)
   {
      var t = home.attachMovie("item","item"+i,i+1);
      t.angle = i * ((Math.PI*2)/numOfItems);
      t.onEnterFrame = mover;
      //t.icon.inner.loadMovie(nodes[i].attributes.image);
      //t.r.inner.loadMovie(nodes[i].attributes.image);
      t.icon.inner.loadMovie(myArray[i]);
      t.r.inner.loadMovie(myArray[i]);
   }
}

setup();


Help is awesome! :]

[F8] Remove From Stage?
http://img373.imageshack.us/my.php?i...shootergo2.swf
(sorry for using such a bad site...the .fla is too big .


my game is far from done, but i want to iron out the bugs as i go...if you test the game...

1. wait for the bullets to reach 40
2. repeatedly keep pressing fire key for one ship (D or left arrow)so bullets
come out: - - - - - -

once one ship is destroyed the bullets continue to move...i want them to unload themselves once one ship is destroyed.

this would be easy if i had an extra frame, but the 'you win/you lose' and the 'play again' button are just invisible when the game loads and once the ship death animation starts to play the objects are made visible. all on one frame.
i have tried everything i can think of, but its got me no where.

Remove From Stage
i have this code that creates some items on stage

Code:
for (n=1; n<=_root.appetizer.total; n++) {
attachMovie("menuitem", n, n);
this[n]._y = (n-1)*60;
this[n].name = _root.appetizer[n].name;
this[n].description = _root.appetizer[n].description;
}
how can i remove those items?

How Can I Remove Eventlistener From The Stage?
Hi,

I have a main swf file which loads another swf file.
From the loaded swf file I add a keyboard event listener to the stage.

When I remove the loaded SWF from the main file the keyboard event listener is still active on the stage.

How can I remove the event listener from the stage within the main swf file?

Thank you.

Bullet Off Stage - Remove
Hi,

I want to remove bullets when they go off stage.
MoveBullet is my function that animates the bullet.


Code:
if(e.target.x > stage.stageWidth){
e.target.removeListener(Event.ENTER_FRAME, moveBullet);
removeChild(MovieClip(e.target));
trace("out");
}
My error output:

TypeError: Error #1006: removeListener is not a function.
at shooting_fla::MainTimeline/moveBullet()


if I comment away the "removeListener line" I get the following error:

ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display:isplayObjectContainer/removeChild()
at shooting_fla::MainTimeline/moveBullet()


What could be the problem?

/S-fish

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?

Getting A Loaded MC To Remove Itself From Stage?
Hi

I'm creating an image gallery. I've got thumbnails at the bottom of the movie, which when clicked load the image into a loader ('imgLoader') above the thumbnails. I've then created a button on top of 'imgLoader' that loads up an external swf (containing a larger version of the image) into a new loader 'bigLoader' in front of the whole movie. This swf then contains a 'close' button that I want to use to remove 'bigLoader' from the stage so that is returns the user to the gallery.

Here's the code for the loaded swf:


ActionScript Code:
close_btn.addEventListener(MouseEvent.CLICK, closeClick);

function closeClick(myevent:Event):void {
    stage.removeChild(bigLoader);
}

But when I export this, I get an error saying:

"1120: Access of undefined property bigLoader.

So, I understand the error - flash cannot find bigLoader because it is in the main movie & not the external swf (where the above code is), so I just wondered if anyone knew of a way for the movie in the loader to remove itself from the stage? If the call to remove it comes from within itself?

Many thanks in advance.

Best Way To Put A MC From Library Onto Stage And Then Remove It?
I've seen a number of variations, many that end up with a problem of removeChild(movie) not getting rid of the movie.

So what is the best solution? I've just started to switch from AS2 to AS3 and I'm totally lost!

Remove A Clip From The Stage
Hello, how do i remove a movie clip from the stage that is on the stage from authoring? i know removeMovieClip works for attached or created clips... but not clips that are already on the stage.

thanks!

Detect If MovieClip Is On Stage And Remove It
Folks, I need a simple way to detect if a movie clip is on the stage. The stage scales so, it cannot be done by set dims.

I'll click a button, it should check if a list of movie clips is on stage (only one will be at a time). If one in the list is on stage, a function will run that tweens it off while another function tweens in another.

So, question is: What is the easiest way to determine if a movieclip is on the stage?

Is It Possible To Remove The Stage To Allow Click Throughs?
I want to create a flash widget that sits on top of an html page similar to a TV Banner ad in the lower right hand corner (you know, those annoying pop ups on tv). Anyway, I want it to randomly appear but I would like to be able to click the content underneath when it is hidden. Is this an actionscript function, or a javascript thingy, or would it be better to trigger a javascript/css call and just hide the DIV. Just looking for the best solution.

How To Remove Completely My Xml Mp3 Player From Stage?
Hello

I have in the stage one moviclip called main, that is a xml mp3 player

that mp3 player has one buttom called close


what i want is:

when i click in the buttom close, i want the moviclip main to close


how do i do that?

i´m new in as3

Scene 3 Goes Beyond Stage Shows Everything How Can I Remove That?
My scene 3 is going off the stage can someone help me, I onlly want whats on the stage to be display?

Remove Array Elements From Stage
Hey Guys and Gals. I have the following code that duplicates a movie clip on my stage. At the end of my web banner I am having trouble making the movie clips disappear. It's an online banner so when the banner loops I don't want the duplicated clips to stay on the stage I just want them to clear off and have it start from scratch again. I've tried popping them through a function and the removeChild statement. Just stuck at the moment. Thanks!

//This array will hold all the rectangles on the stage
var rectangles:Array = new Array();


//In this loop, we'll create 50 rectangles
for (var i = 0; i < 25; i++) {

//Create one rectangle
var rectangle:Rectangle = new Rectangle();

//Assign a random position
rectangle.x = 15;
rectangle.y = 85;

//Add the rectangle on to the stage
addChild (rectangle);

//Add the rectangle to the array
rectangles.push (rectangle);

}

//The timer will call the "shakeRectangles" function every 0.02 seconds
var timer:Timer = new Timer(20, 100000000);
timer.addEventListener (TimerEvent.TIMER, shakeRectangles);
timer.start ();

//This function is responsible for animating the shake
function shakeRectangles (e:Event):void {

//Loop through the array
for (var i = 0; i < 25; i++) {

//Rotate the rectangle a random amount (from -4 to 4)
rectangles[i].rotation += Math.random() * 1 - 0.5;

//Assign a new random position
rectangles[i].x += Math.random() * 2 - 1;
rectangles[i].y += Math.random() * 2 - 1;
}
}

Remove Child From MC Thats Not Even Attached To Stage {AS2}
Is it possible to remove an MC from an MC if its not even attached to the stage?

Button When Clicked,, Must Be Remove On The Stage

 hello,
 just want to ask, how do i removed button on the stage?

 what i did for now..when clicked is I set the _alpha to zero 0..but it still active and it overlaps the other button on the next layer underneath.

 can you help me how to remove the current button on the stage when press.

 thanks a lot.

How To Remove Radio Buttons Off The Stage
Last edited by conspirisi : 2007-04-11 at 07:51.
























I'm building a multiple choice quiz.

the code below simply creates 3 radio buttons and labels them. The code that creates the radio buttons is nested in the makeRadio() function.

On occasion my application needs to remove the radio buttons on stage in order to replace them. This is the changing question part of the quiz.

I want to call the makeRadio function again after the stage has been cleared. I've tried creating empty movieclips on the already occupied layers by calling the clear function off a reset button. However the makeRadio() function does not put the radio buttons on the stage as before.

How do I clear the radio components off the stage?



ActionScript Code:
import mx.controls.RadioButton;
makeRadio();
function makeRadio() {
    this.createClassObject(RadioButton, "rb_1", 10, {label:"option 1", groupName:"myrbGroup"});
    this.createClassObject(RadioButton, "rb_2", 20, {label:"option 2", groupName:"myrbGroup"});
    this.createClassObject(RadioButton, "rb_3", 30, {label:"option 3", groupName:"myrbGroup"});
    //
    for (i=0; i<4; i++) {
        this["rb_"+i]._x = 65;
        this["rb_"+i]._y = (i*20);
    }
    // Create listener object.
    var rbListener:Object = new Object();
    rbListener.click = function(evt_obj:Object) {
    };
    // Add listener.ll
    myrbGroup.addEventListener("click", rbListener);
}
resetBtn.onRelease = function() {
    clear();
    makeRadio();
};
function clear() {
    for (i=0; i<4; i++) {
        this.createEmptyMovieClip("", i*10);
    }
}


if you try my code (it should all work if you cut and paste it) do remember to put a radio component on stage and then delete it

How To Remove The Duplicatedmovie Clip From Stage?
Hi all
I am duplicating movie clip from libary with below script on frame 10
I have timer on frame 10 which jump to frame 11 after 5 seconds

when in frame 11 I want to clear off the screen...how???

I tried with:
removeMovieClip("_root.raster");
didn`t work

----------------------------------------------------------------------
movieclip.prototype.klonSpezial = function(spalten, reihen, vertX, vertY, posKX, posKY, iWert, jWert, objekt) {
for (i=0; i<spalten; i=i+iWert) {
for (j=1; j<=reihen; j=j+jWert) {
z++;
attachMovie(objekt, objekt+z, z);
with (this[objekt+z]) {
_x = posKX+(i*vertX);
_y = posKY+(j*vertY);
}
}
}
};
klonspezial(5, 4, 160, 100, 1, 1, 1, 1, "raster");
----------------------------------------------------------------------

Delete Sprite -- Or Remove Instance From Stage
I often create a function disengage() and call it when I want a certain component to leave the stage. Usually in the function I make the MC/Sprite's x=-100000; or something just so it's not visible, and doesn't obstruct anything else on the stage.

Now I was thinking instead just to delete that Sprite, and create it when I want to see it again. Is that a good idea?

If so, when I use delete.this in the class instance, I get no errors, but it doesn't remove the class instance (which is a sprite, with a bunch of children--Textfields, & shapes).

What's the best way to do this?

Remove Clips From Stage In Random Order
Hello,
I have 6 letters accross the stage on layer 1. I then attach 6 instances of a movie clip from the library accross the stage to cover them using a for statement, so far so good.

Now I want to randomly remove them 1 by one. Any ideas? Here is what I have so far..


ActionScript Code:
var main:MovieClip = this;
var numOfLetters:Number = 6;
var nInterval:Number;
var randomRemoval:Number;
//attach 6 instances to the stage 50 px apart to cover letters//
for (i=0; i<numOfLetters; i++) {
    cover = main.attachMovie("cover", "cover"+i, i);
    cover._y = 50;
    cover._x = i*50;
}
//remove the 6 cover instances 1 at a time from the stage//
nInterval = setInterval(remove, 1000);
function remove() {
    randomRemoval = Math.round(Math.random()*numOfLetters);
    cover/*??*/.removeMovieClip();
}

cheers for any suggestions in advance.

---

Remove Movieclip Form Stage Compeletly
I need to remove the moveclip from stage...

Remove A Movieclip Off The Stage When I Click A Button.
I dragged a movieclip onto the stage, gave it an instance name but want to know how to remove it when I click a button.


Code:
Startup.visible = false;
??

Remove BlurFilter On Stage OnUnload Movieclip
i have called movieclip and set stage filter to blurFilter and show that mc only.
now i want to fire event on closebutton of that mc to remove blurFilter applied on stage.

can anyone guide me how would i do that?

i am closing that MC on closebutton clip and i also want to remove blurFilter on that button onRelease.

please urgent help me.

[F8] Remove Dynamically Created Movis Clips From Stage
i am needed some help with this one.

i have dynamically created movie clips through action script to make a small image viewer for a site that i am working on. the problem that i am having is, if a user goes to one of the image viewers and looks at the images there then moves onto the next page with images the movie clips are replaced by the new ones. if the user then goes to a page with no images viewer on it i am left with a black box on the screen where the thumbnails were held for the image viewer.

i have used this code to remove the movie clips but it does not seem to be working.


Code:
removeMovieClip(this.container_mc);
any help on this would be great.

Flash 8 - Remove Warning Text From Stage.fullscreen
Hi there,

Is it possible in flash 8 to remove or manipulate da warning text from flash
9 Stage.fullscreen?

Thanks

How Do I Remove Dynamically Created Movie Clips From The Stage Using Code
Hi,

I have some code that generates thumbnails based on a variable called maxThumbnail. The problem I am having is that once the thumbnails are created, i cannot remove them so the code can run again to create a new set of thumnails in the same place.

Heres the code

for (var i = 1; i <= maxThumbnail; i++)
{
newThumbnail = this.attachMovie ("thumbnail", "thumb" + i, i);
}

My current solution is to add an empty keyframe after the frame where the holding movie clip is. I then just play the timeline to remove and reload the holding movie clip. Is there a way of doing this dynamically. I would imagine it would be something along the lines of

removeMovieClip(_root.thumbailholder)
loadMovieClip(_root.thumbailholder)

How Do You Delete / Remove / Unload Xml Jpeg Image From Stage Once Scene Changes?
based on attached file: "slideshow"

Scenario:
suppose after view one slideshow (scene1 slideshow) you want to transition to a new scene (scene2 slideshow) with a completely different slideshow. via clicking on a menu button that takes you to that new scene.

so far I am able to get to new scene but the images from the previous scene (scene 1) xml jpeg image remains on the stage in the new scene (scene 2)

is this a image cache problem? The jpeg is still there but the other stage elements do not remain on the stage in the new scene.

How do I remove, delete them, unload or get the xml jpegs from scene 1 out of scene 2
please help

How Do You Delete / Remove / Unload Xml Jpeg Image From Stage When The Scene Changes?
Scenario:
3 scenes
scene 1 "home"
scene 2 slideshow1 "images" (XML images and file)
scene 3 slideshow2 "images1" (XML images and file)

see attached file: "slideshow"

so far I am able to get to new scene but the images from the previous scene xml jpeg images remains on the stage when you go back to the "home" scene or to another scene.

How do I unload (delete/remove/destroy) the XML jpeg data from the stage when you go to a new scene?

is this a image cache problem? How can I correct this?????

please help!!!!!

Text Scroller When Reach Bottom: Remove "down" Button From Stage
let's say i have a text scroller like this:
http://www.kirupa.com/developer/mx/textscroller.htm
what i need is when the scroller goes at the bottom and there is nothing else to show,
with some trick to call a fuction so the "down" button disappear.
i need this cause i made a scroller only with 2 buttons, and they don't look like broswer's scrollbar. (they are at the center up/down of the text scroller)
is this possible?

happy christmass to everyone

Macromedia Director MX 2004 Trial How To Remove Trial Text From Stage
Hi
I will eventually buy Macromedia Director MX 2004 (any tips on best place to buy?) but at the moment I find that "Macromedia Director MX 2004 Trial" text on the bottom right of the stage is getting in the way of where I want to put a button - the text placed there by Macromedia is always on top!

Does anyone know how to get the text removed?

thanks
David

JavaScript Remove. Remove Flash Applet When Done Playing?
Is there anyway to remove a section of HTML with a javascript? Ive seen ones that replace text segments, and remove certain tags like <br>. I want it to remove the flash applet once its done playing.

I know that its possible, I just need someone that knows javascript better than me. Someone please help it would be MUCH appriciated! Thanks!

Remove Movie Clip Help, Remove Child {AS2}
So, I'm new here, and do to the lack of good help on Kongregate, I have come here =D Hopefully somebody here will be able to help me

if(_root.row2.block1._x == _root.row1.block1._x)
{
_root.row2.block1.removeMovieClip();
trace("working");
}


now, the trace fires, and, if I remove ".block1" the entire movie clip is removed, but with it in there, to remove the MC from within my MC, it WONT be removed, am I doing this wrong or am I making some other error?

Unhappy Adjusting Columns And Rows On Stage Resize, According To Stage.width.
Hey fello flashers,

what i'm trying to achieve can be seen here, at the FWA's website.

When you resize the browser window the thumbnails rows and columns adjust accordingly to fit.I've managed to attach the thumbnails correct when my enableButtons() function is called but i'm unsure how to approach resizing.

if anyone has encounted this problem before or can help, then pls do i'm a little confounded on this one.

thanks
cam

Stage.align = "TL";

var numberOfGalleries:Number = 20;
var thumbMarginX:Number = 163;
var thumbMarginY:Number = 109;

function init():Void {
enableButtons(numberOfGalleries);
resizeStage();
}

function enableButtons(numberOfGalleries:Number):Void {
currentRow = 0;
currentColumn = 0;
for (i=0; i<numberOfGalleries; i++) {
tracker = i;
thumbsDisplayer = this.createEmptyMovieClip("thumbsDisplayer_mc", this.getNextHighestDepth());
currentThumbnail = thumbsDisplayer.attachMovie("thumbnail holder", "thumbnail"+(tracker+1), thumbsDisplayer.getNextHighestDepth());

currentThumbnail._x = currentColumn*thumbMarginX;
currentThumbnail._y = currentRow*thumbMarginY;
currentColumn++;
if (currentThumbnail._x>(Stage.width-(currentThumbnail._width + thumbMarginX))) {
currentRow++;
currentColumn = 0;
}
}
}

function resizeStage() {
var myListener:Object = new Object();
myListener.onResize = function(e:Object):Void {
//
}
Stage.addListener(myListener);
}


init();

Stage.width && Stage.height Doesn't Work Anymore?
How do you get Stage.width and Stage.height in ActionScript 3.0

2.0 this works like a charm. I guess they may have moved this inside a deeper class or something.

thanks in advance.

Create Array On Stage, Mathematically Referring To Objects On The Stage
Ok what I want to do is create a set of small images on the stage and name them sequentially like you would an array, then refer to them mathematically in actionscript. I tried naming them as an array but it says that the name is reserved for the system or something. Does anyone know how to get an array of objects onto the stage, or have an idea of something else I could do to get the same effect?

Create Array On Stage, Mathematically Referring To Objects On The Stage
Ok what I want to do is create a set of small images on the stage and name them sequentially like you would an array, then refer to them mathematically in actionscript. I tried naming them as an array but it says that the name is reserved for the system or something. Does anyone know how to get an array of objects onto the stage, or have an idea of something else I could do to get the same effect?

Stage.width And Stage.height Not Matching Document Settings?
Ok, so I have no idea why this would be happening and its driving me nuts. I have my Flash movie size set to 960x650. However, when I trace stage.width and stage.height, I get:

950.05x630

Why in the world would this be happening? It's screwing up all the work I'm trying to put into positioning elements relative to the stage size. Thanks for any help!

Stage.height And Stage.width Erratic Values?
Hey folks,

I was wondering if it happens in all Flash everywhere, or just in mine:

When I trace Stage.height and Stage.width, I always get erratic values:

Stage.height gets me always 4 pixels less than real
Stage.height gets me always 104 pixels less than real

This, way if my stage has 760 x 400, it will return values 756 x 296.

Anybody knows why?

Thanks!

F8 Movieclip Change On Stage Causes The Entire Stage To Dissapear
I have my stage with a background picture.

On stage left are buttons, and on stage right I have a movieclip (mc_Preview).

When the user puts his mouse over each button I would like the movieclip to move to a different frame.

the problem is when the mouse moves over a button, i see the movieclip move but then the entire stage dissappears and turns a few shades of gray.

Does this sound familiar to anyone?
Any help would be greatly appreciated!

External MC Loaded On Stage, I Can Press Buttons That Are On The Stage Through It...
I'm used to AS3, and I don't have much experience in AS2. I'm trying to modify an older flash file done in AS2.

An external swf is loaded using this code...


ActionScript Code:
on(release) {
    loadMovieNum("supplimental/external.swf", 500);
}

The problem is that even though this external movie covers the whole stage, My mouse can still "see" buttons that are on the stage, and I can click them. I don't want to be able to click the buttons through my external movie. Thanks for any help.

Stage.width, Stage.height, Add.Listeners Problem
Hi
i found the way yesterday to ensure my mc stays full screen. now i want to animate the same mc if i can in reaction to a button click.

not sure how this next step goes. do i need another addlistener to the background mc that im tweening ?

kindly check the .fla. to see what i mean.
its very rough cut but hopefully you can get the gist of it.
when the text button is clicked, the bg reverts to the top left of the screen.

thanks
-dj

MX2004 -- Stage.height And Stage.width Different From Mac To Windows
I have a really strange problem that is ruining my movie. I have set the size of the stage to 450px by 400px in the properties dialog. In my actionscript, I've got all kinds of things that rely on Stage.width. So, I developed everything in MX2004 on Mac, and everything worked swimmingly. So, I opened up the exact same file in MX2004 and everything is placed wrong on the stage. So when I did a trace of Stage.width, I got 940px, and a trace of Stage.height gave me a figure of 763 pixels. If I do the same traces on the Mac, I get what I expect, 450px for width and 400px for height. Does anybody have any ideas as to what might cause this kind of discrepancy?

Thanks,
John

External MC Loaded On Stage, I Can Press Buttons That Are On The Stage Through It...
An external swf is loaded using this code...


Code:
on(release) {
loadMovieNum("supplimental/external.swf", 500);
}
The problem is that even though this external movie covers the whole stage, My mouse can still "see" buttons that are on the stage, and I can click them. I don't want to be able to click the buttons through my external movie. Thanks for any help.

Stage.width & Stage.height Problems
Why is it when I use this script attached to an empty movie clip the box seems to always be short on the height side? The width is fine. See attached FLV.

frame.fla.zip

Thanks in advance for any feedback.


Code:
onClipEvent (load) {
this._x = 0;
this._y = 0;
this.moveTo(0, 0);
this.lineStyle(1, 0x000000, 100);
this.beginFill(0x000000, 0);
this.lineTo(Stage.width-1, 0);
this.lineTo(Stage.width-1, Stage.height-1);
this.lineTo(0, Stage.height-1);
this.lineTo(0, 0);
this.endFill();
}

MC Moves OFF Stage Left, Appears ON Stage Right?
i have an MC that is being moved left and right by the arrow keys. (no up or down movment)

i want to make it so when the MC is moved and disapers off stage left or right, it appears on the opposite side of the stage...

MC moves off stage right, comes on stage left.
MC moves off stage left, comes on stage right.

Belwo is my code that moves my MC, what do I need to add for the above action?


ActionScript Code:
var oldladyspeed:Number = 5;
stage.addEventListener(KeyboardEvent.KEY_DOWN, downHandler);
function downHandler(event:KeyboardEvent):void {
   
    if(event.keyCode == Keyboard.LEFT) {
        oldlady.x -= oldladyspeed;
    }   
   
    if(event.keyCode == Keyboard.RIGHT) {
        oldlady.x += oldladyspeed;
    }
}

THANKS

Flex Stage Overtakes Flash Stage
I'm loading a flex swf into a flash swf, and it seems that flex takes over the stage in quadrant 4, if you look at as a grid:

-------------|-------------
-------------|-------------
-------------|-------------
__________o__________
-------------| **********
-------------| *Quadrant*
-------------| ****4*****

And at the origin is the top left corner of the flex swf.

Now since the flex swf only takes up a small amount of Quadrant 4, when an Alert message from the flex swf comes up (from mx library) it looks up professional since it is not placed in the center of the application, but the center of quadrant 4.

Does anyone know, how to restrict stage access to only the predefined application width and height so the Alert message will be centered in the flex swf.

Thanks in advance,
Basil Al-Dajane

PS. worth mentioning, I'm using Flash CS3 and Flex 3.0, both running on ActionScript 3.0

Stage.height & Stage.width Return 0
First, hey there, cool forum. This is my first post...anyways...

I'm having what, I want to assume, is a common issue and there's something I'm missing here...I have a flash movie that works fine (that is Stage.height and Stage.width) return their proper values when the actual SWF is played in the flash player, however, when I put the movie into an HTML page and set it's height and width to 100%, Stage.width and Stage.height are 0 and my neato script breaks.

I realize I'm scaling the movie, but it seems to me that Stage.width and Stage.height should work regardless...and the fact it gives me 0 is even more odd, as though it's not working at all.

Scale Proportion Past Stage But Not Below Stage
This goes out to Scotty or any other guru floating around out here.
I need the image_mc movieclip in this .fla to scale to fit browser, however i need the image to scale in proportion. I would also need a listener of sorts that will NOT allow the image_mc movieclip to scale below the stage size of 1024 x 768.

Can anyone drop some science on me?

http://www.spent2000.com/scale_propo..._for_stage.fla

Thanks in advance.

- 400x5

Stage.align And Stage.scale(X,Y) Algorithms
Hello, I'm after a good way to take a image scale it to where:the image scale propotionately (image.scaleY == image.scaleX);
the image must scale to fit the browser, But.
the image must not leave empty areas of the stage exposed (upscale the image if needed to cover blank stage area exposed, which will clip off a end of the image and thats where Stage.align comes in)
the stage.align will help give scale orientation, meaning from what direction will the image scale. This is important since this can cause a few problems with centering of the image upon rescale and you also want to know what end is most likely to get clipped off in the event that the image needs to upscale to cover blank stage areas.

as I have it now

_imageHolder is a hypothetical image and stage is a reference to the stage.
I know this algorithm is not a best practice and it don't cover the stage completely. Any help would be great.


PHP Code:



            if((_imageHolder.width >= stage.stageWidth) && (_imageHolder.height >= stage.stageHeight)){                if(_imageHolder.width >= stage.stageWidth){                    _imageHolder.width = stage.stageWidth;                    _imageHolder.scaleY = _imageHolder.scaleX;                }else if(_imageHolder.height >=  stage.stageHeight){                    _imageHolder.height = stage.stageHeight;                    _imageHolder.scaleX = _imageHolder.scaleY;                }            }else if((_imageHolder.width <= stage.stageWidth) && (_imageHolder.height <= stage.stageHeight)){                if(_imageHolder.width < stage.stageWidth){                    _imageHolder.width = stage.stageWidth;                    _imageHolder.scaleY = _imageHolder.scaleX;                }else if(_imageHolder.height < stage.stageHeight){                    _imageHolder.height = stage.stageHeight;                    _imageHolder.scaleX = _imageHolder.scaleY;                }            }        } 




This event will be in a function that fires when the stage rescales or when the image loads.
Also what is a good idea to deal with the stage.align problems that can come up?

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