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




Animate Offstage To Stage



hello =].
exactly what the title says.
im trying to get a movieclip from my workarea and animate it onto the stage using AS 3 but i keep getting the error#1009 null blah blah blah.
could anyone give me a few pointers?

my code is very simple:
import fl.transitions.Tween;
import fl.transitions.easing.*;
stage.addEventListener(Event.ENTER_FRAME, intro);
function intro(event:Event):void
{
new Tween(home_mc, "x", Strong.easeOut, menuStart_mc.x, home_mc.x = 30, 6, false);
}

thats the jist of my code...



ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0
Posted on: 11-11-2008, 02:10 AM


View Complete Forum Thread with Replies

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

Animate Things On And Off The Stage Accordingly
The first is a simple .swf that I put together just to see if the actionscript is correct. The second is the corresponding fla file. The third is a larger .fla file of which I applied the same logic, however when I click on any of the buttons in the home state, It either does nothing, goes to the wrong place, or just starts the movie over. I just want to be able to animate things on and off the stage accordingly.

Here is the one that works:

http://red5.ws/testmovies.swf
http://red5.ws/testmovies.fla

Here is the one that does not

http://red5.ws/realdeal2.0.fla

Maybe another set of eyes on this can see something I'm missing

Thanks a ton

Stage.width Query : How To Animate The Bg ?
Hi
so i have coded the bg image on the stage so that it fills the screen and resizes with the browser great.
but now i would like to animate that bg. does anyone know the next step in this ? do i need to add more listeners ? if so, to what ? i have a basic .fla i could send any of you if you want to take a look.
thanks, and have a great day
-jt.

Trying To Animate MC On Stage Using Tweener From Within A Custom Class
Hi,

I'm trying to animate a movieclip on stage using a custom class that uses Tweener. I'm not getting error messages... it just not animating. I've posted the class below... any ideas?


Code:
package {
import flash.display.*;
import flash.events.*;
import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.motion.easing.*;
import fl.transitions.TweenEvent;
import caurina.transitions.*;
import ButtonSetup;

public class SceneNavigation extends MovieClip {

private var yIn:Number = -820;
private var yOut:Number = -750;
private var widthIn:Number = 6473;
private var heightIn:Number = 610;
private var widthOut:Number = 5942;
private var heightOut:Number = 560;
private var zOutTime:Number = .3;
private var zBlurTime:Number = .1;
private var zUnblurDelay:Number = .45;
private var moveSpeed:Number = .3;
private var zInTime:Number = .75;
private var posOut:Array = new Array(2442, 1452, 460, -530, -1520, -2521);
private var posIn:Array = new Array(2652, 1514, 450, -617, -1713, -2783);
private var posOutStart:Number = posOut[0];
private var posOutEnd:Number = posOut[1];
private var posInStart:Number = posIn[0];
private var posInEnd:Number = posIn[1];
public var btnClicked;

public function SceneNavigation() {
this.width = widthIn;
this.height = heightIn;
this.x = posIn[0];
this.y = yIn;
}
public function whichWay() {
posOutEnd = posOut[btnClicked];
posInEnd = posIn[btnClicked];
/*if (posOutEnd > posOutStart && btnClicked != 0) {
posOutEnd = posOut[btnClicked]-50;
}*/
nextPage();
}
public function nextPage() {
Tweener.addTween(this, {x:posOutStart, y:yOut, width:widthOut, height:heightOut, time:zOutTime, transition:"easeInQuad"});
Tweener.addTween(this.blurStrip, {delay:zOutTime, time:zBlurTime, alpha:1});
Tweener.addTween(this.blurStrip, {delay:zUnblurDelay, time:zBlurTime, alpha:0});
Tweener.addTween(this, {x:posOutEnd, time:moveSpeed, delay:zOutTime, transition:"easeOutQuad"});
Tweener.addTween(this, {x:posInEnd, y:yIn, width:widthIn, height:heightIn, time:zInTime, delay:(zOutTime*2), transition:"easeOutQuad"});
posInStart = posIn[btnClicked];
posOutStart = posOut[btnClicked];
trace(this);

}
}
}
The nextPage() function is supposed to animate a movieclip on stage. I've traced all the variables and they're values are correct. I've tried using "this.parent" and that didn't work either. This works when used from the main timeline. I've tried using a simple Tweener animation from another class on different object and it works fine there as well... I can't figure out what is wrong with this setup. Any help would be greatly appreciated.

UPDATE:

