ActionScript 3.0 :: Moving Multiple Moviclips At Once ?
Sep 3, 2009
I'm trying to alter the registration point of a movieclip that has multiple movieclips within it.
I've entered edit mode of the movieclip using the 'to Stage' alignment option and am trying to align all the display objects within the movieclip at once. I've packed all the objects into a group and am trying to align the left most edge of the group to the registration point.
My problem is that every object's left edge is snapping to the registration point, not just the left most edge of the group.
I thought the whole purpose of grouping objects together was so you could move them as though they are one object.
View 1 Replies
Similar Posts:
Jun 11, 2010
i need to apply one function to multiple moviclips. the problem is that every mc has different behavior. for example:
movie clip A need to change it position when condition is "true" to point 50, 250.
movie clip B need to change it position when condition is "true" too but to point 75, 100.
is there anyway to define different parameters to the function according to the movieclip name?
View 3 Replies
Apr 26, 2010
i started learning ActionScript3 and now i´ve got a problem: I want to start moviclips one by one on the same stage. For example: mc_A plays and in the end it starts the mc_B to play. than mc_B plays and starts in the end the mc_C .... other idea: the moviclips start at different times with a timer?
View 1 Replies
Jan 4, 2011
i hv create 20 thumbnails and i hv stored in array when i trace allMC arry(while run through for loop) then i can see all thumbnail objects in it, now i m try to add event dynamically in all movieclips.. but showing error1119: Access of possibly undefined property thumbEvent through a reference with static type String.
for(var i:Number=0;i<20;i++)
{
allMC[i].addEventListener(MouseEvent.CLICK,thumbEvent)
[code].....
View 2 Replies
Oct 2, 2009
im trying to create a button, in which when highlighted should bring up options relating to that specific scene. I cannot seem to get it working, because whenever I highlight the options movie clip, it play the animation which hold the buttons, but as soon as my mouse moves over to click the buttons it disappear.I have attached an example .fla file.
P.S. If what i said above is confusing, then basically my problem is that when i select the options movie clip, it brings up another box, with the options. But i cannot move my mouse into the box with the options because it disappears when my mouse enters the box area.
View 1 Replies
Oct 2, 2009
im trying to create a button, in which when highlighted should bring up options relating to that specific scene. I cannot seem to get it working, because whenever I highlight the options movie clip, it play the animation which hold the buttons, but as soon as my mouse moves over to click the buttons it disappear.
P.S. If what i said above is confusing, then basically my problem is that when i select the options movie clip, it brings up another box, with the options. But i cannot move my mouse into the box with the options because it disappears when my mouse enters the box area.
View 3 Replies
Mar 15, 2011
I try to get acces a property by click on a dynamic created Moviclip.
function finishLoading(evt : Event):void {
// Handle XML Settings
XML.ignoreComments=true;
[code]....
View 1 Replies
Jun 12, 2010
I'm new to Flash and just started working on an animated short. In one of the sequences, I realized too late that an object was too far left in the frame and needed to be moved back. Is there a way to do that in all of the keyframes at once rather than doing it one at a time? The thing that needs to be moved is a .png file, not a symbol.
View 1 Replies
Aug 13, 2009
I purchased a flash home page template that had menu buttons at the top that I decided not to use. I removed the buttons, but now there is a 125 pixel blank horixontal space at the top of the stage. I tried resizing the horizontal size of the stage hoping the artwork would move up and eliminate the blank area, but the stage sizes from the bottom up. The layers get cutoff at the bottom and the blank space is still at the top.
The movie is quite complex with many layers and 450+ frames. Have attached the swf file to illustrate how the top of the stage is empty after I removed the menu buttons. Is there any way to get all of the layers to move up by 125 pixels so that they fill in the blank space without having to do each layer one at a time?
View 2 Replies
Nov 18, 2009
Is there a way to do this? I am just now hearing of (and experiencing) all the downfalls of using scenes to create an interactive website. I may have to start the whole thing over at the mid point if there isn't a way to convert it into one It will save a week's worth of work!
View 1 Replies
Jan 31, 2010
I'm working on a simple top-down zombie shooter to teach me better AS3 practices. There's one player, can shoot multiple bullets, and a certain number of zombies on screen at once, that increment by one when all of the previous ones are dead.
So, I have everything working great except for one thing: even though I'm spawning multiple bullets, and they go in the correct direction at the right speed, only one moves at a time.
Here's the code for spawning bullets:
Code:
// shoot - check to see if the gun can shoot, then shoot it
private function shoot():void
{
[code]....
I have a similarly structured pair of functions for the zombies, and they chase after the player just fine. If I trace a bullet's name when it collides with a zombie, it always returns 0. I've tried changing the number of bullets that can be spawned, but it remains the same.
Also, the moveBullets function is called from gameLoop(), which is itself called from an event listener for ENTER_FRAME. The movePlayer and moveZombies functions I have are also called from gameLoop.
View 6 Replies
Apr 1, 2010
I have a simple game going now with a character running forward and I have to jump and duck under barriers. I was able to make it all work so that one of my three random barriers I made comes at a random time at you. However, I don't know how to make it so that multiple barriers come at you. I feel I need some sort of loop. How should I alter the code I have already? This is on one of the barrier moveclips, the first part sets the platform and position to come at you and the second part moves that part towards you. P.s. this is in cs4.
[Code]...
View 0 Replies
Dec 7, 2004
Making a random motion "node Nav" where the square nodes attach by a line to another square. I have the first one made and working good so now i need to add the others and I would like to do this without 'onEnter'
[Code]...
but I am stuck 'cause I cant access the movieclips ._x and ._y positions in the same manner (makes me think the method for attaching the movie is not the best route)
[Code]...
View 2 Replies
Jul 19, 2007
I am trying create to move objects (boxes, named box_1, box_2 etc) to positions on the stage (xPos_1, xPos_2 etc) using onEnterFrames. I can make all the boxes move individually, but I cant get them to move together. I am using the following code in an attempt to move 3 boxes.
[Code]....
View 2 Replies
Dec 7, 2004
Making a random motion "node Nav" where the square nodes attach by a line to another square.I have the first one made and working good so now i need to add the others and I would like to do this without 'onEnter' i have:
this.attachMovie("squareNode", sNode, this.getNextHighestDepth());
i know i can attach as many as i want by looping:
this.attachMovie("squareNode", "sNode"+x, this.getNextHighestDepth()); x++
but I am stuck 'cause I cant access the movieclips ._x and ._y positions in the same manner (makes me think the method for attaching the movie is not the best route)
View 1 Replies
Mar 31, 2010
So I have a simple game going now with a character running forward and I have to jump and duck under barriers. I was able to make it all work so that one of my three random barriers I made comes at a random time at you. However, I don't know how to make it so that multiple barriers come at you. I feel I need some sort of loop. How should I alter the code I have already? This is on one of the barrier moveclips, the first part sets the platform and position to come at you and the second part moves that part towards you. P.s. this is in cs4.
[Code]...
View 1 Replies
Apr 5, 2005
I have a movieclip on the scene. I also have a button on the scene and when I press the button I want to send a variable-value to the movieclip. I have a variable set in the actual frame on the main-timeline but the movieclip doesn't catch that, when traced I get undefined. Can I send a value from the main-timeline to a moviclips timeline?
View 3 Replies
Apr 5, 2005
I have a movieclip on the scene. I also have a button on the scene and when I press the button I want to send a variable-value to the movieclip. I have a variable set in the actual frame on the main-timeline but the movieclip doesn�t catch that, when traced I get undefined. Can I send a value from the main-timeline to a moviclips timeline?
View 3 Replies
Nov 2, 2010
im currently making an "AS3 beat em up" ala streets of rage or double dragon.Currently i have my character moving and a few animations done and i am trying to figure out how to make attacks work.I have some "basic" animation for his attack, but im not sure how to get it to work correctley.What happens is, if you press control (the attack button) whilst the character is walking he just keeps moving and is stopped on the attack frame.I want the character to stop moving if the attack is pressed and once it is released start moving again.
hero.gotoAndStop('still');
var left:Boolean = false;
var right:Boolean = false;[code].......
View 2 Replies
Jan 30, 2012
what i have is a tween on a movie clip of a popcorn kernel on one layer and a tween on a button on another layer to follow the movie clip. i want to be able to roll over the kernel and make it "pop". i changed my over on the button to popped corn (this works) but i want it to stay popped for the rest of the tween.
View 11 Replies
Apr 22, 2007
I want to know how i can moving my scene by moving a mouse over them.
to understand what i want exactly ckeck this link :- [URL]
View 1 Replies
Nov 28, 2010
I have some simple script that has 2 "movie clips". What I want to do is to start moving the second movie clip at the same time when the 1st starts moving. (both start moving at the same time) I tried the following script but it never works:
[Code]...
View 3 Replies
Sep 21, 2010
I have a problem when making flash applications with more than one frame that has symbols placed on it in that I can't declare all of the event listeners for the objects at the same time and I have found that even if I put them all on the first frame, add the event listeners, then click through to the next frame then the buttons won't work on that frame.
Does anyone have any idea how I could solve this? I did consider myself a fairly competent AS3 programmer until I realised I had no idea how to handle this sort of thing. Solved: I initialised the clips from my external class and then addChild'd and removeChild'd them as I needed to and placed their x and y on addChilding.
View 2 Replies
Aug 12, 2009
i have an if statement, an object will go to a new frame if multiple buttons are pressed
PHP Code:[code].....
now i want it so that if one condition is met the mc will goto frame 2, if 2 conditions are met, frame 3 and if 3 conditions are met, frame 4.i know i could do this with a lot of if statements but i have a lot of movie clips to use this code on, so is there any way to write an if statement that will trigger different options if multiple conditions are met?
View 4 Replies
Feb 9, 2011
This is more of a database design issue but almost everybody here uses database integration with their apps so I feel it is important. I am integrating AS3 + mysql + php and need to clear up the database design for multiple students results in various activities. Developing an online e-learning course with a "dashboard" or teacher control panel with all kids results in each activity. I have read the database design rules by Codd etc... understand the need for parent and child tables so information is relational and not duplicated etc... BUT I am not sure how to design the results part. Various students do various lessons with 10 activities which each give a mark out of ten. The table would be updating every few seconds as 10,000 users would be online at the same time
1. Would I create a results table with all the students results going in the same table ie: Tom would be the first row
[Code]....
View 5 Replies
May 24, 2010
i use loadmovie() to load youtube videos inside my flash website but when i load another video the old one doesn't stop, so i tried unloadmovie to destroy it but it seems that i did a mistake in my code
This is how the code looks to stop the old one an load the new:
vloader.unloadMovie();
vloader.loadMovie("http://www.youtube.com/v/Alw5hs0chj0&hl=fr&fs=1hJ-mPcGtC");
How to do that? use other objects or classes, i only want to edit that code.
Note: I have an empty MOVIE CLIP called "vloader" where i load the video player.
View 2 Replies
Feb 5, 2012
[Code].....
I have a group of 16 images that I would like to load 1 of each into each movieclip. I want image1 to be inside of visual1, image 2 inside of visual2, and so on. the images are named like, 1960s_(1).png where the 1960 (year) part is coming from the rangeNum variable. The above gives me this error: 1061: Call to a possibly undefined method addChild through a reference with static type int.
View 4 Replies
May 3, 2011
I'm Trying to develop a small game where the user chooses from a range of boxes of the left of screen and can drag 3 of them separatley to 3 holding boxes on ther right. each box can be dragged to any location and the order is not important. Once the 3 holding boxes are all full I want a new button to appear. I completed a tutorial and I've got one box working perfectly but no matter what i try I can't get it working with multiple boxes and locations. Below is a list of the instance names of the movie clips plus my actionscript. I've attached a link to the flash file.
[URL]
INSTANCE NAMES
box 1 = "circle_mc"
box 2 = "circle_mc2"
both the grey boxes are called = "targetCircle"
[Code].....
View 6 Replies
Apr 11, 2011
I want a chart that has several separate series running in rows across. They are largely separate charts and should not overlap, but all share the same horizontal datetimeaxis. They don't share the same y-axis, however and that's where I'm getting stuck.I have tried having a linechart series and then a plotchart series, but it will only allow a single <mx:series> per chart without having them inside the same series which as far as I can tell will place the charts on top of each other in the z-axis. I can stack them and have them completely separate charts, but it was proving to be somewhat irritating having them align correctly.
Is there any reasonable way of combining multiple charts into one like this? Basically having rows in a table where each row is a different chart but the columns are consistent. or am I going to be best served just by stacking separate ones? an illustration of what i'm going for is here: http:[url]........
View 1 Replies
Sep 10, 2009
im creating a small drag and drop game in AS3-
I have 4 objects and 4 targets,
I want to be able to drag any of the 4 objects onto any of the targets, right now all I can manage is to allow each object drop onto one specific target only.
I thought by calling all my target names by the same instance name eg target_mc that would work but only one target will ever work.
View 8 Replies