IDE :: When A MC Hits A MC

Jul 9, 2009

I'm making a small adventure game, and I want the game to go to the next frame once the main guy MC hits another invisible mc, like where the door is. I suppose another way of doing this is when the main guy mc hits an xy coordinate. So basically what I want is a script that says, when MainguyMC hit another MC/ coordinate, go to frame 2

View 14 Replies


Similar Posts:


Object - Two Movieclips In CS5 Hits?

Dec 5, 2010

I have two movieclips A and B when the movieclip A hits the movieclip B , I want the movieclip A to be removed what code should i write for this flash problem ?

View 1 Replies

ActionScript 3.0 :: Only Removes The First One That Hits?

Nov 1, 2009

I want it to remove everyone that it hits, but it only removes the first one that hits. I am sure the answer is simple, but i am slow. Here is the code:

ActionScript Code:
function removeSpawn(){
for(j=0;j<lvl1A;j++){

[code]......

View 1 Replies

ActionScript 2.0 :: Get The Box To Trace When It Hits Mc2?

Aug 5, 2005

_root>mc1>mc2>box

The box got this code:

PHP Code:

onClipEvent (enterFrame) {if (_parent.hitTest(this)) { trace("hitting"); }}

I want the box to trace when it hits mc2, but it don't works!

View 3 Replies

ActionScript 2.0 :: 2 Mc's Hits Each Other They Dissappear

Jul 13, 2007

I have 2 movie clips with a linkage. In a process both mc's are being attached lots of times and a new name is given to each every time.I want to make it so that is these 2 mc's hits each other they dissappear, but i can't do that because they all have different names and i don't know how to call to them.

View 1 Replies

ActionScript 3.0 :: Know When FLV Hits Certain Point?

Mar 23, 2009

Is there a way to keep track when an FLV hits a certain point in its playback WITHOUT using cue points? If so, how is this implemented and does it make the experience sluggish?

View 3 Replies

ActionScript 2.0 :: When The Timer Hits 10 Want It To Go To Frame 2?

Mar 18, 2009

When the timer hits 10 I want it to go to frame 2.Here is the script:

var clock:Number = 0;
if (Number == 10){
gotoAndPlay (2);

[code].....

View 4 Replies

ActionScript 2.0 :: Flash8 Xmouse Hits A MC

Apr 9, 2009

I want a hittest of the _root.mouse and a mc when the mouse is down.

I tried among other things this but it doesnt work.

this.onMouseDown = function(){
if ((_level0._xmouse == boll._x )&&(_level0._ymouse == boll._y )){
trace("down");
}
}

View 3 Replies

Make A Visitor Hits Counter Using Just AS2?

Jun 4, 2009

Is it possible to make a visitor hits counter using just AS2 ?

Or what is the other way to do this ?

The site is totally in flash only.

View 4 Replies

ActionScript 3.0 :: Countdown Timer Hits Zero

Dec 15, 2009

Im looking to make something happen when my timer of 30seconds reaches zero. This is the code I've used: how to ad a function that will make something else happen??

[Code]...

View 5 Replies

ActionScript 3.0 :: Stop An Object When It Hits Another?

Nov 12, 2009

Im making a sort of maze game and have a ball that moves up, down, left and right when the corresponding arrow key is pressed. What I want to do now is introduce some walls, how do I make the ball stop moving when it touches a wall? (so it doesnt pass through the wall)

View 1 Replies

ActionScript 2.0 :: Show How Often A Certain Number Hits?

Nov 29, 2010

i make simple random tester. it show how often a certain number hits.

View 0 Replies

ActionScript 3.0 :: HitTest Only Hits One Target?

Apr 29, 2009

Basically the code creates 3 sasquatches. When you click on the sasquatch it displays "you be dead sucka!", well, only ONE of the 3 sasquatches are registering hits, and the one that does traces "you be dead" 4 times.

package{
import flash.display.*;
import flash.events.*;

[code].....

View 9 Replies

ActionScript 3.0 :: Remove Itself Once Mc Hits Certain Frame

May 15, 2009

I'm initiating my migration process from AS2 to AS3 .After reading A LOT of tutorials and, of course, pretty much everything that mister senocular wrote I finally got something going Well until this pickle[code]...

View 8 Replies

ActionScript 3.0 :: When A Circle Hits A Square

Oct 15, 2009

i would like to know when a circle hits a square.Following code returns true when the rectangle of the MovieClip (blue) hits the square and not the circle itself:

circle.hitTestObject(square);

In as2 you had an extra parameter to indicate that.

View 3 Replies

Professional :: Flash Not Reading My Button Hits?

Sep 23, 2010

One of my buttons, flash will not read it as a button when I publish it and run the swf file. The cursor stays as a arrow meaning its not a button in the swf file. Inside of the fla file it is a button with a hit. There is no movie or tweening or anything like that. I think it's not reading it as a button because Flash is placing the hit behind the actual button. Inside of my button there is only 1 layer. When placing the hit usually it covers the button. But in this case, the hit is going behind the image. I think this is why when its ran, its not reading it as a button.

I even removed the AS3 code from the button to see if it was a coding error. Rather if theres code in there or not the swf should still read it as a button and the cursor should change to a hand by default. Because of this, I tried to create another button in another area on the stage to see if it's just that one area thats having that problem. I created a new button from scratch, placed a hit, no AS3 coding added, and it works. The swf reads it as a button. But with that button, I added a AS3 CODE to go to an external website and now Flash isnt reading the AS3 code for that button. Heres the code:
 
import flash.net.URLRequest;import flash.display.Loader;import flash.net.navigateToURL;
itunesBTN.addEventListener(MouseEvent.CLICK, gotoITUNES);
function gotoITUNES (event:MouseEvent):void{  var req:URLRequest = new

[code].....

View 1 Replies

Professional :: Get 0 Hits On The Keywords Scrollbar And Scrollpane?

Mar 25, 2011

Is the forum-specific search broken? I get 0 hits on the keywords scrollbar and scrollpane, but what's more curious is I get 0 hits on the word movieClip.

View 1 Replies

Flash - Get The Blue Object To Disappear Once It Hits A Red One?

Jul 23, 2011

I have a grid of objects that have been added to the stage dynamically, the objects are either of a Class Red or Class Blue, how do I perform a hit test on the Classes? I want the Blue object to disappear once it hits a Red one.

View 3 Replies

ActionScript 3.0 :: Use An Array To Manage Multiple Hits?

Sep 12, 2010

I been trying to get a remove child function to it seems to work sometimes at least according to the output window. But the majority of times when ghost hits a flame the flame doesn't disappear.

heres the code so far it would explain it better

virtuallife_forum_1.zip

Should I use an array to manage multiple hits?

View 0 Replies

ActionScript 3.0 :: Audio Hits During The Video Scrub

Jun 29, 2011

I've made a video scrubber for a couple of external F4Vs in my movie. I'm using 2 setIntervals for the scrub function: 1 to move my video playhead as the video plays, and 2 to seek to the correct video frame as the user drags the playhead.

This seems to be working ok. I wish it was a little bit more fluid in the scrub action, but I'll take what I can at this point.

But, one thing I'd like to work on is the audio hits during the video scrub. As the netstream seek is happening, the audio is hitting while I scrub. I'd like to temporarily kill the audio as I scrub, and then bring it back on at the MOUSE_UP.

I'm pretty sure that SoundMixer.stopAll(); will get rid of my audio, but what will make it come back?

View 2 Replies

ActionScript 2.0 :: Make Something Stop When It Hits Another Thing?

Jan 7, 2004

I am wanting to make a game, and I need a gravity code that works great. I want gravity, a jumpibg code, and then a code to make something stop when it hits another thing.

View 2 Replies

ActionScript 2.0 :: Goto Certain Frame When Variable Hits 0

Jul 15, 2008

This doesn't work
if (lives <= 0) {
gotoAndStop(22);
}
When I change the "<=" to something like "!=" it does work. I'm trying to make it go to a certain frame when the variable hits 0

View 8 Replies

ActionScript 2.0 :: Playing Sound When One Object Hits Another?

Jul 30, 2008

I am creating a kids game in AS 1 and want a "good" sound to play when a "good" object falls into the beavers basket and a "bad" sound to play when it falls into the basket. What is the best way to handle this in AS 1?

View 3 Replies

ActionScript 2.0 :: StopDrag When Window Hits X And Y Cord

Apr 7, 2009

I have a window that is dragable, but I want it to stop dragging not only on the release but when it hits a certain x and y cord. Here is my function:

Code:
function windowDragon(){
_root.partners_container_resize.partners_container.vidWin_Panasonic.vidWinheader_panasonic.onPress = function(){
_root.partners_container_resize.partners_container.vidWin_Panasonic.startDrag();
[Code] .....

View 2 Replies

ActionScript 3.0 :: Make A Bullet Disappear When It Hits A Target?

Jul 30, 2011

I have created a class named Bullet() and I create a child named bullet_mc every second.This bullet_mc moves to a direction on the stage.I also created a class named Plane() and I create a child named myPlane_mc every two seconds. Also, every myPlane_mc moves to a direction on the stage.

View 5 Replies

ActionScript 3.0 :: Make It So Once One Instance Hits The Last Frame It Is Removed?

Oct 16, 2011

I have a movie clip that I want to be generated over and over again from the library at a random interval, and when the movie clip hits last frame I want it removed.Here is how I am generating it:

function Spawn():void {
var Poof:Puff = new Puff;
addChildAt (Poof,0)

[code]........

View 9 Replies

ActionScript 2.0 :: Get A Movie Clip To Play Once When My Character Hits It?

Aug 24, 2007

I've got a problem with a game I am creating, I want a movie clip to play once when my character hits it, it has a stop function at the end of the movie clip, but as long as the character is on top of it, it continues to loop, how do I get it to stop at the last frame?
Here is the script applied to the movie clip:

onClipEvent (enterFrame) {
if (this.hitTest(_root.bubMC)) {
play();
}
}

All I've been able to do was make the last frame extremely long and load an alternate movieclip without the hittest function applied that runs the animation.Essentially, I am asking, "How do I make a piece of actionscript run only once", like:

onClipEvent (enterFrame) {
if (this.hitTest(_root.bubMC)) {
play(ONLY ONCE BUT AFTER THAT DON'T DO IT AGAIN);
}
}

View 1 Replies

ActionScript 3.0 :: Looping Through XML Attributes Hits Only Last Item In The List?

Jun 24, 2010

I am trying to loop through an XMLList of attributes on an arbitrary XML node, using a "for each in" loop. I can't figure out why the loop is only hitting the last attribute in the list.

var xml:XML = <myXML attr1="val1" attr2="val2" attr3="val3" />
for each (var attr:XML in xml.attributes());
{

[code]......

View 4 Replies

ActionScript 3.0 :: Trace When Play Head Hits A Frame Label?

Mar 24, 2009

would like flash to trace something when the play head goes over a frame label named "test" I would also like to have the code placed on the first key frame. I realize that the easiest way out would be to place the trace statement on the frame with the label on it but I'm trying to run this with a listener.

PHP Code:
stage.addEventListener(Event.ENTER_FRAME, checkFrame,false,0,true);
function checkFrame(event:Event):void

[code]....

View 2 Replies

ActionScript 2.0 :: _root.gotoAndPlay(4) Won't Go To The Frame After The Score Counter Hits

May 4, 2009

my name is fabo i made a flash game and i need help with this script:

score = 0;
var Seconds = 10;
function timer():Void {
_root.Seconds -= 1;
}
setInterval(timer,1000);
if (_root.time == 0) {
_root.gotoAndPlay(4);
}
stop();

where it say: _root.gotoAndPlay(4) it won't go to the frame after the score counter hits

View 12 Replies







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