I'm passing in a value for the btnClicked variable from another class... this could be what's causing the problem. When I call the nextPage() function from the constructor the object does animate. Still not sure what's wrong.

Hide Everything Offstage
Hi,

Is there a way to hide all offstage objects besides creating individual masks for all these things. I am publishing my website and for some reason, depending on how the browser is sized, you see things offstage. Thanks.

Danny

Detecting If Mouse Is Offstage.
Hello, all.

Is there a way to detect if the mouse position is outside the "Flash" area so as to trigger a switch?

Cheers.

Mask Offstage Objects°°°
Hi folks,

I have a question with loading an external flashmovie into my mainmovie: how can you mask the offstage-objects from your external flashmovie? In Swish there is a possibility to do so, but I can't see something like that in flash - I just do not know.

Please help
Omitofo
-Attila-

°°°masking Offstage Objects: How To?
yep, this is my question: help me plz.

OMITOFO
ATTILA

Movie Size - Offstage
Does anyone know how to restrict the movie size so that you can only ever see within the bounds of the movie width/height?

My client only wants me to supply an swf with no html. In order to view it, he drops the swf onto his browser to view.

But, then, he can see all the off-stage goings-on as well!!

I know it doesn't matter once the swf is embedded in HTML, but my client is moaning.

Any ideas?

Checking For Mouse Being Offstage
Hey people,
I've got a little application that uses custom mouse-cursors. Although, it looks kinda funny when the mouse leaves the stage, because you'll then see a floating cursor in the movie. So I was wondering if it's possible to see if the mouse has left/entered the movie, so I can hide the custom cursor when it leaves it.

Thanks in advance,
SaphuA

Offstage Images Showing Up
When I publish my flash, and view the html file in the browser, offstage images show up. I was under the impression that the only objects that are visible are the stuff onstage...do I have to use a mask or something?

I Want An Offstage Object To Be Visible: CSS Or?
Here is a mockup of how I would like the movie to look and function using a 728x270 movie size.
http://www.cincinnati.com/spec/cinSceneMock.html

The 525x180 black area at the top is black and blank whenever a horizontal photo is displayed which is most of the time. The Photo Gallery is a popup and the actual size is

At the bottom is a standard 728x90 adspace that is served via an adserving system called OAS. Currently we use javascript to display ads that expand past the boundaries of the adspace. This method allows the expandable part of the ad to overlap an existing area or content such as text.

Here is a mockup of how that system works with 2 separate SWF files:
(Resize your browser to simulate the popup size)
http://www.cincinnati.com/spec/cinproposal1.html

While this is an exceptable solution, I prefer the version at top because the bottom of the phone which is offstage in the 525x180 subSWF is visible on top of the 728x90 area at the bottom of the SWF. I also prefer it because on rollover the subSWF is launched and does not close on rolloff. I would of course put a close button.

So my question is can I achieve what I want using CSS or actionscript?(show the offstage portion of the phone object) If CSS I would like a vertical image to appear over the top movie.
I am pasting the entire CSS for the photogallery below and a mockup of the Photo Gallery as a GIF:

http://www.cincinnati.com/spec/cinsceneMock.gif

body {
background-color: #000;
margin: 0;
font-family: Arial, Helvetica, sans-serif;
background-image: url(/graphics/gallery/logo_cin_gallery.gif);
background-position: top right;
background-repeat: no-repeat;
}
/* defualt link color */
a:link, a:active, a:visited {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
/* end defualt link color */
/* gallery */
#container {
width: 750px;
height: 540px;
}
#container_ad {
width: 100%;
height: 115px;
padding-top: 12px;
background-color: #000;
border-top: 1px solid #ccc;
text-align: center;
}
#lh-col {
width: 530px;
height: 535px;
float: left;
margin: 0;
text-align: center;
}
#lh-col-header {
background-image: url(/graphics/gallery/bg_line.gif);
background-position: left;
background-repeat: no-repeat;
width: 510px;
text-align: left;
padding: 5px;
height: 25px;
}
#photo {

}
#rh-col {
margin-left: 535px;
padding-top: 225px;
width: 195px;
padding-right: 10px;
}
#rh-col-top {
height: 180px;
}
.photoborder {
margin: 0;
padding: 5px;
border: 1px solid #666;
background-color: #fff;
}
#nav_table {
margin-bottom: 8px;
}

