Action Script 3 :: Flash - Rotate Picture In Counterclockwise Direction

Jan 5, 2011

in a .swf object, i rotate pictures in one direction : clockwise (+90°), with the eventRotateHit function. It works!

I need to create a counterclockwise (-90°) function : eventRotateHit2. This function doesn't work : the picture disappear. I think it's because the rotation center is false, but i'm not sure. And i don't know how to change it.

My code :

package Classes.image
{
import fl.controls.Button;

[Code]....

View 2 Replies


Similar Posts:


ActionScript 3.0 :: Rotate A Movieclip Clockwise And Counterclockwise

Jun 24, 2009

I have 2 movieclips. ro used for rotating and rect the movie that will be rotated.
 
I want when clicking and draging the ro movieclip clockwise or counterclockwise, the rect movieclip is rotated clockwise or counterclockwise respectively.
 
I allow the rect to be rotated according to mouseX and mouseY.
 
but it dose not work as I need.
 
I'd like you to show me a trick to achieve that as I want.
 
Here is the code:
 
var xPo:Number;
var yPo:Number;
ro.addEventListener(MouseEvent.MOUSE_DOWN, mouse_down)
function mouse_down(e:MouseEvent):void

[Code].....

View 2 Replies

ActionScript 2.0 :: Change Rotate Center Object To Counterclockwise

Aug 16, 2010

I'm not the swiftest when it comes to math, but usually I can figure out through trial & error how to modify AS. For the life of me I can not figure out where this AS gets it clockwise rotation, so that I can change it to counterclockwise.

Code:
onClipEvent(load){
this.rotation_speed = 2;
function origin(){

[Code].....

View 3 Replies

ActionScript 2.0 :: Rotate The Line Mc Move Clip In A Counterclockwise Rotation When Scroll The Mouse Wheel Up Instead Of Down .... CCW?

Aug 7, 2007

What do I do to make this rotate the line_mc move clip in a counterclockwise rotation when I scroll the mouse wheel up instead of down. Currently it rotates the movie clip in a clockwise fashion regardless of which way I scrool the mouse wheel.

[Code]...

ps. is there anyway to get this thing to ease when it rotates... instead of the jerky rotation it does now.

View 7 Replies

ActionScript 2.0 :: Rotate To Direction Of Movement?

Jul 26, 2011

given the x & y speeds, how do i calculate the direction of movement?

View 3 Replies

ActionScript 3.0 :: Rotate In The Direction Of The Mouse?

Feb 11, 2012

I am horrible at maths and I would like to ask how to make an object ex. an arrow turn into direction of the mouse?ENTER_FRAME and some mathematical functions, but I cant tell which and how to use them.

View 2 Replies

ActionScript 3.0 :: How To Choose Shortest Direction To Rotate

Oct 21, 2011

I've been trying to rotate an arrow but I can't get it choose the shortest direction. How would I do that?

Here's something I've started:

ActionScript Code:
import com.greensock.TweenLite;
import com.greensock.easing.*;

[code]....

View 3 Replies

ActionScript 2.0 :: .rotate Circle With Buttons, Change Direction?

Oct 20, 2010

what i have is a circle image (for this purpose lets say it looks like a clock). For example: when you click 3 o'clock, the whole clock needs to rotate around with the 3 o'clock btn at the 6 o'clock position (with the pivot point in the centre). each of the 'time' positions (2 o'clock, 3 o'clock, 4 o'clock ...etc) needs to be a button and thus be able to rotate around to the 6 o'clock position.This would seem simple enough by just using a.rotate value or using tween movieclips...however the tricky part is:the actionscript needs to determine which way the clock turns (anti/clockwise), dependant on where the clicked time-btn's position is. it needs to be some sort of if statement that says:if (3'oclock-btn) is positioned between 0 degrees (being original 12'oclock position) and 180 degrees (original 6 o'clock position), then rotate clockwise to the 6 o'clock position. If the (3o'clock btn) is positioned between 180degrees and 259 degrees (12 o'clock position), rotate anti-clockwise to the 6'oclock position.

View 5 Replies

ActionScript 3.0 :: Rotate Slowly Based On The Direction Hes Moving?

Nov 13, 2010

currently I have a movieclip that follows my mouse cursor simply using

char.x = mouseX
char.y = mouseY

the movie clip is always upright, how do i add rotation so the char will rotate slowly based on the direction hes moving?

View 2 Replies

ActionScript 2.0 :: Top Image To Tween To The Right And Up In X And Y Direction And Also Slightly Rotate

Apr 15, 2007

I am updating source code I came across to AS 2.0 and I am having problems with the tweens. Here is what I am trying to accomplish in AS2.0:[URL] Here is the part of my updated code I am having problems with:

[Code]...

This is my problem: (1) I want the top image to tween to the right and up in X and Y direction and also slightly rotate. THEN I want it to tween back underneath the other stack of pictures in center of swf. However what is happening is that the depth of the topimage is being set under all the pics right away and the tween takes place under all the pics and not ontop. Is there a way for me to wait until the tweens are done and then execute my swapDepths line? Here are problem lines in detail:

[Code]...

View 1 Replies

ActionScript 2.0 :: Rotate Movieclip According To Mouse Direction, Drag

Nov 8, 2007

Is it possible to rotate movieclip, while dragging, according to mouse direction and mouse x, y on that clip.

on the picture the 0, 0 of the mc containing red box is where the lines cross, the mouse point is indicated with cursor and around it is the circle where clip's x and y should be constrained and movieclip should rotate according to mouse movement direction for example: when mouse is moving straight down then the clip's x, y rotates up and stops when its 12 o'clock...

View 7 Replies

Professional :: Rotate A Movie Symbol In Anti-Clock Direction?

Jul 30, 2010

I have the following code which works quite nicely but in Clockwise direction. I would like the movie to rotate in a opposite direction which is Anti-Clock direction. How to resolve the problem?The following is the code:

// Adding mouse event to our movieclip!myMovieClip.addEventListener(Event.ENTER_FRAME, rotateMoveClip);
// the rotateMoveClip functionfunction rotateMoveClip(e:Event){  // e.target is the

[code].....

View 1 Replies

ActionScript 3.0 :: Rotate Symbol Based On Direction Of Mouse Movement?

Oct 16, 2009

What I really want to know is how to rotate the symbol based on direction of mouse movement

View 1 Replies

ActionScript 2.0 :: Rotate Through Clips And Button Action

Aug 7, 2009

So I have been attempting to build a banner, where 3 clips auto-rotate to left, with two arrows that can move it left and right. How should I build this? I obviously want to load three clips and position them 300 pixels apart... but what logic should I use to basically add the last/first clip either 300, or -300 pixels? I have tried using if conditional statements checking for x position and based on that add a clip, but that seems like its lacking alot of functionality, here is my code thus far...

import gs.TweenLite;
circle1_mc._x = clipPos;
myInterval = setInterval(moveOffer, 3000);
this.attachMovie("boxClip", "circle1_mc", this.getNextHighestDepth());
function moveOffer(){
[Code] .....

View 2 Replies

ActionScript 2.0 :: Rotate Dynamic Loaded Picture Around A Point I Define?

Jan 8, 2010

How can i rotate a dynamic loaded picture around a point i define?

Now my pictures are rotating around the upper left corner, but thats wrong, i need it to rotate around the center.

View 0 Replies

IDE :: Preloader - Picture Needs To Load First For The Next Action To Happen

May 24, 2009

i am creating a flash website, i have a preloader at the start of the site. My problem is that when i view it as it would be seen on a browser the preloader doesn't appear straight away. i have an image with the preloader (site logo) and is 182kb file size and am guessing that this picture needs to load first for the next action to happen. if htis is so, other then reducing the file size is there anyway to make the preloader appear straight away.

View 1 Replies

Professional :: Rotate "star2_mc" To The Other Direction?

Sep 21, 2010

[Code]....
 
Im just wondering how you can rotate "star2_mc" to the other direction?

View 3 Replies

ActionScript 2.0 :: Make A Picture Gallery And Use Buttons That Move You From Picture To Picture And Backwards?

Apr 22, 2002

I want to make a picture gallery and use buttons that move you from picture to picture and backwards, but I don't want to tell button 1 to go to frame 2 and button 2 to got to frame 3 and so on (I hope you know what I mean)Can I use on button on a separate layer with the same action set? I tried something like that, but it didn't work:

on (release) {
thisframe =+1
}
[code]........

but it didn't work. I'm kind of new to any action script other than gotAndPlay, easy functions and all that.

View 2 Replies

ActionScript 3.0 :: Flash Animating A Picture By Using A Script Need To Break The Picture?

Oct 2, 2011

I how that any Can help I have a Picture that I want To destroy it As someone break it as a glass and then something made it go back as she was

View 1 Replies

ActionScript 2.0 :: Scrolls Continuously In A Direction Until The Direction Of The Mouse Is Changed?

Feb 24, 2009

i have a scroller developed in as2. it basically scrolls continuously in a direction until the direction of the mouse is changed. the images of course loop in the continuous scroll. now the problem is that for 10-15 photos its ok. but when i feed it with 180 photos, it seems to show only 11. why would this be? any restriction on flash ??

View 1 Replies

ActionScript 3.0 :: Direction Of The Ball In The Direction Of The Mouse

Mar 17, 2011

have a ball with the name of mc which can be moved using the keyboard .. when you press the left mouse button shoots the ball, this ball and the other flies in the face where the cursor was in the shot .. but if you move the cursor to another location and shoot a second time then the second ball is also flying in the direction of the cursor and the first ball change direction toward a second shot ..

ActionScript Code:
import flash.display.MovieClip;
import flash.display.DisplayObject;
import flash.events.MouseEvent;

[Code]....

how to make that first ball did not change its direction and continued to fly in the direction of the shot?

View 5 Replies

ActionScript 2.0 :: Calling A Picture Into A Target In The Movie Without Placing The Picture Inside An Swf File?

Mar 22, 2003

I recently used the loadMovie action to load a .swf file to a target in the movie which it was being called from. Then I tried calling a picture to another target in the movie, but it did not load the picture as intended. I read about it on my book, but it didn't seem to work. Is there anyways on calling a picture into a target in the movie without placing the picture inside an swf file?

View 7 Replies

ActionScript 2.0 :: When Each Picture Loads The Loading Frame Resizes To The New Picture Size?

Jan 5, 2005

I have just been to a really nice website that has some really nice use of Flash on it.... I'm totally wowed by the resizing picture effect though? When each picture loads the loading frame resizes to the new picture size.

View 3 Replies

ActionScript 3.0 :: Build A Site That Would Give Users The Ability To Upload A Picture To A Picture Frame?

May 12, 2010

I am trying to build a site that would give users the ability to upload a picture to a picture frame on my site. I would like AS3 to dynamically re-size, and upload the file from an upload bar under the frame.

View 1 Replies

ActionScript 2.0 :: Resizing Uploads - When Each Picture Loads The Loading Frame Resizes To The New Picture Size?

Jan 5, 2005

I'm totally wowed by the resizing picture effect though? When each picture loads the loading frame resizes to the new picture size.It must be some sort of actionscripting but how is it done?

View 3 Replies

Remove The Old Picture And Then Start Fading In The New Picture?

Dec 7, 2010

i got five images, and five buttons, every image has a color, and lets say we start at the red one. When i click the the green button i want the green image to fade in.. i fugured out a way to do this on the timeline, but then i have to have a black box first fading in to remove the old picture and then start fading in the new picture..

View 2 Replies

ActionScript 3.0 :: Make Every Picture Go To A URL When The Picture Is Clicked?

May 27, 2011

I made a simple picture slideshow with a timer, prev/next buttons, pause/play buttons and jump buttons. Everything went good so far.Now i'm trying make every picture go to a URL when the picture is clicked but only the link on the first frame goes to the URL when clicked the other 5 buttons do nothing when click.(FYI: I made alpha 0% buttons in a layer above pictures)I tried two different codes but both have no effect.

as layer

Code:
stop();
var nextImage:Timer = new Timer(3000);
nextImage.addEventListener(TimerEvent.TIMER,playNext);
nextImage.start();

[code]....

View 1 Replies

ActionScript 2.0 :: Change An Action From A Button Click To A Frame-based Action

Oct 2, 2006

Code:
_root.navigationMC.onPress = function() {
startPreload("blue.swf");
}

If I wanted to change an action from a button click to a frame-based action, what do I use instead of onPress? The hints from the AS editor are all click-based.

View 1 Replies

ActionScript 2.0 :: Image Viewer - Crank Clockwise To Scroll Images Forward And Counterclockwise To Scroll Images Backwards

Apr 4, 2004

here is some code for a rotating crank that controls an image gallery. refer to the "image viewer stops?" thread in the flash mx forum (sorry don't know how to link to a forum yet!) for more info. attached is the fla. i want to be able to crank clockwise to scroll images forward and counterclockwise to scroll images backwards. If i keep cranking, i want the images to continue to change, if i stop cranking, i want it to stp on that image. it doesn't sem tooooo hard, i'm just numb from tryig to figure it out.

[Code]...

View 6 Replies

ActionScript 3.0 :: Enemy Animation Sequence - Rotate + Move, Then Stop Then Shoot Then Rotate Back And Move Off Screen

Aug 10, 2009

I am having some dificulty making a path for this enemy i'm trying to create... cause i want him to rotate + move, then stop, then shoot, then rotate back and move off screen... Its easier if you see it.. you can download the swf file in the zipped archive to demonstrate what i mean. I did it there with tweens. Anyway.. i tried and make it but i'm a little stuck on the stopping part... you can also see what i did in the fla file attatched...

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved