Moving Across The Stage
What is a simple code to have a movie clip move from one side of the stage to the other?
I would love it if you could show me how to have more than one of the same MC on the screen at the same time, at different speeds, different sizes, and going opposite ways as well.
Thanks.
P
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 05-01-2006, 07:41 PM
View Complete Forum Thread with Replies
Sponsored Links:
Moving The Stage After Resizing - Or Moving All Objects On The Stage? Heeeelp
Hello! I'm in dire need of help!
I've been forced to resize the stage of my movie but as the stage is expanded to the right and down everything ends up in the wrong place. So I wonder:
Is there any way to move the stage rather than the contents thereon?
or
is there a way to move all the content on all layers and even all scenes simultaneously?
or
is there a way to expand the stage equeally on all sides rather than just right and down?
THANKS ALOT TO WHOEVER COULD HELP ME!
Freddy D, Stockholm, Sweden
View Replies !
View Related
Moving Running Forward But Elements Moving Off Stage
I'm positive I've done it by the book. All symbols on the stage - one by one dragged them off the stage creating timelines - about 6 layers. Play the movie and all the elements start on the stage and move off. Just the way I wanted it but in reverse. Simple vertical and horizontal motions. My mistake must have been in the beginning somewhere - but where ?
View Replies !
View Related
Moving An Object Thats Off The Stage Onto The Stage
For a Flash class thats coming up we need to do a little game. Now my idea is to make a GTA 1 style game. We have the car movements down but what i'm having trouble with is making the car stay centered and moving objects that arnt currently onto the screen onto the screen. EG Car is in the center (Always stays in the center) Car moves forward, the background (Road, buildings etc...)Move down the screen and new objects apear on top the screen and move downwards or right, left upwards depending on the direction the car is moving. Any help would be greatly appericated.
View Replies !
View Related
Moving Outside The Stage - How?
I remember some ads from qwest and ford that were displayed on MSN a few times that had part of the clip running outside the stage. Anybody know how they did that?
I remember a banner moved down from the stage and displayed info on with the qwest ad.
And I want to use it on a navigation menu
but my site is built on asp.net
its not entirely flash
so i need to insert it on the aspx page
any idea? thanyou.
View Replies !
View Related
Moving The Stage.
I was wondering if it is possible to move the stage, rather than moving the animation. because moving the entire animation can be a little tedious...
stupid me, i created and animated menu, but i created it in the middle of an 800x600 stage... but now i need it in the top left hand corner so i can resize the stage perfectly around it for when i put it onto a page. or if the stage cannot be moved, is there a way to select everything in every frame to move it? thanks in advance
View Replies !
View Related
Moving The Stage
Hi Guys and Gals
I had a large document with a complex movie i created, but i have now "chopped" the movie in half (taking my contact details off).
I have resized the document stage, but this means my movie is now off the stage.
it is quite complex (quite!) so simply selecting all in the first frame and moving to 0.0 (and doing the same in the last frame) is causing major problems. when played... it tweens off the stage then moves back on.
Is there an easy way to move the stage (or my movie) so they line up?
Thanks in advance...... i hope!!
View Replies !
View Related
AS 2 Moving The Stage
Hey, am new here and kinda a beginner in flash. I am currently working on a game in which there is a map that is bigger tan the stage size. In the game there is a car which is controlled by the user. The problem is I need the map to move when the car reaches the end of the stage. The map is a move clip. Could someone please help me?
View Replies !
View Related
Moving The Stage
I want to make a 2D platform game like mario, how should i move the scenario? Can i move the stage like a camera or i'll have to move any sprite of the level scenario?
I would prefer to move the stage and make it act like a camera.
View Replies !
View Related
Stage Keeps Moving
when my playhead reaches the end of Scene 2, the script tells the player to go and play Scene 3 frame one. However when it does the stage and objects moves to the top left hand corner of the player? I have no idea whats causing it as all my objects have been proberly aligned and play fine within the flash editors? its really crazy, has anybody else experienced this?
View Replies !
View Related
Moving The Stage?
ok so I have reached the end of my movie and I realize that there is one element left which will not fit on the stage. Now due to my initial miscalculation, I have increased the width of the stage but I notice that it seems to add more stage pixels onto the right side of the stage. In other words, the center does not remain the center (the stage size does not increase uniformly in both directions). To now go back and adjust everything in the movie would be an unbelievable pain.
So is there an easy way to just move the stage, so that the previous center before the size increase becomes the center again?
View Replies !
View Related
Moving Everything On Stage?
Hi guys,
I just made a full flash site which appears to be quite large so i need to add preloader. My problem is that my whole site is divided in layers an all it's content is on the first frame only so i need to move that content (movie clips, dynamic text, graphic shapes etc...) to the third frame so that i can have my first two frames free for building preloader. However, i tried to move the content using "Edit multiple frames" option selecting all my layers and dragging them to third frame. It appears that my all content is moved to third frame but when i test my movie it seem's that the content is looping (screen flickers) so i don't know what's the problem and how to solve this? Than i tried this same thing with a basic shape in a new flash document and the same thing happens so i am probably doing something wrong? Unfortunately, i can't post the fla because it's too big for my current connection (26.4 Kbps :cry: ) but i guess someone will know how to solve this thing and i thank you in advance.
View Replies !
View Related
Moving Everything In The Stage
I have some problems when i want to move all those things i have in a stage, including components, grahs, guide lines and masks.
The problem is that if i just try selecting everything and moving it for example to get it centered on the screen, some things move and others don't. The masks for example don't move. And those things that move are just from some frames, the other frames don't...
One possible option might be creating a MC containg the whole thing and moving that, but i'm sure you guys know a better way..
Thanxs :!:
View Replies !
View Related
Moving Objects On The Stage Help
Hello,
What I am trying to do is;
Assume there are 5 playing cards on the stage spread out evenly across the stage, and what I want to do is, when you move the mouse of each card (should I make them a button or movie instance?), the card will move to center of stage and go from about 20% of its size to 100% by the time it is in center screen. But this will have text on it, so at 20% you can't read it until it gets to center and is at 100%. Is this actionscript? I am not familiar with that other than gotoAndStop and so forth.
Ok, yes I am new to Flash MX, but I am learning more everyday from all of you, so can anyone please help me?
Thank you
Thorrax
View Replies !
View Related
Moving All Aobjects On Stage At Once?
i have a movie, where everything in it is positioned inside a rectangle.
I changed the stage dimensions so i would not get a scroll bar when i viewed the published HTML file.
But now, my rectagle and everything in it is positioned low on my stage (it was centred).
Is there a way i can move everything in my movie up, so that they are centred again? Or can I crop off just the top part of the stage?
The only way i can figure how to fix it is to go into each individual frame, select everything, then move them, but this will be a major headache, since i have over 300 frames.
THANKS!
View Replies !
View Related
MC Won't Stop Moving Across The Stage
My function's working great now, except I can't get my mc to stop once it starts moving! In the fxn, the point clicked moves in a tween-like motion to the center of the stage and is supposed to stop, but it keeps going. Could someone let me know what's worded wrong in this script? Here it is:
code:
//Moves MC to center of stage using pseudotween
function stageCenter(mc, speed) {
mc.onMouseDown = function() {
if (this.hitTest (_root._xmouse, _root._ymouse, true)) {
myPt = new object();
myPt.x = this._xmouse;
myPt.y = this._ymouse;
this.localToGlobal(myPt);
var distX = (((Stage.width)/2) - myPt.x);
var distY = (((Stage.height)/2) - myPt.y);
var distTot = (Math.sqrt(Math.pow(distX, 2) + Math.pow(distY, 2)));
var angle = (Math.atan2(distY, distX));
}
_root.onEnterFrame = function() {
if((distTot > 0)) {
mc._x += (speed * Math.cos(angle));
mc._y += (speed * Math.sin(angle));
} else if ((distTot < 0)) {
mc._x -= (speed * Math.cos(angle));
mc._y -= (speed * Math.sin(angle));
} else if ((distTot = 0)) {
mc._x += 0;
mc._y += 0;
}
}
}
}
TIA,
aaroneousmonk
View Replies !
View Related
Moving A Movieclip Across The Stage
The script below moves a movie clip from the bottom to the top of the screen:
onClipEvent(load) {
// these values are initialised when this movieclip first loads
//maxY is the position at which we want to reset the _y position of the movieclip
maxY = 0;
//startY is set to the initial position of the movieclip
startY = this._y;
}
//the following script runs all the time (Ie: every frame even if the movie is stopped)
onClipEvent(enterframe) {
if (this._y >= maxY) {
// if the Y position of the movieclip is greater than the maximum required position
// then we move the movieclip by adding the value of 'speed' divided by our constant
// (we need to divide by a constant otherwise it will be too fast!
this._y -= _root.speed/_root.constant;
} else {
// when the movieclip reaches the max desired position we reset the Y pos to the initial value
this._y = startY;
}
}
I would like to move this movie clip from the bottom right corner to the left, then from the bottom to the top, and finally from the top left to the right corner all in one continous movement.
Can anybody help me please?
View Replies !
View Related
How To Create This Moving Stage
i have seen this site http://www.redbullcreativitycontest.be/ and wondered how you create a scrolling stage like this and also how to achieve what the menu does as well, can anyone help me please with any advice or examples thankyou....
View Replies !
View Related
[Flash 8] Moving The Stage Possible?
Hi,
Simplified version: Is there a way to move the stage?
Long version:
I'm working on a vertical scrolling game for a class. It's actually pretty much done (and due soon), so I don't have a lot of time left to work on it, but I do still have a few things to fix and tune. Essentially, we have a tall image that serves as our background, with only a small amount visible at a time. I could only think of 2 ways to achieve this:
1. The stage moves when appropriate, and all other non-stationary objects move independently.
2. The stage doesn't move, but instead the background image and everything other than the main character move in the direction opposite to that which the stage would otherwise move.
Now, I think the first option would have been ideal. However, when starting to work on this game, I couldn't find any way to actually move the screen. I googled, I searched on here, and I asked a couple of people who had some (minimal) experience with Flash and Action Script. So I ended up using the second method. It works, but it is a bit sluggish. I couldn't imagine how slow it would be if the levels were twice as long or there were twice as many objects!
So, I wish I'd asked this here much earlier, but is there a way to move the stage? It will probably require me to redo quite a few things and is not a make/break thing, so this will be low on my priority list, but I would really like to know for future reference.
Oh, and a second question. Is there a way that I can preventing the image of a movieclip from actually rendering (not sure if this is the right terminology)? That is, I want the object to always exist and the object's variables to consistently be accessible (including _x and _y), but when it's not visible (off the stage), there's no point in the object's image actually being there. I imagine I could make things more efficient by doing this. This one I haven't really looked into, but I figured I should ask while I'm posting the other question.
Thanks in advance!
View Replies !
View Related
Moving A Movieclip Across Stage
Ok I have tried for a month searching the internet for a script that I can adjust. What I am trying to do is build a nav bar similar to www.rbk.com.
PLEASE HELP! I can get the vertical bar to move with the mouse but I can not get it to stop at the button locations.
Here is the script I was using on the scene:
var Grn_follow = _root.Grn_follow_mc;
var speed = 15;
Grn_follow.onEnterFrame = function() {
//get the mouse position
var xMouse = _root._xmouse;
//get the distance between x
var xDistance = this._x - xMouse;
//now move the object
Grn_follow._x = this._x - (xDistance / speed);
};
And this was on the vertical bar:
onClipEvent (mouseMove) {
this._xmouse;
}
Or the other way I have it in actionscript is just thru the buttons...but I can not get the smooth transition from button to button that the above script gives me.
Ie:
on (rollOver) {
setProperty(this.Grn_follow_mc, _x, 10);
}
Am I doing something wrong? This maybe stupid easy for an expert but I am still learning. Blood sweat and tears my friends. Thanks again for any help!!!
Thanks,
Leo
PS forgot to tell you I am using flash 8.
View Replies !
View Related
Moving Objects On Stage
I recently was asked to make sort of a slideshow, not a problem.
My question is, since there were 100 objects at once to be moved at the same time in the same direction, is there a simpiler way to make everything move at once instead of making them all move one at a time?
View Replies !
View Related
Moving Image On Stage
ok i have a site and i have a button for members and i want to make it so when i click the button a image that i have on the stage slide in to the scene with all the members. is that possible. if so can anyone help me? thanks
View Replies !
View Related
Moving MCs Across Stage Randomly..
I have a Media clip of a bird that I want to often fly across the screen but not just simply fly, I want action script to choose a random scale so it appears as if one is further than the other. How would I do thi? Anyone know?
I thought of what I meant...Just like a star field kind of effect except Im just going to replace the star with a bird.
View Replies !
View Related
Moving Things Around On The Stage
I'd be very grateful for some help with this, please. I'm using Flash 8 Professional and AS2.0. I'm trying to write a function that reads the contents of labels I have off the stage and reorganise the elements on the stage according to what is in them. The labels are being filled by an external xml file.
The code currently looks like this and doesn't work:
Attach Code
//*******************************
// Check for image and if empty move the media buttons over
//*******************************
function imageCheck() {
if (this.image_lb.text == "empty") {
trace("hello + del image");
this.image01._visible = false;
this.caption_lb._visible = false;
//move media buttons over
this.video_btn._x = 290;
this.video_btn._y = 288;
this.audio_btn._x = 290;
this.audio_btn._y = 324;
}
}
imageCheck();
View Replies !
View Related
Moving An Object In The Stage
Any help on this would be greatly appreciated. I have an object that is serving as a background for a flash website. The background object (a table) moves and rotates around when clicked, exposing different parts of the table on the stage when the user clicks.
Here is as close an example as I can find:
http://www.vermeersch.ca/
My problem is when i want to transition between two points on the table, the table has to rotate and move.. and by just using a motion tween between the two points results in the table rotating off the stage for a few frames (thus exposing the background and making it look really cheezy). I was trying my hand at using motion guides, but can't do it with any accuracy.
So, my question is: Is there a way to guide an object as it rotates and moves so that it doesn't move off screen? (there is plenty of room on the table if i can just guide its path through the 2 second transition). Thanks for any support.
View Replies !
View Related
How To Create A Moving Stage
i have seen this website http://www.redbullcreativitycontest.be/ and i want to create the same kind moving stage and menu, just dont know where to begin can any of you help me please thankyou.
so i take it none of you can help me then :0(
View Replies !
View Related
Moving Xml-text On Stage Not Possible?
Hi, I encountered a wierd problem. Im buidling a site with all content centered in the middle of the screen (with a listener script wich automatialy moves the content if the browser window size is changed by the user)
In the site i have a newsscroller wich contains an externally loaded xml-file.
Now to the problem; when i resize the browser, all the content BUT the scroller moves to the center of the screen like i want to except the xml-newsscroller, it flyes away somewhere off stage and dissapears
Whats the deal isn't it possible to dynamicaly move xml-text content on the stage in flash?
Best regards /Carl
View Replies !
View Related
How To Create A Moving Stage
i have seen this website http://www.redbullcreativitycontest.be/ and i want to create the same kind moving stage and menu, just dont know where to begin can any of you help me please thankyou.
so i take it none of you can help me then :0(
View Replies !
View Related
Stop Moving At The Side Of The Stage
I have a MC called "magnet".
This script is on the timeline:
if (Key.isDown(Key.LEFT)&& magnet._x >= 25 && magnet._x <= 775) {
this._x -= 20;
etc...
However, the MC locks as soon as it hits the end of the stage, I can't move it back. Why not?
Papermouse
View Replies !
View Related
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++);
}
};
View Replies !
View Related
Moving Multiple Items On The Stage
This is probably a dumb question, but here goes:
I need to dump the contents of all my nested mov clips to Scene1 as one flat animation. When I do, they are no longer in the right place on the stage.
- Is there a way to move multiple keyframes and tweens as a group to another point on the stage, without having to reposition every keyframe one at a time?
When I try selecting them all and grouping, it only moves what keyframes my timeline pointer is on. The rest are left to make unwanted crazy animations.
thanks for your help
View Replies !
View Related
Moving Entire Timeline/stage
Ok-
I know this is a dumb question, but I forget how to do it.
Let's say you have your movie all assembled on the stage, tweens, movie clips, buttons, actions, etc...
And you realize you need to move everything up and to the left 20px... how can you move everything? If you select all the layers, and move everything- everything moves- just up to the first keyframe.
I know I could copy all the frames and paste it into a MovieClip and position it that way, but I don't want to do it that way.
Thanks.
Joe
joe@joefreelance.com
View Replies !
View Related
Moving Movie Clips Across The Stage
Hello Im using flash mx.
Im trying to move a bunch of movie clips across the stage when the mouse rolls left and then rolls right. I want the movie clips to move left when the mouse moves right and vice-versa. With a bit of help I got this script but it doesnt seem to work the way I want it to. Is there a easier way of doing this ?
Script :
Frame 1:
Code:
//movie clip instance is number1
x1 = getProperty (number1,_x);
if (x1 < -50) {
setProperty("number1", _x, -50);
}
if (x1 > 50) {
setProperty("number1", _x, 50);
}
Frame2:
Code:
mpos = _xmouse;
x1 = getProperty (number1,_x);
speed = (mpos - 20) / 25;
setProperty("number1", _x, x1 - speed);
gotoAndPlay("loop");
A good example of what I want to do can be found here http://www.allamericanrejects.com/home.asp
View Replies !
View Related
[F8] Moving Stage With Mouse Movement
Hey guys trying to achieve the following effect for a map. Basically i want to try and get the map to move the opposite way to the map. Best example is shown at the link below.
Example ( Chromazone imaging )
It doesn't have to have the z index feel to it. Not really needed on a world map. But yeah if anyone knows of any tutorials or has any idea on how to do it and has the code to hand , i would really appreciate it.
I found the following tutorial on it
Tutorial
Im gona give this a go and see if it works otherwise if you have a better way of getting an effect like this, let me know.
Cheers for any help.
Keep it cool
View Replies !
View Related
Moving Images Smothly Across The Stage
I am trying to write a script that animates images, moving them smoothly and slowly across the stage. If I load the image in authoring time and embed it on a movie clip, i have no problem incrementing the x position by 0.25 for example. But if a load the image at runtime using a loader the image jumps from pixel to pixel. For some reason it seems that I am not able to turn the pixelSnapping off.
Here is the code:
Code:
var ldr:Loader = new Loader();
var testImg:Sprite = new Sprite();
var url:String = "test2.jpg";
var urlReq:URLRequest = new URLRequest(url);
ldr.contentLoaderInfo.addEventListener(Event.INIT, onInit);
ldr.load(urlReq);
function onInit(event:Event):void
{
trace("on init");
var smoothLoader:Loader = event.target.loader as Loader;
var smoothImage:Bitmap = smoothLoader.content as Bitmap;
smoothImage.smoothing = true;
smoothImage.pixelSnapping = PixelSnapping.NEVER;
testImg.addChild(smoothImage);
testImg.cacheAsBitmap = false;
addChild(testImg);
this.testImg.addEventListener(Event.ENTER_FRAME, moveImage);
}
function moveImage(event:Event):void{
testImg.x += 0.25;
}
Any ideas??????
thanks
View Replies !
View Related
Randomly Moving Movieclip On Stage
Hello everybody.
I am new to flash and I am here to get some help for my typing game. I have 5 movieclips and I want them to enter the stage from different directions. If they go out of the stage they should come in again from some other direction. Please help if anybody know how to do it.
Best Regards,
View Replies !
View Related
Moving Stage Items On Resize
Does anyone know how to reposition the stage items on resize like they do on
http://www.hellohikimori.com/
I know how to just move the items onResize, but I want to have the effect of waiting till the resizing has finished before the items move, and how the items bounce in using a Tween.
Any Suggestions.
View Replies !
View Related
Moving A Clip To Stage X 0, And Y 0 After Resize
i'm trying a get a clip to move to the stage x 0 and y 0 coordinates in a movie that scales to fit the browser window size. i have it set up right now as a motion tween but would like to know how to code the movement.
the animation and placement work fine until you change the size of the browser window, then it seems to the the coordinates off and the circles stop short of where they're supposed to go.
someone suggested that i could use localToGlobal, but i'm really new to actionscript and that doesn't help me much. i can
the page is here - http://www.oroborusmovement.com/resize.html
and the source file is here - http://www.oroborusmovement.com/flash/resize.fla
this is the code that someone suggested earlier -
var point:Object = {x:0,y:0}; //assuming your registration point is in the center of the circles.
circle_mc.globalToLocal(point); //circle_mc being the movie instance that you want to get your globalToLocal x and y.
circle_mc._x = point.x;
circle_mc._y = point.y;
how do i use that to move the circles using onPress or onRelease?
also, does anyone know of any tutorials on changing a dynamic scrollers skin? what's out there seems kinda cryptic..or maybe that's just me...
any help would be appreciated.
thanks!
View Replies !
View Related
Moving Images Smothly Across The Stage
I am trying to write a script that animates images, moving them smoothly and slowly across the stage. If I load the image in authoring time and embed it on a movie clip, i have no problem incrementing the x position by 0.25 for example. But if a load the image at runtime using a loader the image jumps from pixel to pixel. For some reason it seems that I am not able to turn the pixelSnapping off.
Here is the code:
ActionScript Code:
var ldr:Loader = new Loader();
var testImg:Sprite = new Sprite();
var url:String = "test2.jpg";
var urlReq:URLRequest = new URLRequest(url);
ldr.contentLoaderInfo.addEventListener(Event.INIT, onInit);
ldr.load(urlReq);
function onInit(event:Event):void
{
trace("on init");
var smoothLoader:Loader = event.target.loader as Loader;
var smoothImage:Bitmap = smoothLoader.content as Bitmap;
smoothImage.smoothing = true;
smoothImage.pixelSnapping = PixelSnapping.NEVER;
testImg.addChild(smoothImage);
testImg.cacheAsBitmap = false;
addChild(testImg);
this.testImg.addEventListener(Event.ENTER_FRAME, moveImage);
}
function moveImage(event:Event):void{
testImg.x += 0.25;
}
Any ideas??????
thanks
View Replies !
View Related
Moving Objects Past Stage
The answer seems like it's staring me in the face, but i just can't figure this out for my life. I'm trying to load an object off the stage giving it a negative x value, but it's not letting me move its x coordinate past 0. I am going nuts.
so i'm doing:
mc.x = -500;
And it loads it at x = 0. ARGH.
View Replies !
View Related
Problem Moving To Stage Clip
Hello i'm new using AS3 as well as programming so maybe i'm totally lost...
< I'm designing a website using flash and AS3 so i created 4 layers on Stage and the clip stops on frame 5 by action Stop() on this frame. Theres a Movieclip ( it has his own timeline starting on frame 1 and ending on frame 40) tthats the code i have on frame 40. ( I need it returns to frame 1 on stage).
-.................................................. .
stop()
function mainreturn(eventmouse:MouseEvent):void
{
********** < code to return ?
}
Close_btn.addEventListener(MouseEvent.CLICK,mainre turn);
-.................................................. ..............
i tried this and not working couse Stage is supposed to be a class and calling it needs to get a propety
Don't work:
Stage.play()
_root.gotoAndStop(1) (< may work on AS2 ?)
_parent.gotoAndStop(1)
What should i do?
View Replies !
View Related
Stage Moving With Gallery Script...
New to as3 but trying to learn...
I am using a center align stage script in the 1st frame of the movie.
I place the rest of the file into a main_mc file. In the main_mc file I have a gallery xml script. When I go to resize the window it throws the main_mc like a 1000 pixels to the left.
Thanks for any ideas...tim
Link: Click on the website link on the right side of the crazy nav. It looks like a curly bracket. When you get there try to resize your browser. It should throw the movie to the left. http://whelandesign.com/flash/gallery/as3_whelan3.html
Here is the center script:
Code:
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;
function resizeHandler(e:Event):void
{
mySampleMC.x = (mySampleMC.stage.stageWidth / 2) - (mySampleMC.width / 2);
mySampleMC.y = (mySampleMC.stage.stageHeight / 2) - (mySampleMC.height / 2);
//port1_mc.x = (port1_mc.stage.stageWidth / 2) - (port1_mc.width / 2);
//port1_mc.y = (port1_mc.stage.stageHeight / 2) - (port1_mc.height / 2);
}
// START CENTER IN WINDOW METHOD HERE
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.addEventListener(Event.RESIZE, resizeHandler);
stage.dispatchEvent(new Event(Event.RESIZE));
Here is the gallery code: It is really long so here is a link...
http://whelandesign.com/flash/gallery/gallery.txt
Thanks!
View Replies !
View Related
Moving Multiple Key Frames On Stage
Hi,
I've been using flash for a long time now but I've never found a solution to this bugging problem. I made a movie in flash with multiple keyframes (luckily only 20 or so). I then realised that the whole lot needed to move up and across. The way I did this was keyframe by keyframe, remembering how many arrow presses I needed and slaving my way through.
Is there a way to select everything, all keyframes etc and move the lot in one? Selecting each keyframe with CTRL held down doesn't achieve this
View Replies !
View Related
Moving The Xpos Of The Stage While Zooming In
hi,
what i would like to achieve is the stage moving to a postion were a button has been clicked smoothly while also zooming in on another movieclip in the z depth. I have already done it with movieclips centered but would like to make it more dynamic.
Does anyone have any links that could help me
I need help
Please help
View Replies !
View Related
Moving Images Smothly Across The Stage
I am trying to write a script that animates images, moving them smoothly and slowly across the stage. If I load the image in authoring time and embed it on a movie clip, i have no problem incrementing the x position by 0.25 for example. But if a load the image at runtime using a loader the image jumps from pixel to pixel. For some reason it seems that I am not able to turn the pixelSnapping off.
Code is bellow.
Any ideas??????
thanks
Attach Code
var ldr:Loader = new Loader();
var testImg:Sprite = new Sprite();
var url:String = "test2.jpg";
var urlReq:URLRequest = new URLRequest(url);
ldr.contentLoaderInfo.addEventListener(Event.INIT, onInit);
ldr.load(urlReq);
function onInit(event:Event):void
{
trace("on init");
var smoothLoader:Loader = event.target.loader as Loader;
var smoothImage:Bitmap = smoothLoader.content as Bitmap;
smoothImage.smoothing = true;
smoothImage.pixelSnapping = PixelSnapping.NEVER;
testImg.addChild(smoothImage);
testImg.cacheAsBitmap = false;
addChild(testImg);
this.testImg.addEventListener(Event.ENTER_FRAME, moveImage);
}
function moveImage(event:Event):void{
testImg.x += 0.25;
}
View Replies !
View Related
Moving Code From Class To Stage
I have this code in a class that retrieves todays date. How can I show the date in a textfield?
Or can I modify the code and just put it in my scene so I won't have to call the class?
Attach Code
package {
import flash.display.Sprite;
public class DateExample extends Sprite {
public function DateExample() {
var someBirthday:Date = new Date();
trace(someBirthday.getDate());
}
}
}
Edited: 11/17/2008 at 12:22:52 PM by lammspillning
View Replies !
View Related
Center A Moving Movie To Stage..
Im having a mental block, I have done this before, but I cant think how...
Im prototyping a quick flash golf game. I have a ball that bounces across the stage, fairly simple. I just need it so that the stage follows the ball's ._x value, so the ball is always in the center of the stage regardless of its ._y value.
Simple I know, I just cant remember how to do it...
View Replies !
View Related
Help: Moving Wide Movie Clips Across The Stage
Hi, Flash MX user here:
I'm working on a stage that is 700 X 400. I have a movie clip that exceeds the stage's width (it's 3000 pixels in width). I want to make my movie clip draggable, so that the entire clip is viewed on stage while moving horizontally from left to right.
I want to begin moving right when my mouse's X position is at 0 and I want it to move back left once it reaches -3000 on the stage.
This is the code I came up with so far, which I'm sure it has some mistakes. Any help would be more than appreciated.
PHP Code:
onClipEvent (enterFrame) {
if (_root.movieClip._x < 0) {
_root.movieClip._x = _x - 1;
}
if (_root.movieClip._x > -3000) {
_root.movieClip._x = _x + 1;
}
}
View Replies !
View Related
|