h1, h2, h3, h4, h5 {
font-family: Arial, Helvetica, sans-serif;
margin: 0;
color: #fff;
}
p {
font-family: arial,helvetica,verdana,sans-serif;
font-size: 12px;
color: #fff;
}
.date {
font-family: arial,helvetica,verdana,sans-serif;
font-size: 12px;
color: #fff;
}
#photobyline {
font-family: arial,helvetica,verdana,sans-serif;
font-size: 10px;
color: #eee;
}
.caption {
font-family: arial,helvetica,verdana,sans-serif;
font-size: 11px;
color: #fff;
}
#nav {
color: #fff;
text-align: center;
width: 200px;
}
#nav_middle {
background-image:url(/graphics/gallery/gallery_button_bg.gif);
width: 90px;
font-family: arial,helvetica,verdana,sans-serif;
font-size: 14px;
font-weight: bold;
text-align: center;
color: #333;
}
#headleadbar {
font-size: 16px;
font-weight: bold;
}
#side_column {
font-size: 12px;
text-align: left;
}
#side_column ul {
padding: 0 0 0 .2em;
margin: 4px 0 .6em 1.2em;
list-style-type: none;
}
#side_column li {
background-image: url(http://cinweekly.com/graphics/bullet.gif);
background-repeat: no-repeat;
background-position: 0 .3em;
padding-left: 1.3em;
padding-bottom: .4em;
color: #eee;
}

#side_column li a:link, #side_column li a:active, #side_column li a:visited {
color: #eee;
text-decoration: none;
}

#side_column li a:hover {
color: #fff;
text-decoration: underline;
}
/* delete soon */
#latestgalleries {
font-size: 12px;
text-align: left;
}
#latestgalleries h3 {
font-size: 14px;
font-weight: bold;
text-transform: uppercase;
}
#latestgalleries ul {
padding: 0 0 0 .2em;
margin: 0 0 .6em 0;
list-style-type: none;
}
#latestgalleries li {
background-image: url(/graphics/gallery/cingallerybullet.gif);
background-repeat: no-repeat;
background-position: 0 .4em;
padding-left: .7em;
padding-bottom: .3em;
}

#latestgalleries li a:link, #latestgalleries li a:active, #latestgalleries li a:visited {
color: #eee;
text-decoration: none;
}

#latestgalleries li a:hover {
color: #fff;
text-decoration: underline;
}

/* end delete soon */
/* end gallery */

Random Offstage Coordinates
Last edited by devonair : 2005-12-19 at 02:43.
























Okay, here's a little brainteaser for someone who wants to have some fun. Probably simpler a problem than I'm making it out to be, but my brain isn't in math mode..

Can anyone figure out how to pick random x and y coordinates that are off the stage?

So, for example, x can be anything from -200 to Stage.width+200 and y can be anything from -200 to Stage.height+200, but the final (x, y) point cannot be anywhere on the stage...

Hopefully I explained that well, and hopefully someone can point me in the right direction before I smash my computer against a wall..

Thanks,

d.

EDIT:

this is what I have:

ActionScript Code:
import flash.geom.Point;
function randCoords():Point {
    var x:Number = 0;
    var y:Number = 0;
    var p:Point = new Point();
    while (x>-150 && x<Stage.width+150 && y>-150 && y<Stage.height+150) {
        x = Math.random()*((Stage.width+300)+300)-300;
        y = Math.random()*((Stage.height+300)+300)-300;
    }
    p.x = x;
    p.y = y;
    return p;
}


Seems to work all right, but can it be better?

How To Track Offstage Movement?
hey folks,

i was wondering if anyone could suggest a way of how to be able to track the instance in which a user might have moved the mouse off the flash application? i don't care what he does when the he moves out of the application... i just want to be able to track the fact that he does move out...
how should i go about that?

thanks,
chris

Hiding Offstage Content In Movieclip
Hello!

I'm trying to make numerous movie clips that will require offstage content to motion tween across a 60 pixel by 60 pixel stage. When I publish a sample movieclip, the resulting .swf shows all content, in essence extending the stage beyond 60 x 60. However, if I do a publish preview (HTML), the movieclip shows only the desired "acreage".
All of the tutorials/books I have read indicate that only the predetermined stage size will actually be published.

What am I missing? I have tried altering the load order in the publish settings from "bottom-up" to "top-down", but this doesn't help.

Any advice offered will be graciously accepted and appreciated!

Eric

Bitmaps Showing Offstage After Publish
Hey out there; using flash 8

Just had a bad experience - was showing a flash movie I made to someone on their laptop; their resolution was set real tight, higher than my normal 1024 by 7whatever, which works well on my 19 inch mon.

