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.
first i have 2 sprite.. it`s mcproduct sprite and mcproductpane sprite . mcproductpane is a parent of mcproduct sprite.. so inside mcproductpane there a several mcproduct sprite.. this is a script of mc prodcut
[Code]...
The problem is i want to set a button in here(mcproductpane sprite), this button will unload / make dissappear an image that i load using loader class in mcproduct sprite.. when i want to make a button in mcproductpane sprite which the function of the button it`s to unload/make an image that i load using loader class in mcproduct sprite disappear..
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
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 ?
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++){
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?
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??
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)
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.
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]...
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.
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
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.
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.
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.
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?
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.
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
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?
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.
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)
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); } }