Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash


Advertisements:










ActionScript 3.0 :: Movieclip Follows Movieclip. How To Release It?


I have a ball that I can move around with my arrow keys; fling it up down left right, bouncing off the edge of the stage etc with a simple 2D physics class.Now I have a second ball which I have its x and y position to equal the first balls x and y. So the entire time I'm moving the first ball with my arrow keys the second ball just locks to the center of the first balls x and y. I am trying to figure out (on a mouse event click) how to now release the second ball; tell it to no longer follow/lock onto the first balls x and y position. My physics class will thus allow the second ball to simply fall as a result of gravity. how I can tell the second ball to no longer follow the position of the first ball?

code: addEventListener(Event.ENTER_FRAME, moveBall);
stage.addEventListener(MouseEvent.CLICK, dropSecondBall);
function moveBall(evt:Event):void {[code]..


View 2 Replies (Posted: 10-01-2009, 11:49 PM)

Sponsored Links:

Related Forum Messages For Flash category:
ActionScript 2.0 :: CS3 On (release) Not Working In Movieclip?
I've made 2 swf's. One is navigation with a movieclip named "connn" where another swf of content being loaded into it. The second swf is the content consists of a scrollable bar of thumbnails at the bottom, loading particular content on the stage. For the contents swf, I've this script on each of the thumbnail

PHP Code:

on(release){
_root.gotoAndPlay("framename");
}

which framename is marked on the top level of the flash, with a movie clip of a couple of images swaping. And this work perfectly. [URL]

PHP Code:

loadMovie("services_web.swf",this.connn);

which load the content into the movie clip named "connn". It got no problem loading the swf in but I discover that after it is loaded, the thumbnail script of the content failed to work. (please see: http://mr-otto.com/wd/services.html under WEB/INTERACTIVE > websites)

I guess that is the problem of the _root. thing and perhaps changing this I can have it work as perfect as it can be even being called in another swf.

Posted: 07-15-2009, 11:04 PM

View 2 Replies!   View Related
ActionScript 1/2 :: MovieClip Hide/Show On Release?
I'm making a Flash AS2 Dress-up game and I want to show/Hide movie clips on release of a button like this one;

Posted: Dec 6, 2009 3:42 PM

View 1 Replies!   View Related
IDE :: Movieclip - Make A Button Access A URL On Release?
I know you can use the following code to make a button access a URL on release:

[Code]...

Just wondering if there is any other code or actionscript you can put on a movie clip so that on release, it accomplished the same thing?

Posted: April 30th, 2009

View 6 Replies!   View Related
ActionScript 2.0 :: Navigate To A Completely Different Movieclip On Release Of The Button ?
on release of the button, how do I navigate to a completely different movie clip? so I know about _parent and _root in terms of moving between layers but say I wanted the press of a button to gotoAndStop(2); inside a different movie clip that is not parented or on the _root?

Posted: January 12th, 2012

View 2 Replies!   View Related
ActionScript 2.0 :: On(release): Displaying A Movieclip -> Waiting -> Jumping To Frame
DISCLAIMER I've just started to learn flash to fulfill a class assigment. This problem probably has a very easy answer, but I can't find it and now I'm getting close to my deadline.

PROLOGUE The title describes what actions I'm trying to put in a button. I'm making a quiz. Each keyframe has a pic and 4 buttons. The correct answer should show a green V onscreen; the wrong answer should show a red X. After one second, it jumps to a new question in a new keyframe. I've made the X and V as both 12-frame movieclips and 1-frame graphics on the library, but can't seem to make them show up correctly.

1st issue: showing the movie clip/graphic. The movieclip/graphic should appear in the center of the stage *after* you press the button. Currently, the clip is there from the start; can't find a way to make it start invisible, then visible when I click the button. 2nd issue: waiting 1 second before going to next frame.I've tried using setInterval, but failed. Maybe the best way is to use a command that waits for the movieclip to play before making the jump?

[Code]...

Posted: October 8th, 2011

View 6 Replies!   View Related
ActionScript 3.0 :: Scrub That Manipulates A MovieClip, But Tracks A Change In Mouse Position From Click To Release?
The other is a scrub that manipulates a MovieClip, but tracks a change in mouse position from click to release, instead of tracking the changes in position of a slider playhead. But here is the download for that one:(sorry not a link due to not having over 50 posts yet, you will need to copy and paste)I have found plenty of AS1+2 ways of doing this idea, yet just haven't found any solid AS3 versions.I am currently in a class to learn Actionscript and have tried to figure out this problem yet I am just not yet to that level.

Posted: 10-25-2010, 08:31 PM

View 0 Replies!   View Related
ActionScript 2.0 :: On Release Of Button "A" Tell Movieclip "B" To Play Frame "X"?
how to express it in Actionscript - can anyone out there translate the following!? On release of button "A" tell movieclip "B" to play frame "X",but if the button has already been released before (or if movieclip "A" is already at frame "X") then on release of button "A" go to frame "Y" instead

Posted: November 21st, 2003

View 3 Replies!   View Related
ActionScript 2.0 :: Revisited Underline Text - When Add The On (release) To The Movie It Doesn't Advance The Timeline On (release)
Underlined Text On (rollOver) Is there an action script to do on (rollover) underline text? It would be on a button that would also, on (release) gotoAndPlay a frame. I know you can have a movie with AS like this:

[Code]....

But when I add the on (release) to the movie it doesnt advance the timeline on (release). And when I change the file to a button instead of a movie clip it doesnt do the underline on (rollOver).

Posted: December 6th, 2005

View 1 Replies!   View Related
Actionscript :: MovieClip Replacement That Converts An Existing Imported MovieClip To A Sequence Of BitmapData
I've written a simple MovieClip replacement that converts an existing imported MovieClip to a sequence of BitmapData. This removes the requirement for Flash to render vector data in the MovieClip on each frame.

But BitmapData has a huge memory footprint. I've tried converting the BitmapData to a ByteArray and using the compress() method. This results in a significantly smaller memory footprint. But it has proven impractical. For each redraw, I tried uncompressing()'ing the ByteArray, then using SetPixels to blit the data to the screen, then re-compressing() the frame. This works but is terribly slow.

So I was wondering if anybody else has an approach I could try. In Flash, is it possible to compress bitmap data in memory and quickly blit it to the screen?

I wonder how native animated GIFs work in Flash. Does it uncompress them to BitmapData behind the scenes, or is frame decompression done on the fly?

Posted: Jun 22 11 at 6:36

View 1 Replies!   View Related
Flash :: Access Dynamically Loaded Movieclip (stage > Scrollpane > Myloader > Movieclip)?
what I'm trying to do is accessingsnapText = scrollPane.source.textSnapshot;from an external swf. I've tried:

trace("-->: "+scrollPane.source.textSnapshot.getText(0, 1000));
trace("-->: "+myLoader.content.textSnapshot.getText(0, 1000));
trace("-->: "+mc.textSnapshot.getText(0, 1000));

[code].....

Posted: Oct 16 11 at 22:39

View 3 Replies!   View Related
ActionScript 3.0 :: Horizontal Scrolling Movieclip That Scrolls When The Mouse Is Left Or Right Of A Certain Point Of That Movieclip
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]...

Posted: 08-11-2009, 07:25 AM

View 1 Replies!   View Related
ActionScript 2.0 :: Activate A RollOver-function When The Mouse Rolls Over A Movieclip Inside Of A Movieclip?
I am trying to activate a rollOver-function when the mouse rolls over a movieclip inside of a movieclip.On the main window (root), first you rollOver a button where a window shows up with more options (movieclips).From stage, my first movieclip is called "catapultas_read_more" which leads to amother movieclip called "pic1_mc". The label that is going to play when mouse over on pic1_mc is "rollOn".I tried this.gotoAndPlay("rollOn); directly inserted to the movieclip, but the movieclip inside pic1_mc never starts

Posted: 04-17-2010, 11:40 AM

View 8 Replies!   View Related
ActionScript 3.0 :: Cast A MovieClip To A Custom Class That Extends MovieClip Called MovieClipExt
i'm trying to cast a MovieClip to a custom Class that extends MovieClip called MovieClipExt

ActionScript Code:
package {
import flash.display.MovieClip;

[Code]....

...but sadly returns null instead of a MovieClip converted to MovieClipExt

what should i change to make this work?

Posted: 06-04-2010, 05:43 PM

View 3 Replies!   View Related
ActionScript 3.0 :: Parent Movieclip Doesn't Listen To Custom Event In The Child Movieclip?
I have movieclip which contains child movieclip. when child movie clip finish to play i want to run a function in a parent movieclip. so I made a custom event dispatcher in the first frame of the child movieclip:

[Code]...

Posted: 10-24-2010, 06:48 PM

View 4 Replies!   View Related
ActionScript 3.0 :: Create A New Movieclip For Each Top-level XML Node And Include In The Movieclip Two Separate Textfields?
My goal with this actionscript is to create a new movieclip for each top-level XML node and include in the movieclip two separate textfields, an image, extend the movieclips to two row if necessary, rotate each movieclip differently depending its parity and add a hover event based on the movieclips instance name. I have achieved each goal except for the hover bit. The reason I cant access the instance name outside of the for loop is because the instance name only lasts for duration of the loop. Here is my current code (at pastie address).

[URL]

Posted: June 4th, 2009

View 3 Replies!   View Related
ActionScript 3.0 :: Hit Test Point NOT Detecting A Bottom Movieclip If The Mouse Is Over The Top Movieclip?
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?

Posted: 10-02-2009, 11:43 AM

View 3 Replies!   View Related
ActionScript 2.0 :: Dragging Movieclip Which Is Dynamically Generated Via Attaching Movieclip From Library
I have a problem with dragging movieclip which is dynamically generated via attaching movieclip from library.I want to move the movieclip by pressing the yellow square within a boundary say 100*4. I am attaching the flash file with this thread.

Posted: 04-12-2010, 01:18 AM

View 1 Replies!   View Related
ActionScript 3.0 :: Event Listener - When The Mouse Rollsover The Movieclip To Go To Frame 3 Of The Movieclip
i've not tried to do anything odd with eventListeners up until now. i have a movieclip with multiple frames that i use AS to attach a textfield to it. problem is i have a eventlistener for when the mouse rollsover the movieclip to go to frame 3 of the movieclip.

[Code]...

what's causing the textfield to suddenly take precedence and how do i stop it. when i trace the evt.target - it is my movieclip.

Posted: Mar 4, 2009 3:18 AM

View 5 Replies!   View Related
Actionscript 3 :: Move Movieclip Position Opposite Of Mouse Coords On Other Movieclip
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.

Posted: Jan 26 11 at 19:30

View 1 Replies!   View Related
Flash :: Address A Named Instance Of A Movieclip From The Class File Of The Movieclip?
I have a movieclip instance named 'placeholder' on the canvas, and I want to change the alpha of the named movieclip from it's class without effecting the alpha of all the movieclips of the same type. How would I specifically target the named movieclip instance that is on the canvas?

Posted: Jun 1 11 at 6:01

View 3 Replies!   View Related
ActionScript 2.0 :: Automatically Unload A Movieclip When The Movie Within The Movieclip Plays Completely?
I need to automatically unload a movieclip when the movie within the movieclip plays completely.

Posted: 10-06-2009, 11:45 AM

View 9 Replies!   View Related
ActionScript 3.0 :: Colorizing Parts Of Walkcycle-movieclip Nexted In Animation Movieclip?
in a game i am doing i have a class called "player" extending MovieClip.this Player MovieClip has multiple frames with animations in it.for example a MovieClip "Walk-right" on frame 2.this walkcycle clip now contains also some sprites/movieclipsone of these i have to colorize in every frame of the walkcycle according to the players color.how can i achieve this?in as1/as2 i used something like: this.clr.setGRB(_parent._parent.myclr)is there a way or do i have to think differently about the way i have to display the animations?

Posted: 12-07-2009, 06:31 PM

View 0 Replies!   View Related
ActionScript 2.0 :: Loading A Movieclip Into The Main Movie From A Previously Loaded Movieclip
Im making a movie with a menu that loads movie clips according to which menu is selected simple enough. However, the newly loaded movie clip also needs to allow the user to load another movie into the main movie effectively swapping the first movie clip with the second. This needs to be done without using the main menu.

Posted: 05-26-2010, 11:03 AM

View 6 Replies!   View Related
ActionScript 3.0 :: Hiding A Movieclip On Stage From Inside A Movieclip Frame Action
I have the scenario below. I have a movieclip on the stage (root). Inside this movieclip I have a frame with the action below:

_root.MCHappy.visible = false;
_root.MCSad.visible = false;
_root.MCNormal.visible = true;

I cant get this working with AS3. How is the correct way to do that inside a MovieClip with AS3?

Posted: 05-04-2011, 03:43 PM

View 6 Replies!   View Related
Copyright 2005-08 www.BigResource.com, All rights reserved