ActionScript 2.0 :: Using Multiple Variables To Point To A Movieclip?
May 27, 2011Code:
map = ["map"+currentMap];
area = ["area"+currentArea];
[code].....
Code:
map = ["map"+currentMap];
area = ["area"+currentArea];
[code].....
I just want to know if there is a way to assign multiple variables, and if there is a way to check multiple variables.
I want to be able to assign variables to false and then check if all the variables are false.
It's been a long time since I've done any work with actionscript, and alas I've forgotten nearly everything. I've tried to look for a tutorial that would explain basic animation with actionscript, but the one that I found on Kirupa was no longer there.
Basically I'd like to do this:On the stage I have a movieclip and I'd like the movieclip to move along the x-axis to a certain point and then back to the starting point again. The moving speed of the movieclip should also be adjustable.
I have a horizontal scrolling movieclip that scrolls when the mouse is left or right of a certain point of that movieclip. However, it only moves slightly then stops when the cursor goes over it, it doesnt actually scroll normally...
[Code]...
i have 2 intersecting movieclips.
is there a way to hit test point NOT detecting a bottom movieclip if the mouse is over the top movieclip?
here's what I have - a custom video player that pulls everything from an XML doc. In that XML doc, I have three sections that contain start, middle, and end times (in seconds) for the video. The goal is to track how many times the start, mid point, and end of the video are reached.
This all works, however I'm encountering a strange action. When I play the movie, I get output that the start point has been hit, then I get three (3) duplicate outputs of the mid point getting triggered, and finally six (6) reports of the end point hit.Strange. The numbers change slightly, (1,3,6 and 2,4,10, and 1,4,8) times for each of the start/mid/end triggers.
Here's the code that I'm using:
("prefs.prefOmnitureStart", "prefs.prefOmnitureMiddle", and "prefs.prefOmnitureEnd" are the numbers in seconds that are pulled from the xml. In my example, they're 2.0, 6.0, and 10.0)
Code:
myVideo.addEventListener(MetadataEvent.CUE_POINT, cp_listener);
function cp_listener(eventObject:MetadataEvent):void {
myVideo.addASCuePoint(prefs.prefOmnitureStart, "sendOmnitureStart");
[code]....
I have a Flash component that links to a gallery, and I understand that I can create buttons to point to multiple galleries. (waiting too long for support from the suppliers).The User Guide says that I can use the following to create the connection:
myThumbnailer2.loadGallery(24);
That won't work, and it says that I need to include it in an onclipevent. I have no idea what i am doing and I was hoping someone could tell me what to script to get the text button I created to run this.
I am trying to get the x & y values of a movieclip(contentMc) from inside a different movieclip. Is this the correct way? Here's my code:
ActionScript Code:
myMc.x = MovieClip(root).contentMc.x;
myMc.y = MovieClip(root).contentMc.y;
I am trying to get the x & y values of a movieclip(contentMc) from inside a different movieclip. Is this the correct way?[code]
View 1 RepliesI have a FLV playing (via FLVPlayback component), and I'd like to have a graphic/movieclip display on top of the video at one of the cue points.
The video is a person speaking, and I'd like to have his name and title fade in when he says it.
how can I make the green movieclip rotate in the point that the claw has catch it. To give an impression of physics. Here´s the image, to give you an idea:
The point (x,y) that the claw catches the colored movieclips below is not unique it can be any number. As long as the claw catches the colored movieclip.
I have a FLV playing (via FLVPlayback component), and I'd like to have a graphic/movieclip display on top of the video at one of the cue points.
The video is a person speaking, and I'd like to have his name and title fade in when he says it.
when i make a MovieClip by code
ActionScript Code:
var my_mov:MovieClip = new MovieClip()
where is register point on the movieclip?
[code].....
Can anybody tell mw what is the origin point of the movieclip.
View 1 RepliesI am making a 'simple' template builder in flash which allows the user to add/remove text boxes and images to the stage.
I can rotate any of the movieClips fine but it rotates from the top left and i want it to rotate from midpoint. Is there a way to set the midpoint/rotation point using actionscript?
I have an action script for a movie clip to rotate around (instance_name.rotation -= 1. and this works fine, how ever i need it to rotate around a point outside of the movie clip. i think i need to move the registration point but i dont know how to do this.
View 1 Repliesi'm working on a flash game at the moment, and i would like to know if i am able to set the point that the movieclip rotates around using actionscript. i don't want to do it by simply moving all of the contents of the movieclip closer or nearer. is there any other way of doing it? i couldn't find any simple functions for it. am i just going to have to use some complicated maths?
View 3 Repliesi want to move a certain movieclip from a point to another , and i know this can easily be done with a few lines of code ...but just a few days ago i ran across some piece of code that you just entered the x and y positions of were you wanted it to go and the speed at which it should go there...i even saw a command were it would slide in to the position ,, slowing down the closer it got...
View 1 RepliesHow would I move a movieclip to a defined point?
View 4 RepliesI have read a few discussions on changing the registration point on a movieclip but don't seem to work. I have a movieclip with embedded mcs. I can se that the nly way of changing the reg point is by saving as a mc again ie: creating another one and upon creation choose the reg point.
View 5 RepliesHow to fix dynamic registration point in movieclip?
View 9 RepliesSo I've now realized that no mater what I do. my 3D vanishing point is relative to my stage coordinates and not my movieclip's coordinates. I'm trying to move my 3D movieclip from one point of the stage to another but with the strong perspective that I have, I do not want it to change. I would like to move it and preserve it's perspective and not change it's shape.
View 1 RepliesCan I set the registration point of a MovieClip (or other Display Object) to its center upon creation in AS3? the following
[Code]...
sets the registration point of myClip to its top left corner by default. Using Flash CS4 to set it to its center is just a couple of clicks, so I am wondering how I can perform the same action only with code.
I have a MovieClip, that is representing a character in my game. Id like to "create bullets" shooting out from the tip of my characters gun. Problem is that when my character turns around, also the point rotates around the MovieClips pivot.
Is it possible to anyhow easily track this point, so that I could dynamically create new objects at the same location.
I tried to add a new MC as a child to my character, with the initial position at the guntip. In some systems child-objects "follow" their parents around, but it didnt seem to work here.
Is there any other "native" way of doing this, or do I just have to have a Polar-coordinates representation of the point relative to character-MovieClips origin, and add the MC rotation to theta, so that I can calculate the X and Y coordinates?
Is there a way to change the registration point of a movie clip after you've made the movie clip?
View 5 RepliesI'm making a custom collision class, and I need to know the registration point of the targets so I can use the bitmap.hitTest(); function, and not all of my movieclips have their registration point in the upper left side, so I'll have to do a little calculation according to the registration point of each movieClip, but I don't seem to know how to obtain the registration point with as3.
View 3 RepliesHere I have attached using dynamic registration point on movieclip file.when I clicked on green button it was scaled depend up on the registration point.It was worked fine.but I expecting to drag on green button to scale image. I tried many ways, but I couldn't do it
View 0 RepliesI want to know how can i make a point (movieclip) move, i know that if i double click the movieclip e can manually change the 'x' an 'y' values and this way the point will move.
It is possibly to link this with java? And make java pass the x and y values to the animation?
I figured out the code below to make a movie clip scroll up and down. However, the problem is that it will keep scrolling forever. Does anyone know how I can get it to stop at a minimum and maximum vertical height?
Code:
var scrollUp = function() {
test_mc.onEnterFrame = function() {
[code]....
I am trying to make a line point to wherever the cursor is when I stumbled upon the Math.atan2(); function. It appeared that i would put
line.rotation = Math.atan2(1,1);
to get 45 degrees or pi/4, but I was wrong. It barely moved the movieclip at all. So what I'm trying to do is to get this movie clip to rotate along with the mouse so the line is always pointing at the cursor. Also, how would you get movieclip to move along the line created by the line of these two points?