Anyway, looking at the small images, i noticed that none of my bitmap edges were lined up - on my computer all edges show that they are flush with the stage, but on his laptop it looked as though i hadn't bothered to line up the edges before i published - which of course i did. Obvioulsy it looked bad.

I cranked my computer res up as high as it could go - but could not recreate the problem - though my mon. res could not shrink the images as small as theirs could.

Why is this happening and is there a way to prevent this from happening again?

Thank you
Hoss

Offstage Displays In Projector/exe File
Hi:

Probably very basic but,

I have a projector/exe file with a full screen same size fs command in the start:

fscommand ("fullscreen", "true");
fscommand ("allowscale", "false");

I have items panning to offstage both left and right
obviously when I create the player they are easily visible and, unacceptable.

Does it have something to do with the fs command? I'd really rather not have to create an offstage 'window'. Am in cs3

any help is good help.
thanx

Loaded Swf - Offstage Items Showing
I have some external swf's that I am loading in, but when they are loaded in, I can see things that are "off stage" in the loaded swf.

Anyone know of any solutions to this?

Thanks!

Loading External Swf With Offstage Content In It
Hi!

I have several swf:s created by another guy which I want to use. These external swf:s are basically slideshows with sliding and scaling sprites + texts. We have decided to work in 800 x 600 and to fill out this area the sprites are a bit larger, making sliding them possible.

The problem is, when I load these swf:s, ALL content is shown, even parts of sprites that were hidden off stage in the external swf.

Is there a way to prevent this?

Thanks!

/Bo

Problem Loading .swf File Into Mc - Offstage Showing
Is there anyway to load a swf file into a flash file movie clip so that when the flash file is published the swf file retains its boundaries and doesn't show stuff which is normally off stage when published by itself. Has anyone else had this problem?
tmj

AS 2 Offstage Content Of Swf Shown As Transparent Area
Hi
I have a loader on stage it loads external.swf.
The problem is that after loading the external.swf into the loader, it
shows transparent area in lowerside and to the right.
This transparent space is actually in the offstage area of my
external.swf. I have used a mask to show only stage content in
external.swf. But loader shows offstage content as transparent content.
The extra trasparent portion is shown in green area in main.swf
the paths of main swf is
http://www2.classicinformatics.com/jabir/main.swf
the paths of external swf is
http://www2.classicinformatics.com/jabir/external.swf
the paths of main fla is
http://www2.classicinformatics.com/jabir/main.fla

Please help asap

Offstage Content Of Swf Shown As Transparent Area
Hi

I have a loader on stage it loads external.swf.

The problem is that after loading the external.swf into the loader, it

shows transparent area in lowerside and to the right.

This transparent space is actually in the offstage area of my

external.swf. I have used a mask to show only stage content in

external.swf. But loader shows offstage content as transparent content.

The extra trasparent portion is shown in green area in main.swf

the paths of main swf is
http://www2.classicinformatics.com/jabir/main.swf

the paths of external swf is
http://www2.classicinformatics.com/jabir/external.swf

the paths of main fla is
http://www2.classicinformatics.com/jabir/main.fla



Please help asap

Placing Mcs Offstage: Invalid Size And Position Error
i have a series of mcs that i want to place one after the other inside a container mc so i can then scroll this horizontally.

the last mc needs to be placed way offstage at x: 3000+ and flash is giving me an error message.

i'm sure there are much better ways of doing this than setting it up manually. any help would be hugely appreciated! thanks.

Animate Forward, Animate Backward
This seems like it should be easy, but it's beyond my skill.

I have an animation that I want to play forward when I mouse over, and play backward (to the beginning) when I mouse out. Here's the code:

stop();

function zoomMovie(event:MouseEvent):void
{
play();
}
this.addEventListener(MouseEvent.MOUSE_OVER, zoomMovie);

function mouseOut(event:MouseEvent):void
{
function everyFrame(event:Event):void
{
if (currentFrame == 1)
{
stop();
}
else
{
prevFrame();
}

}
this.addEventListener(Event.ENTER_FRAME, everyFrame);
}
this.addEventListener(MouseEvent.MOUSE_OUT, mouseOut);

Any suggestion are very much appreciated

Noob: Animate, Stop, Animate
basically i'm trying to animate a movie clip from 0 pixel to 550 pixels in x axis, and when i reach 550 pixels in x axis i want it to stop and then animate in y axis from 10 pixels to 100pixels.

how can i do that?

please help me on my problem, it has been bothering me for days.

