ActionScript 2.0 :: _parent[vehiclename1][vehiclename2]._rotation?
Mar 29, 2005how would i write this _parent[vehiclename1][vehiclename2]._rotation, it doesn't like the two breackets next to each other need quick reply.
View 3 Replieshow would i write this _parent[vehiclename1][vehiclename2]._rotation, it doesn't like the two breackets next to each other need quick reply.
View 3 RepliesI have a project which will allow the user to upload an image, drag it within a certain area, and rotate it.The trouble is, that the user is allowed to rotate the image. When they do, then because the area is defined by the width of the rotated image, then the image will not go as far as it's boundary,or it will cross over it's boundary.I have searched the web for a solution, and have found nothing.I am currently thinking it has something to do with Math.cos() or Math.sin()Here is my current code(which doesn't work):
r = mc._rotation;
mc._rotation = 0;
w = mc.clip._width;
h = mc.clip._height;
[code]....
I am trying to make my character look as he is walking around on the stage. I can make him, but what do I to make move his arms and legs? Also, I want the character walking animation when one of the keys is pressed, and stop walking when that same key is released. I have looked and looked with google and I can't seem to find the answer
View 3 Repliesfor examlple i have box. height=16 and widht=100 the problem is when i apply rotation on that movie clip it changes its height and widht. is there any way to control that? or any one can tell me using what formula it reduce the height and widht when we apply rotation on it??
View 3 Repliesi know how to use the _rotation on a mc, but how can i let it rotate slowly
[AS]
onClipEvent(enterFrame) {
rnd = parseInt(Math.random() * 2);
if(rnd == 0) {[code].....
this way it only flips to another degree, but you can't see it go round...
I would like to make a game for christmas. How can i use _parent 2 times? i mean, i have a kinda complicated MovieClip, it's movieclip in movieclip, i think 4, and i want to a script do nextframe to the second parent folder.
Code:
ROOT->Movieclip->2nd Movieclip->3rd Movieclip->4th movieclip.
The 4th movieclip when gets to a keyframe, it activates a script, to do nextFrame() in 2nd movieclip. I tried _parent._parent.nextFrame() and also _parent(2).nextFrame() but they didnt work.
I wanna know how can i jump up 2?
I used the tutorial on Kirupa on loading external swf's. Before writing here I tried to find an answer in the forums, but no luck so here I go.[URL]..If you look at my files: Open portfolio.swf and hit one of the first two images (that initially flies in). here you will see that if you hit the second one, the rpesent one displayed makes an outro and the second one makes an intro, PERFECT!
Now, if you open default.swf (that has portfolio.swf loaded into a movie clip as you can see by looking at the source) and if you hit the second image, the first one makes the outro, and then makes an intro. So the shift to the second one is not happenening. Please, can someone help me to make this happen?
From what I have gathered, _rotation uses radians?Basically, my initial goal was to make a movieclip rotate towards the mouse. I'm not very good at trigonometry.Using the help files I found atan2 which seemed to be what I needed. A little fiddling got me to this code:
var xDist:Number;
var yDist:Number;
var angle:Number;
onMouseMove = function () {
[code].....
However,the _rotation is opposite what is expected. This is not a problem as I can just flip the movieclip. But really what im here to ask is, please ecplain this code for me? I don't correctly understand how atan2 works.. and why it needs to be *60.Basically: How to get a movieclip to rotate towards the mouse.. and why does the code work, I want to learn trigonometry.
I'm having a problem determining if the angle created between two movie clips (which I've calculated with Math.atan2) is within +/-35 degrees of movie clip b's rotation.
View 3 RepliesIs it possible to make a movie clip rotate about the center point of it using the ._rotation method?
View 1 RepliesIs it possible to disable all buttons in _parent?I dont want to use the name of all the buttons
View 2 Repliesok since no replyes to my last post ive added an example: basicly in root i have this code:
var container_mc:MovieClip = this.createEmptyMovieClip("container_mc", this.getNextHighestDepth());
attachMovie("button_mc","button_mcadded",_root[container_mc]);
[Code]....
So far i have done:
[Code]....
Which is currently very glitchy it will not look at the mouse directly instead it will just continuosly rotate trying to find it, is there any way to fix this? The game... I have tried several different methods... Is it because it does not know how to face the mouse and what part of him to use to face it, if so how can i fix it?
if there is a way to use the _rotation property with the Tweening class to make a movie clip continually to rotate from it's current position instead of starting back at the original position and doing the same rotation again.
I'm trying to make an movie object rotate 90 degrees by clicking on a button and then when you click the button again, the movie rotates 90 more degrees. I don't want it to start over and do that same 90 degree rotation with the Tween class.
how do i change an object's _rotation based on the xy coordinates of another object (so it is facing it)?
View 3 RepliesI have a movie clip that has the following code:
on (release) {
_root.rightMenu_mc.gotoAndStop("Animation");
}
It works fine the way it is but I read that it is better to use relatives paths rather than _root all the time but when I change it to _parent.rightMenu_mc.gotoAndStop("Animation"); it doesn't work anymore.
I have a movie load an SWF into a movie clip, in that SWF there is a button which tells a movie clip to .play, the movie clip inside that swf is called "clip". i have on that button _parent.clip.play();
View 2 RepliesI have several SWFs that I need to work when loaded into another container SWF file as well as work when they are stand-alone SWF files. Because of this, in circumstances where a movieClip is being talked to from another MovieClip I am using _parent as opposed to _root. It has been working fine until now. I have one circumstance that only works with _root and will not work with _parent. _root.content_mc.anim_mc.screenShots_mc.gotoAndSto p(2); Obvously this works fine as a stand alone but not of course once loaded into the container movie.
View 5 RepliesI have some code similar to this:
Code:
mc1.button.onRelease = function() {
//do stuff
}
mc1.onRollOver = function() {
[Code]...
I am trying to something like the following:
createEmptyMovieClip("iconLoad"+ i, .i+100);
["iconLoad" + i].iconName = IconArray[i];
loadMovie("pIcon.swf",["iconLoad" + i]);
In the movie pIcon.swf there is a local variable iconName. I am trying to set this variable from the above code (2nd line).
im tryin to rotate this movieclip of a starfield but when i use _rotation i get this flickering effect every second or two of rotation see [URL] left and right keys change rotation hold down a key and you will see what i mean ,is there a way to prevent this flickering here is the code i used
[Code]...
First off I am using flash 8 What I am trying to do. (or should that be failing to do?) load a video swf in to a master swf, Master swf has no controls and loads the video swf ok But no video content. Main file loads video swf in to mc_vidholder in the main swf Code in AS frame
[Code]....
How can I create Video Object only with AS? (Without Conponents in Libary) I want to locate my Video Clip in MovieClip
var myMovieClip:MovieClip=this.createEmptyMovieClip("m yMovieClip", this.getNextHighestDepth());
and How can I create Video Object in this myMovieClip (AS without Components in Library)
var myVideo:Video=...
...=myMovieClip.createNewVideo("myVideo", myMovieClip.getNextHighestDepth());
i can't get this preloader to work. i test it out, and it hangs. i've tried to change my _root to _parent values and nada. it just shows 0% and does nothing. here's the AS that i am using:
[Code]...
i got it off a tutorial a while ago. it seems to work in other flash movies that i have created, but not on this one. i've even re-built it from scratch, and still nada.
I have a _parent movieclip that receives mouse events and I want the clips inside the _parent clip (child clips) to receive mouse events also, but because of the _parent's mouse event handlers, the child clips are "interfered" with, or not received....how do I make it so both the _parent and the child clips can receive mouse events?
View 1 RepliesI found the tutorial on duplicating movieclips, especially the line-by-line translation of the code. how to communicate with those clips�specifically to make them draggable and also to change the _rotation with Key.Right, Key.Left.
View 7 RepliesDoes anyone know the Actionscript 3.0 code for displaying a hyperlink in the "_parent" browser window?
{ navigateToURL(new URLRequest("link.html"));}