Actionscript :: Way To Erase / Delete Every Place Coin Passes Over Stage
Feb 9, 2010
I have a project I'm working on and I am really stumped on making a seemingly simple animation work.The animation is of a coin scratching off a layer to reveal the layer beneath. I have the coin animated, and the layers in place. I am wanting to know if there is a way to erase/delete every place the coin passes over the stage, revealing the layer beneath. I've seen animations where ActionScript is used to allow a user to control the coin/pointer and activate the "scratch-off" effect. However, I am trying to come up with a method that is not a user-initiated animation since I want the effect to repeat in several places in the timeline.For the life of me I cannot figure out how to make this work. I am a moderately skilled Flash user and an ActionScript novice.
View 1 Replies
Similar Posts:
Oct 20, 2010
For a game where I have a different level on a screen how do I do this? Do I need to erase the stage and place a new level on it or is there a wat to have another stage?
View 5 Replies
Mar 26, 2011
My problem is with score counting, i have a score field, a main character and 5 coins.When the character collides with the coin the following happens:1. The coin disappears (Supposed to happen)2. Adds 1 point to the score (doesn't work the way it should)What happens is (i have set the score field to start at 0 with (_root.score = 0 this for some reason doesn't have any affect.Only the first coin to be hit adds (1) to the score, after hitting a second it completely disappears. Also have it set so that if the score goes to 5, the door in the top left will open. (NOTE: for some reason this seems to work, if you "collect" all the coins the door will open, but the SCORE field doesn't show the number)
View 1 Replies
Apr 8, 2005
how can i duplicate a movie clip and then place it on a certain place on the stage
View 5 Replies
Aug 21, 2010
I've used .x = and .y = with the position I want and the pane continues to show up in the top left corner instead. What am I doing wrong?
View 2 Replies
Jan 9, 2009
Im building a pretty simple drawing board in flash, i got this code from this forum and it works fine (there is more to it but this is the drawing part)[code]This works fine. But i want to be able to erase the drawings, step by step this is ths tricky part, ive looked everywhere(ok not everywhere) but in a whole lot of places but the only thing i found is how i could delete everything with removeChild and that in not what i want. Maybe i need to change the function abowe? Please help me to get in the right direction. What should i read about /look at?
View 5 Replies
Jul 7, 2005
I have made this flash thing. And it makes mcs on stage, and i have a button where i want to delete them all but cuzrrently my button deletes 1 at a time.I want it to delete all of thwem at 1 time
View 1 Replies
Sep 17, 2004
Need to delete a movieclip off of the stage. It's messing with my button focus. Setting it to invisible isn't working.
View 2 Replies
Apr 7, 2011
I've read many many articles and I've asked others if the can help, but I'm stumped. The functionality I'm looking for apparently works in CS5 of as3, but it's not working in my cs4 version of as3.
This is what I'm trying to do. I've created a first person shooter game. I have bullets come out of a gun and hit the bad guys. When the bad guys are hit, I want to do the following -
1. make the bad guy and bullet invisible - done, works.
2. remove all references to both the bad guy object and bullet object - done, seems to work.
3. delete the bad guy object and the bullet object from the stage - doesn't work, can't seem to figure out why not.[code]...
View 5 Replies
Sep 17, 2004
Need to delete a movieclip off of the stage. It's messing with my button focus.Setting it to invisible isn't helping.
View 2 Replies
Jan 31, 2009
I've been working on my new flash site for a few weeks, along with learning AS3, tackling problems as I encounter them and I've learned a lot...but sometimes the simplest things I cannot figure out for the life of me.
All I am trying to do is have some flash banner SWF files I created play within the portfolio page of my site. I don't want them to open in a pop up or anything just play within the page when the link on my site is clicked. I figured it would act like a movie clip and I could just drop it onto the stage, but when I do that it doesn't look right, loops continuously, and is not interactive.
View 1 Replies
May 19, 2011
Is it possible to place a PDF onto the stage and add it to the display list? Are there plugins out there that can accomplish this?
View 3 Replies
May 10, 2011
In this .swf where can I place the stage color? I am using the[url].... and it made the stage color black? Which is suppose to be #999 .HERE IS THE CODE SCRIPT:
<object width="600" height="409"> <param name="movie" value="http://fpdownload.adobe.com/strobe/FlashMediaPlayback.swf"></param><param name="flashvars" value="src=http%3A%2F%2Fgfdesignwise.com%2Fjbm_sit e%2Fvideo%2Fsplash.swf&controlBarMode=none&playBut [code].....
View 11 Replies
Feb 18, 2009
How can I delete a drawn object from the stage to then use the same function to draw it up again?
View 1 Replies
Jul 5, 2011
How can I delete Movieclip and its effects from the stage by as3?
View 2 Replies
Jul 30, 2009
I want to place my duplicates about one third down from the top and in a small bit from the left. Roughly centre them on stage. My code so far:
for (var i = 1; i <= 6; i++){ duplicateMovieClip ("fish_mc", "fish_mc" + i, i); _root["fish_mc" + i]._x = 500 * Math.random (); _root["fish_mc" + i]._y = 350 * Math.random ();}
View 9 Replies
Feb 7, 2010
if i make say a button in my timeline, convert it to a button. and then remove it from the stage (it is still in the library) in my exeternal .as file how can i then place that movieclip on the stage? i know how to do this within the timeline, but not when it is an external .as file.
View 7 Replies
Feb 12, 2010
The player controls the character with their mouse - it follows their cursor. I'm trying to make an environment continually scroll from the right hand side of the screen to the left - much like in Canabalt (click to see). I've been trying to do this with tweens, but it doesn't seem like it's going to be the most efficient way of doing it... Plus Flash keeps dying on me whenever I try to do it.
I have a couple of background images, and then I have objects in the foreground that the player is going to destroy by mousing the character over them. How do I get Actionscript 3 to place instances of movieclips on the screen at certain points, and make them to scroll from the right of the screen to the left? I have a lot of different movieclips to use, so it'd also be great if they could be removed from the stage once they reach a certain point.
View 2 Replies
Jul 31, 2010
I have made many small swf files for each section of my website. The problem is now I want to club them all together to avoid breaks and showing of the loader at inappropriate moments, I know that was poor planning on my part. I want to know I can place an external swf onto the stage, so that it gets loaded with the main swf. As in, I don't want to call a loadMovie or loadClip
View 1 Replies
Feb 1, 2011
I have two artworks on stage which have a common shape within the artwork. I need to make the one I have just added to stage fit the prior one by getting that common shape the same size for both. In Freehand I would drag the junction of the two rulers out onto stage to the left edge of the item, to create a zero point from which to take a measurement. I would drag a guide out to the right edge and read from the info panel an x value, thats my width, or double click the guide to get a reading from the guides palette. Repeat that for the other artwork then get a calculator and divide one measurement by the other to work out the scaling factor I need.
How in CS5 Flash does one place a ruler zero point on stage ? I can drag guides out, but how do I make the left hand guide to be zero ?
View 2 Replies
Sep 10, 2010
I'm trying to dynamically place instances of MovieClip on the stage. Receiving an error:
TypeError: Error #2007: Parameter child must be non-null.
at flash.display::DisplayObjectContainer/addChild()
ActionScript:
// properties in class ----------
var circle_ary:Array = new Array;
var circ_num:int;//number of circles on the stage.
[code]....
View 1 Replies
Jan 20, 2009
I used below scripts for drawing on stage. but I want draw on specific place of stage not all of them.How can I define that zone ?
ActionScript Code:
this.createEmptyMovieClip("drawing_mc",this.getNextHighestDepth());
this.onMouseDown = function() {[code].....
View 0 Replies
Mar 29, 2011
I just noticed that when you place a text field on the stage using code:
Code:
var texter:TextField = new TextField();
texter.defaultTextFormat = new TextFormat("Impact", 68, 0xffffff);
texter.text = "890";
[code]....
It does not look the same as a text field that I placed on the stage in the Flash editer. The text created by code has very harsh edges, but the other text has smooth edges. How can I get my code TextField to look like the editor Text Field?
View 3 Replies
Dec 15, 2009
Basically I have manually built these MC's onto the stage. I want to delete one of them when an event is complete.
Here is how it looks. Keep in mind it doesn't work at all. I guess the catch is that these MC's are manually placed on stage I get an error msg: 1120 access of undefined property.
Code: Select allMyGallery.Pic1.removeChild(LB);
its built like this
MyGallery.Pic1.LB
View 2 Replies
Jul 3, 2006
I want to load some mcs randomly on the stage, except for a footer area at the bottom of the stage. Is there a way to exclude just a certain part of the stage using something like Math.random()*Stage and then specifying the bottom 300 pixels as off limits?
I'm using the whole stage because the swf is embedded 100% across the browser, so I can't restrict the dimensions.
Code:
onClipEvent (load) {
x = this._x=Math.random()*Stage.width;
y = this._y=Math.random()*Stage.height;
}
View 14 Replies
Oct 5, 2006
How can I choose the right place/ position of a swf on a stage?
View 7 Replies
Oct 7, 2006
I've been working on this for over 3 hours and it is about to drive me crazy! I was one of those people who never paid attention to math in high school because i thought i would never use it ( i knew i wanted to be an artist/designer of some sort). But now of course, that attitude is coming back to haunt me. I'm using a for loop to place several objects on stage. I need a formula that will space objects along the x axis evenly, and center all the objects on the stage. Kinda like if you use the align panel in flash to distibute the vertical centers of several objects to the stage, if that makes sense. If there is only one item, it should be directly in the center of the stage. If there are 2, it should place them in the center of the 2 halves of the stage, and so on for howeve many objects there are. I also want a buffer of about 25 pixels on either edge of the stage so that no object is ever on the very edge of the stage. I made a simple diagram to illustrate:
View 5 Replies
Aug 30, 2009
Just wondering How I would place the Flex button component on the stage with actionscript and make it execute a function when pressed...this is easy in MXML:
PHP Code:
<mx:Button label="Button" click="function();"/>
but I need to do it with actionscript..
View 1 Replies
Sep 9, 2009
I have a movieclip which is added to the stage every second at a random place.i want all instances of this movieclip to move to the postion x=100px and y=200px on the stage at a rate of 5px.im not sure how to code this, i would like the code to be in as3 if possile as i do not know as2.
View 2 Replies
Apr 18, 2009
My requirement/need is the AS3 code for placing any type of Component(viz., Button, CheckBox, ComboBox, ListBox, radiobutton, Slider, Scrollbar,Label,TextField, etc.,) on the stage with desired width,height, X and Y parameters(values) which we mention in "Properties" tab of Properties Window in flash. Hence, What i need is, (say)a generic ActionScript 3.0 method/function, which places any of the components present in "Components Panel" onto the stage. the function prototype or signature may be like this:
function addComponent(int <width>, int <height>, int <XPos>, int <YPos>)
t is a general query i think so. i.e., A basic programmer's task for defining a function for my requirement.I think,if I want to add a Button onto the stage at 100,100 pixel position and the button component's width and height are 50,50 respectively, (i.e., button.X=button.Y=100 && button.width=button.height=50).So, a button must be placed at 100,100, then, the sample code looks like this:
Button <btn_instance> = new Button(); //creates Button instance
<btn_instance>.addComponent(50,50,100,100);// properties of button.
View 2 Replies