ActionScript 3.0 :: Move Bitmaps Into Usable Objects On The Stage?
Jun 29, 2009got past the last problem i had. now i have a series of bitmaps stored in an array... actual bitmap data, not external image references..
View 1 Repliesgot past the last problem i had. now i have a series of bitmaps stored in an array... actual bitmap data, not external image references..
View 1 RepliesI wonder if there is away to move all objects currently on the stage at the same time without addressing each of them and regardless what obects which are on the Stage. Something along with Stage.y=-50 I know this wont work but is there a way?
View 6 RepliesHere is my code:
function createEnemy(event:TimerEvent):void {
var enemyAppear = new MovieClip;
enemyAppear = new Enemy();
enemyAppear.x = Math.random()*stage.stageWidth;
enemyAppear.y = 285;
[Code] .....
What I am trying to do is spawn a enemy to stage and when it appears on the stage I would like it to move across the stage a certain distance.
Visual Example:
O = enemy, X = original position, Y = new position
O (Spawns @ Location X) X ---------------------------------------------------------> Y
( Moved from location X to Location Y)
I've written a bit of code that will allow users to move objects around the stage and detect if one has hit another. The problem is that it only works for a limited number of objects. how to rewrite the code so that it works with an unlimited number of objects?
View 4 RepliesI have a jpeg that I have exported to actionscript via the library. The jpeg class is "adcouncil". If I want to add it to the stage I would use the following code:
Code:
var adcouncil = new adcouncil1(150,150);
var myImage:Bitmap = new Bitmap(adcouncil)
printMC.addChild(myImage);
The problem is that I want to ad these Bitmaps to the stage dynamically. My first instinct is:
Code:
var adcouncil = new this["adcouncil1"](150,150);
var myImage:Bitmap = new Bitmap(adcouncil)
printMC.addChild(myImage);
[Code].....
I'm trying to figure out the best way to compare a single bitmap against perhaps an array of saved bitmaps to see how close of a match it may be to any one of the bitmaps stored in the array. Right now I'm running a for loop that uses the bitmapData.compare() method to try to compare to see how much of a variance there is but... to be honest I'm at a loss as to how to use the resulting data to do so. Does anyone know of any good method to accomplish what I am trying to do? Forget looking at my code it's a waste of time because simply, it's not working.
View 4 Repliesanyone know how to move objects slower then other objects in flash cs3?
View 3 RepliesI know this is very noob, but I need a simple AS move and loop. Move an object across the stage and once out of site, loop and start over again? It needs to be a slow and endless loop.
View 3 RepliesHow do you make a movieclip move horizontally from the start of the stage to 3/4 of the stage. Stage size is 700 px by 600 px i want just one row in the middle of the stage. i want that movieclip to disappear right after it reach the end of the 3/4 mark.
View 1 Repliesfigure out why the movie i just made is off stage. I just I don't want to start from scratch or move every object that is off stage onto stage. What did i do to get it here to begin with???
View 1 RepliesI have drawn colored rods which I have placed in the library and have put one of each on the stage with instance names likeblueRod_mc, etc.I place them around with time-line code like
blueRod_mc.x = 300.0;I have now created an Actionscript class called Problem.I build a new object from Problem which I have called Riddle.But when I put blueRod_mc.x = 300.0 in a method (of Problem),I get the message that blueRod is not accessible.So I triedstage.blueRod_mc.x = 300.0;That did not work either.
I'm writing a web based flash app that's written entirely in AS3. I have objects on the screen as part of a GUI. I would like the user to be able to resize the window, or make it full screen. I would like everything to auto-scale with the resize, but also remain in the same relative position on the stage.
View 1 RepliesIs it possible to link up x y coordinates of two objects so that if there is a startdrag on one, when it is dragged the other will move with it?
View 8 RepliesI have homework for my programming lessons. My task is to create balloon shooter game. I done everything in my way, balloons are spawning, counter works. But i cant make them move upwards, i know how to move = y++. That is my problem, i cant figure out where and how. Code below:
import flash.events.MouseEvent;
import flash.events.Event;
var c = 0;
circle.addEventListener(MouseEvent.MOUSE_DOWN, handlerMouseDown);
[code]....
I am making a menu that consists of 6 different rollover buttons, these3 buttons sit on a path where the graphics look like a road. What I need to do is have an mc of a car that moves along the road. When the car is at button 1, and you mouseover button 2, the car moves towards button 2, then when you mouseover button 3, the car moves towards button 3 etc., all while the car stays on the road (path) that it sits on - so not like a mouse follow but constrained to the path. I also need the car to go in reverse, so if the car is at button 4, and you mouseover button 3, the car will move towards it.
View 3 RepliesI've seen couple of websites [URL]...in these websites the text & the objects move with the mouse moves. I just wanna know how to move the objects with mouse movement or you can say how to make an object follow the mouse (left-right-up-down)
P.S. In the 2nd website there's a 3d character also which I don't have in my project so there's nothing to worry about 3d in flash. I've just couple of images & text
I am making a menu that consists of 6 different rollover buttons, these3 buttons sit on a path where the graphics look like a road.What I need to do is have an mc of a car that moves along the road.
When the car is at button 1, and you mouseover button 2, the car moves towards button 2, then when you mouseover button 3, the car moves towards button 3 etc... all while the car stays on the road (path) that it sits on - so not like a mouse follow but constrained to the path...I also need the car to go in reverse, so if the car is at button 4, and you mouseover button 3, the car will move towards it.
I'm trying to understand Array and For Loops and they started to make sense. I have this code that generates 100 drops and moves them down but I would like to populate more and more move them down and delete them after crossing the stage (Y direction)..
[AS]var rainDropArray = new Array();
for(var i:int=0; i<100; i++) {
var rainDrop:RainDrop = new RainDrop();
rainDrop.x = Math.random() * 550;
[Code].....
my hero moves around the screen but I need to get the "scores" to move with him here is the swf you can actually see how he runs past the "score txt"
[URL]
and here is the fla
[URL]
I have a main menu box that contains navigation buttons.This box can be dragged anywhere on the screen. If i want a button to move that box to a certain x and y point, no matter where it is at anytime
View 13 RepliesI need to make a tool (in flash) that people who do NOT have flash can use to create some artwork (graphs and lines at particular angels in particular) and then export the artwork in a format that designers who DO have flash can use in flash for animations. We're trying to cut out a step where our content folks give our designers graphs that need to be hand traced in Flash. Are there any third party plugins that would allow a swf to generate and EPS, AI, or FLA perhaps?
View 1 RepliesOn the main time line I've got movie clip called Z and also n the main timeline I've got another movie clip called B. Inside B I've got a movie clip called C. My problem is - the actionscript written in C makes few objects in the main timeline function (changing colors, displaying notes, input text linked with dynamic text, etc...). I need to move all those objects in to ONE MC in the main timeline (changing colors, displaying notes, input text linked with dynamic text, etc...). But when I move it in to a single MC it wont function! simply the actionscripts won't work!! What should I do to make all those objects in to one mc and still make the actionscript written in C work? p.s. - I've used the _root. command in C.
View 2 RepliesHow to make the objects in your flash move without tweening? example, I have 2 retangles and I want the 1st rectangle to move left and bounce at the edge of the scene. And the 2nd rectangle move to the same direction but not the same speed.
Rectangles are: rectangle1 and rectangle2
How do I start to program with 3 objects on my page:
"logo_mc", "menu_mc" and "container_mc".
I'd like to put them on correct order when the stages grow (it depends of wich user's screen).
But how does it work? With 3 objects, I mean resize logo, the container and the menu..
i want to make 3 objects move in a square pathi tried to use guide layers but it didn't work good for both three objectsonly the first object followed the exact pathis there some other way to do it??
View 6 Replieshow i can make objects move with random speed.i have 3 objects but their speed is handeled by the timeline how i can make them move with random speed
View 4 RepliesAlright so... I really don't know the best way to approach this. I had a LOT of code that I thought could be generalized into a function. I don't know how to explian it... here is the code:i attached it...I know it's a lot of code... I just... I don't know what to do with it anymore! When it was in a bunch of small functions, it worked (sort of) just seemed reallly messy and annoyed me.Oh btw its causing the hero to jsut go to 0,0 and then a hit symbol appears there, and then nothing happens, the hit doesnt even dissappear.
View 7 RepliesSo here I have a code which gives a feedback after the code is copied to clipboard ,but after someone use it once it stop working.
[Code]...
How do I turn a value into something i can use without the "-" negative value if there is one.
I have an "imageLoaderHost" movieclip and I need it's x position to be usable wherever its at. for instance:
if imageLoaderHost is at -1258(x position), I need "b1" to go to 1258 (without the "-" as you can see).
URL...Not too sure how to name this issue so its hard for me to search for such a tutorial..
View 1 Replies