Actionscript 3.0 :: Move MovieClip From Current X,y To Target

Jan 13, 2010

I'm creating a site that allows drag and drop navigation.

Here's the current preview: [URL]

My goal is to allow the user to freely navigate the desktop and explore at their leisure, however, for the user who's a little more impatient I want to offer an option allowing them to click a button on the bottom menu and have the desktop slide directly from the movieclip's current XY coordinates (whatever they are at the time), to a designated XY, and center on that specific section, easing into place.

I've got placeholder buttons, and placeholders for the desired targets, but I can't wrap my mind around the code needed to do it, nor have I found any examples that use the same technique with AS3.

View 2 Replies


Similar Posts:


ActionScript 3.0 :: Move MovieClip From Current X,y To Target?

Jan 13, 2010

I'm creating a site that allows drag and drop navigation. Here's the current preview:

[URL]

My goal is to allow the user to freely navigate the desktop and explore at their leisure, however, for the user who's a little more impatient I want to offer an option allowing them to click a button on the bottom menu and have the desktop slide directly from the movieclip's current XY coordinates (whatever they are at the time), to a designated XY, and center on that specific section, easing into place.

I've got placeholder buttons, and placeholders for the desired targets, but I can't wrap my mind around the code needed to do it, nor have I found any examples that use the same technique with AS3.

View 4 Replies

Flex4 :: Difference Between Target And Current Target

Nov 28, 2011

What is the difference between target and currenttarget in flex?What is the difference between Target and Current Target in Flex especially in mouse events.

View 2 Replies

Actionscript 3 :: Bring Current Target Into Movie Clip?

Oct 15, 2010

How to bring the current target into the movie clip?

If we can set the current target into "selectMovieClip" variable then i believe we should be able to rotate or manipulate it as a MovieClip.[code]...

View 1 Replies

Flex :: Get Current Target Values While Effect Executing?

Jun 29, 2011

At a certain point in an effects execution i would like to execute some code.

Say for example that i have a move effect on objectA and half way through this effect i want to make objectB disapear.

Is there any functionality built in to the spark effects framework to do this or do i need to implement the effect myself by hand?

View 2 Replies

ActionScript 1/2 :: Move Object From Current Postition?

Jun 22, 2010

I'm looking to see how to move an object from it's current position to a designated _x coordinate.  I want current position to be a variable that has it track where it is currently located and travel automatically without having to say move from 24.7 to 35.8, for example. I'm usuing the basic mx tweener classes and would like to keep it that way.  Basically I'm creating a nav where a dot flies to the nav selection. So end result is I want code that says travel to this _x coordinate from wherever you currently are.

View 5 Replies

ActionScript 2.0 :: Making Target Move Around Like Another One?

May 4, 2009

making another symbol(object) to move around randomly like another symbol i made here is the script for the symbol