Button Down = Animate In Content - Press Another Button Animate Content Out?
Here's what I am looking for. I want to have my buttons animate my content in and out of my movie stage. I know I can do it using the timeline, but I am looking for a more efficient way of doing it.

If anyone has any advice or any fla's, I would appreciate it.

Thanks
kmaier

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?

Stage > Origin Issue When Resizing Stage
Hey. Its 7:00am and Im dead tired looking for an answer to my noob question.

Basically I was wondering if someone could explain to me why the origin of the stage changes when performing a browser resize?? The thing is that when it is resized to a size larger than the original stage size the origin has negative values. On the other hand when I resize the stage to a size smaller than the original I get positive values for the origin. (Upper Left hand corner).

Ive tried setting the stage.align property to top left but i still get these crazy values and i was just hoping that someone could explain this behavior to me.

Too make matters even worse is that the results I get when previewing the movie in the IDE Flash Player is not even close to the results I get in the browser Flash Player. Could it have something to do with the fact that I recently installed Flash Player 10?

Id also like to take advantage of this thread to ask if it is possible to set the stage w/h to 100% via the swf metatag. Ive tried to do this but have been unsucesful.


Here is the link... which is not even close to what Im seeing when previewing in the Flash IDE. '

http://www.pixelbrigade.com

Help With Stage.align/stage To Browser Re-sizing
Hi Guys..

I wonder if you can help... I'm wanting to create a flash site that has a fluid layout.

I've attempted to follow various tutorials and looked through the books that I have, but at present I'm struggling.

I'm using CS3 on the Mac platform and I'm really quite new to actionscripting.

I want to create a page which has a "menu" hugging the top left hand corner of the browser, a "footer/heading" sitting at the bottom right (both with a slight margin from the edges of the browser window). Then once completed I will add a central area for the main content.

* Can I do this with the Stage.align coding and using "listeners?"
* Is there a particular stage size that works best for designing a site/layout like this?
* What I have attempted so far, is it actually resizing to the browser size at all?

Can anybody please help, I've asked around on a few other forums and as I said looked at tutorials but I can't seem to apply the coding to achieve the results that I want!

Thankyou in advance!

(I will post a link to what I have so far.. I just need to make a few amendments)

Animate MCs
I have a profile of a person, separated into three MCs. The chest is one, the thigh is the second, and the calf is the third.

I need to attach these movies, so if I change the angle of the calf or thigh, the chest will come along for the ride. It will maintain the original connection to the second MC.

I think it's possible, but I can't get out of this box to figure out the answer. Please HELP!!

Thanks in advance.
Samac

How Do YOU Animate?
lets say youre gonna animate somethin in a button when mouse rolls over...

*do you make an MC and move it, with motion tween?
......................or
*You make a movie clip and say x=somthin and on rollover x=somethin else with actionscripts??

..thanx

if you use actionscripts, were can i learn the basics of moving an MC on X and Y...really simple?

How Can I Animate This?
Check out this image I made,

I want to make a preloader out of it. It's made in photoshop and the shadow is a simple drop shadow of the main image. What I want to do is turn this into a preloader so that the shadow spins round behind the main image. how can i do this? I have never made a preloader and have no main content to link to its the animation i need at the moment if anyone can help I will be very pleased because im very stuck at the moment.

Cheer

Studentmonster

Animate Several Swf's Together
this was the easiest way to do it that i could think (i am a beginner)... for an intro to my site i am making i have animated several 500 frame long 60fps swf movies, very simple. I was wanting these to be each like separate layers in a finalyl animation in which each of these swf's are playing, in different levels of transparency. when i start a new project and do import to library on one of these swf's, it takes 30 seconds to load, and then in the library is 500 bitmaps, one for every frame of the swf, and it is impossible to work with. each swf is about 1.5 megs. (the last step im going to do is compression..) what i want basically is a finished flash animation that i can export the movie of without an of the project data, just a standalone movie that i can then fade in and out in another flash project... how can i do this? please?

How Do They Animate....?
I am working on a site for a client, (my future company) & am wondering how those out there animate their backrounds in their sites? For example:

http://www.24-7media.de/
Notice the girls eyes...

http://www.juxtinteractive.com/
Notice company name...

http://www.24-7media.de/zts/
Notice butterfly...

http://www.9gods.com/v04/
Notice backround

Any thoughts would be greatly appreciated. I do understand Flash, but am just wondering how you would execute such animations. MC, external swf with transparent BG,ect... Thanks.

pk

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