onClipEvent (load) {
this._x = random(550);
this._y = random(310)+90;[code]..........

i need to make another symbol like this one that moves around same way i think i need to make a new layer? make next script for new symbol so it will to move around the same way.or tell me what to write in the new script for the symbol .

View 8 Replies

ActionScript 3.0 :: Target Movieclip With E.target?

Aug 30, 2010

qi have a movieclip which is added to the stage:

var profileholder:profileHolder=new profileHolder ;

inside of profileholder is another movieclip(infoBtn) that acts as a button.when the mouse is over profileholder i want to do something with infoBtn like:

//profOver is the over state of profileholder
function profOver(e:Event) {
e.target.infoBtn.alpha=1;
}

this doesn't work and brings up this error:ReferenceError: Error #1069: Property infoBtn not found on flash.display.Loader and there is no default value.
at main_fla::MainTimeline/profOver()

i also tried:
function profOver(e:Event) {
var item:profileHolder=e.target as profileHolder;
item.infoBtn.alpha=1;
}

and get this error:TypeError: Error #1009: Cannot access a property or method of a null object reference.

View 1 Replies

Flex :: Move Effect Only Animating Last Target In Array Of Multiple Items

Feb 5, 2011

I am animating a number of items using the Move effect. I am adding each item to an array after it has been added to the display list and once all items are added calling the play method, passing an array of the items to it. Only the last item plays in my animation.

Here is my code:
MXML: s:Move id="coinFall" yFrom="-400" duration="2000" />
public function showCoins(n:Number):void{
holder.removeAllElements();
var targets:Array = [];
if (n>=2.5){
[Code] .....

View 1 Replies

Actionscript 3.0 :: Make The Arrow2, Body And Target Move To The Left Of The Stage

Sep 28, 2009

i have a loop error where it times out

Code: Select allstage.addEventListener(MouseEvent.MOUSE_DOWN, shootArrow);
function shootArrow(event:MouseEvent):void
{
do
{

[code]...

So what im trying to do is make the arrow2, body and target move to the left of the stage and make the actual arrow (flyingArrow) to move down to give the effect of a flying arrow?

View 3 Replies

ActionScript 3.0 :: Override Event Target - Move Other Sprite According To The Mouse Events On The Stage

May 27, 2009

i am trying to do a simple blackboard on mouse down, start drawing on mouse move, if drawing, draw line on mouse up, stop drawing i set the listeners on a simple clip with a rectangle. if i dont fill the rectangle, the mouse events wont fall into the rectangle, but if i fill the rectangle, it will paint behind the rectangle, so anyway i wont see any succesfull results. what i did was create another sprite and paint within it; something like

[Code]...

View 3 Replies

ActionScript 1/2 :: Movieclip In ButtonMode - Draggable To Different Movieclip Target?

Jan 8, 2010

I'm doing a project that makes a movieclip draggable in different droptarget movieclip. When it is dragged in the 1st target an animation is triggered and so as the rest of the droptargets.Here's my initial code that does'nt work:
 
btn1.buttonMode = true;
b1OrigX = btn1._x;b1OrigY = btn1._y;
//btn1btn1.onPress = function(){    startDrag(this);}//droptarget = box1btn1.onRelease = function(){    stopDrag();       //droptarge1t

[code]....

View 2 Replies

ActionScript 2.0 :: Move Punto_mc From Current Position To Random Position After Release?

Aug 29, 2009

how to make an actionscript to move punto_mc from current position to random position after release, and then from this new position to mevo to another randon position after release?

View 2 Replies

ActionScript 2.0 :: Make An Object Move Along Y Axis Once It Has Reached Its X Axis Target?

Mar 2, 2005

I'm trying to grasp how functions and motion tweening works.

Heres my question. How do i make an object move along the y axis once it has reached its x axis target?

HEre is the code, that i got from here.

and what in this code is making the MC ease out?[code]...

View 14 Replies

Get The Current Frame Of A MovieClip?

May 16, 2011

how can I get the current frame of a MovieClip.It's an animation that just loops over and over when its opened with ctrl+enter.On the stage its just one layer and one frame, but when it's double clicked, it has its own timeline with 20 frames.

Actionscript Code:
//what i had but it shows frame 1trace(myMovieClipInstance.currentFrame);

display the current frame when it changes. So something with a while loop. Like while the movie clip is playing, display the current frame.

View 4 Replies

Actionscript 3 :: Move Movieclip Position Opposite Of Mouse Coords On Other Movieclip

Jan 26, 2011

Okay I have a script in which I have added an image to the stage. It is absolute centered. I then have another with is on top but much bigger. I would like the big image to move opposite of my mouse position on the smaller image. ie: cursor is on bottom left corner the bottom left corner of the larger image is in the same spot. And the same thing for any other area.

I have tried many different ways but to no avail. I have done research but no one has been able to give me a solid answer. Anyone know of a way to accomplish this. Keep in mind this it needs to work regardless of the image size.

View 1 Replies

ActionScript 2.0 :: Current Movieclip With Hittest

May 15, 2009

I'm setting up a project that has a list of 45 words. The user should be able to drag the words into an area on the stage, as many as they want, but unable to proceed until they have only 5 words in the selected area. I started off by making each word a movieclip and making them draggable, but wondered if there was a way to simplify the code rather than putting it on all 45 movieclips, if there was a way to have it know which one i'm currently dragging.

Then I was unsure how to keep track of how many were in the area. If i have a count that gets increased for each hittest, it goes up and up, but you can continually redrag the same word on which is wrong. But the user needs to be able to drag words out, so I can't disable them when they hit.

[Code].....

View 10 Replies

ActionScript 3.0 :: MovieClip Get Current Frame

Feb 3, 2010

Is there a way to get he current frame of a movie clip that is playing? For example I have myClip which is a MovieClip, and the code is myClip.stop(); Is there a way to know which frame myClip stopped on? Such as frame 5 or 10 or so?

View 1 Replies

ActionScript 3.0 :: How To Find Current MovieClip

Dec 7, 2009

I am creating a flash file to display products.
 
Product details and images are stored in XML File.
 
What i am trying to create is something similar to banner on [URL]
 
The addition to this is that products will be scrolling right to left automatically if there is no interaction from user, and product at the center will remain highlighted.
 
I have created a long strip of Products cover with a mask, the long strip keeps moving to give a scrolling effect.

View 2 Replies

ActionScript 2.0 :: Step Down From Current Movieclip?

Nov 25, 2010

I have two movieclips nested inside of a movieclip.I placed code on one of the internal movieclips to have its x position increase upon each frame tick, and when it surpasses or equals the x of the other internal movieclip, I need it to turn around and go the opposite way.If it were as simple as this, I could have just done:

Code:
if (_root.OuterClip.InnerClip1._x >= _root.OuterClip.InnerClip2._x){
_root.OuterClip.InnerClip1._x += Speed;
}else{

[code]...

But neither work.

View 1 Replies

Actionscript 3 :: Move The Externally Loaded Content Of A MovieClip To Another MovieClip?

Jul 25, 2011

I load an image into a MovieClip. At a second time I want to move this image to another MovieClip.

View 1 Replies

ActionScript 2.0 :: MC - Make A Movieclip Move Slower At A Certain Place In Movieclip

Mar 13, 2004

I'm trying to make a movieclip move slower at a certent place in my movieclip. This means, that the speed needs to be lowered when e.g. showing af picture. Here is the situation. I have a movieclip running different pictures. E.g. the first runs for 115frames and fades out. Instead of runing 115 frames i want the movieclip to run 5 frames (picture fading in) and the stops or delays for 10sek and then goes to frame 6 from where the picture fades out. Where in the movieclip should i place this Action Script?

View 1 Replies

ActionScript 3.0 :: Target A Movieclip Within A Movieclip?

Jul 30, 2010

Its day 3 of learning AS3 for me. I cant seem to target a movieclip within a movieclip. I code with all my actions on the first frame of the root timeline and would like to continue this practice. But when I target the clip from the root my function wont run.

Here is my example:

Code:
wheel_mc.spinBackward_mc.buttonMode = true;
wheel_mc.spinForward_mc.addEventListener(MouseEvent.CLICK, spinForward);
function spinForward(event:MouseEvent):void {

[code]....

Basically it wont gotoAndPlay("fadeIn") and I'm not sure why. So my question so I can move on in my AS3 learning is how to I target a movieclip with another movieclip, or is there another more proper way to do what I'm trying to achieve.

View 2 Replies

CS4 :: Accessing Child MovieClip's Current Frame?

Jul 12, 2009

I have a character that I want to animate. Now each part of his body is a separate movieclip. What I want is that, for example, if you imagine the shoe MovieClip, I want to give it three frames - from the front, from the side, and bent.

So when I animate the character MovieClip, I would like it if I could keyframe the currentframe of the shoe MoveiClip, if that makes any sense. It's easy enough to do in ActionScript, but the problem with that is the change isn't visible until I test the movie, and when animating it's useful to see exactly what the character looks like at each frame. Is there any way of setting the current frame of child MovieClips when animating?

View 3 Replies

ActionScript 3.0 :: Remove Or Fade Current MovieClip

Feb 20, 2012

I have a movieclip called iconinterface_mc and inside of that movieclip I have another movieclip called smsinter_mc iv created a button inside smsinter_mc and I want the button to bring the user back to the iconinterface_mc.

View 12 Replies

ActionScript 3.0 :: Hide All But Current Movieclip Object

Jul 27, 2009

There is something I have been trying to figure out how to do, I keep running into needing a simpler bit of code to hide all the movieclips except the one that was just made visible. My only idea so far is to manually input all the movieclip names and tell them whether or not to be visible. It works, but it creates a lot of code and is time consumming to change. I hope there is a way to use just one or two lines of code and hide all but the currently selected movieclips.

View 9 Replies

ActionScript 3.0 :: Get Width Of Movieclip On Current Frame?

Mar 7, 2012

I would like to know how i can get the width of a movieclip on its current frame. I am using scrollRect to hide certain sections of the movieclip and when i want to return it to its original size i need to get the dimensions the movieclip on each frame so i can return it to the default.

View 1 Replies

Actionscript 3.0 :: Get Current Label Of Movieclip In An Array?

Jul 30, 2011

I have six movieclip images ( nested in the movieclip "mainInsight") in an array. I am using event.currentTarget to trigger MouseEvent.CLICK event that reacts to a parallel array. The parallel array, uses current Labels, to go to the frame labels in the main movieclip "mainInsight". It's supposed to scale up the image that is clicked, by gouing to a certain label with tween functions, and scale down the others. My current code returns this error:

ArgumentError: Error #2109: Frame label TheCompetition not found in scene Scene 1.
at flash.display::MovieClip/gotoAndStop()
at tweenTestFinalTwo_fla::MainTimeline/clickHandler()

[code].....

View 1 Replies

ActionScript 2.0 :: Check The Current Frame Of Movieclip?

Aug 28, 2006

i want to check the current frame of movieclip that it play's after i press a btn!

my script look something like this:

Code:

sub_meniu.sub2.onPress = function () {
this._parent._parent._parent.Mcs.play ();
checkCurrentFrame ();

[Code]....

This is probably an infinite loop. Further execution of actions has been disabled in this movie.

View 2 Replies

ActionScript 2.0 :: MovieClip Assigned To Variable Current

Dec 2, 2009

I've used similar code to this before in another project, but for some reason it's not working here:
Code:
var current:MovieClip;
menu01.menuslide.arch.onRelease = function() {
if (current != null) {
Tweener.addTween(current, {_y:0, time:.5, transition:"easeOutExpo"});
Tweener.addTween(menu01.menuslide, {_x:0, time:1, transition:"easeOutExpo"});
[Code] .....

I need to assign a value equivalent to the name of the button that is being pushed to the variable 'current'. when I trace 'current', I get 'undefined'. I used this in the past in this way below and it worked:
Code:
a2.onRelease = function() {
if (current != null) {
current._alpha = 0;
current.removeMovieClip();
attachMovie("002", "box002", 10, {_x: 0, _y: 30});
[Code] .....
Why the first code block isn't working?

View 2 Replies







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