ActionScript 2.0 :: Removing Parts Of A Shape (Destructible Terrain)
Feb 28, 2006
Does anyone know how to remove parts of a shape (in a movieclip) using actionscript? Something like reverse masking (where the opaque parts hide the image) or just actually modifying the shape. I've seen it done, but I have no idea how to do it. I've tried using masks, and I saw something about masking the mask but when using setMask() you cant mask a mask. I'm looking for an effect much like the explosions in Serious Santa at NewGrounds [URL]
View 1 Replies
Similar Posts:
Sep 24, 2011
When I draw a path with the pen tool, and fill it, it seems as if the shape now has two parts. If I drag the filled area around, it's breaking apart from the path (or border). So how can I make this one entity?
View 3 Replies
Feb 4, 2011
I have some code that builds a shape and adds a shadow filter. If I use a single call to make the shape, like drawRect() or drawRoundRect() all looks fine including the shadow. However, when I do something like:
Code:
shape= new Shape();
shape.graphics.beginFill(0xfffffff, 1);
shape.drawRect();[code]...
The boundaries of these draw calls do overlap each other. The final shape by itself looks fine. But as soon as I add the shadow filter, parts of the shape get transparent. I belief it has to do with the various draw calls within begin and end fill.
View 1 Replies
Feb 23, 2011
I have a bunch of movieclips called firstNameBtn_mc, lastNameBtn_mc and many others. I also have a bunch of movieclips whose names start with the same but instead of "Btn" they have "Arrow", like firstNameArrow_mc, lastNameArrow_mc etc.
What I want is when I click on firstNameBtn_mc it does somthing to firstNameArrow_mc, but there are so many buttons I would like to do it in the following way.
1. get the movie clip's name...something with e.currentTarget.name for example
2. remove the Btn_mc part
3. add the Arrow_mc part
4. do something to the movieclip of that name
View 5 Replies
Nov 6, 2010
I'm doing a project at the moment where I am creating a side scrolling platformer in AS3. Currently I have:
-The "Character' which is a ball that can be controlled using the arrow keys and has bounce, friction, gravity etc.
-A scrolling system, the character can move freely within an invisible inner boundary, once the character leaves this boundary the background will scroll to compensate.
The thing I am having issues with is creating collision detection between the "Character" and the "Background.Ground" so that the character can move along the shape of the Ground movieclip within the background movieclip.
Actionscript Code:
package{
import flash.display.Sprite;
import flash.events.Event;
import flash.display.MovieClip;
import flash.display.Stage;
import flash.geom.Transform;
import flash.events.KeyboardEvent;
[Code] .....
View 21 Replies
Nov 15, 2009
I'm trying to make a realistic scrolling terrain for a game I'm making. all of the movement and collision detection is 2d, but I need to make the terrain look more real.
does anyone have an algorithm for simulating a 3d terrain in 2d with the geom.Matrix class?
I know how to implement one, but I'm not sure about the logic for a transformation like this
View 0 Replies
Mar 11, 2005
How do you make destructable terrain in a game?
View 1 Replies
Dec 3, 2011
I'm trying to create simple 2D action game, something similar to well known Fancy Pants Adventures :) I've been looking for answer for more than week and all I've found is [URL] which not answers the question. (I've found also moving on platforms that are rotated but that's not I'm looking for). I have also found great (and free!) flash game engine - CitrusEngine which I'm currently using, but, it doesn't provide moving hero along curved terrain. How to make hero moving along curved terrain like this one: [URL]. There are plenty of games like this (for ex. Fancy Pants or Robot Unicorn Attack) where main character moves along the curved terrain but I can't find answer how can I do that.
View 2 Replies
Jul 12, 2004
I've been trying to use ActionScript to create an isometric pseudo3d terrain generator thing, using a dot movie clip. I come from a C programming background and i thought it'd be pretty easy to just attach a load of movie clips to the stage and put them all (well references to them) into a 2d array so i could call back to them with ease for the moving and the jiggery pokery
[Code]...
View 2 Replies
Aug 13, 2009
I've created a game engine using bitmaps and box2D, the floors for the game engine is made out of a number of lines which then has a bitmap fill applied to it, then it adds a little bit of grass on top of these floors....Here's a quick video to show you what I'm talking about:http:[url].....
This all works fine on my main computer, but when I move over to my netbook, I struggle to get 10fps... Because of this I am now looking for as many ways as possible to improve the efficiency of my code. So far what I've done that appears to of had some positive effect is:
- Use bitmapCaching on layers where it's appropriate to do so.
- Use scrollRect to scroll on only the necessary part of each of the layers.
However I'm still having big problems when it comes to scrolling the terrain on my netbook - are there any ideas that anyone might have which might be able to speed up the game slightly?
View 1 Replies
Nov 12, 2011
i need to make scrolling terrain but dont have how to do it for the code? What i want to do is 5 objects lets call them A,B,C,D,E scroll down the screen in random positions
View 15 Replies
Aug 15, 2005
I was unable to find any good tutorials or hints on terrain scrollers that isn't random.. like a huge world, and a map that points where on the map you are.
View 4 Replies
Nov 30, 2009
ActionScript Code:
package {
import flash.display.MovieClip;
public class Base extends MovieClip {
public var baseHP:int = 50;
var newRect:Shape = new Shape();
1046: Type was not found or was not a compile-time constant: Shape. 1180: Call to a possibly undefined method Shape. What does it mean by "undefined method"? I am somewhat of a newby, so sorry if there are any stupid errors
View 1 Replies
Jun 22, 2010
Whenever I add shape hints to a shape tween the shape disappears in the between frames. I am using CS5 on Vista. I using files from [URL]to practice.
View 2 Replies
Oct 11, 2011
need to draw the shape of a existing movieclip which is irregular shape.
View 2 Replies
Oct 11, 2011
need to draw the shape of a existing movieclip which is irregular shape.
View 1 Replies
Jul 9, 2009
Id like to know if there is a way to do a shape hitTest.Not as the normal hitTest would do, but shape colliding another shape, not the rectangleof a movieclip.It can be in a movieclip.
View 23 Replies
Oct 19, 2010
using the shape tool you can draw basic shapesthen using the subselection tool you can re-shape them by relocating certain points
What i want to do is create a tween whereby one of the points is movedthe problem is you have to convert to a symbol first and after you have done that you cant change the shapes shape.so how do i go about using a motion tween to change the shape of a shape?
View 1 Replies
Aug 31, 2010
my friend make me doing a map (in ActionScript). After the click on the some place in the map starts the redirect, e.g.
Code:
on (release) {
getURL("http://www.yahoo.com/"_blank);
}
I'm not a flash developer, but I would be to want add the every part of the map a identificator, e.g. id="part1"
PS: I have now the map, where every part have some ID. After the click on that ID I call jQuery event 'click' -- and this I need also in the new flash map.. Is it?
View 1 Replies
Aug 5, 2010
Is it possible to make something like the "Bone tool" does in older Flash CS3?I mean make all limbs for a character and connect them together in the joints, so if I drag the hand, the rest of the arm follows in a natural way. So I can easly make motion tween animations.
View 3 Replies
May 5, 2011
I have a project where I need to have a video clip play as soon as the SWF starts, and once it's done, the video stops at the end and a prompt to continue appears to transition into another video.I just need to figure out how to handle the video parts of this project, and I need to do this without showing any playback controls on the screan.
View 1 Replies
Feb 6, 2009
I have created a flash file and the company I have created it for now wants the fla.so they can make changes to certain parts of the action script. There are some elements that I want to protect as it took me months to develop. Can anybody give me a solution of how I can send them the FLA but at the same time protect the most important parts of my code? I was thinking that I could maybe create an external .as file for the bits of code that they want to change and like my fla to those parts.
View 3 Replies
Oct 23, 2009
Well, I've been using flash a while, but I just ran into a newbie problem.. I must have hit some sort of hotkey, but I can't figure out how to undo it or anything in the preferences. Anyways, I'm running Flash CS4 and normally when you draw a shape and select that shape it selects the fill and it looks like little dots all over the shape when its selected. Now when I click on a shape it has a border around it and I can't just select a piece of the shape. Also, what's bothering me is that when you draw two shapes on top of each other, Flash used to merge those shapes automatically, but now they are staying separate unless I manually Union them. It still says they're drawing objects, its not converting them to symbols or anything, but they are kind of acting like symbols in the way I can interact with them. How can I turn this setting off?
View 2 Replies
Jan 13, 2010
I saw a website where a video was breaking up in 2 parts.Is there an easy way to do that
View 7 Replies
Sep 15, 2010
I'm trying to take a string and break it into two parts. It's a url to a video on a RTMP server.So I've got to take this:
[URL] person17/1031617_person_generic_700kbps (note the removal of the ".flv" which is necessary as well).Right now I'm doing this, which seems overly complicated:
Code:
videoURL="rtmpe://emediadev.mysite.com/ffw/person17/1031617_person_generic_700kbps.flv";
videoURL=videoURL.substr(0,videoURL.length-4); //remove ".flv"
var urlArray:Array=videoURL.split("/");
[code]....
View 1 Replies
Nov 26, 2009
I have a TextField object and i want to apply the bevelFilter object with some settings to a part of the textfield and with other settings to the other part of the textfield, like the textField.setTextFormat() does it.
View 1 Replies
Aug 24, 2010
How do I make an animation play and pause when I click. Meaning.. I want it to play part the first 10 frames when I click, and then stop. Then when I click again it will play from frame 11 to 20, then I click again it plays 21 to 30.
View 3 Replies
Jan 11, 2011
usually it can be solved with the "wmode transparent" param, but in firefox i have a strange problem. when i overlay a flash element with a part of a div the div renders strange (like stairs at the border of the flash element)
[URL]
the grey area (and a small transparent area above) is the flash element. the outline is the div with a border.
the error occurs only on FF (i have 3.6) chrome/safari works fine...
CODE:
its an swfobject implementation. the overlaying div/ul is positioned after the
flash-wrapper.
<div id="flash-wrapper">
<object width="740" height="500" type="application/x-shockwave-flash"
[Code].....
View 1 Replies
May 27, 2011
I'm thinking about distributing bytes of a SWF into multiple files, how can i put a set of bytes in different parts into one byte array?
[Code]...
Also would reading partial bytes into a byte array work?
View 1 Replies
Sep 30, 2009
I have an XML document with different companies and links to different text sources such as "about" etc for each firm.
Now in my company presentation class I want to send an ID reference so if a user clicks on Microsoft the links point to Microsofts information etc. Im loading all other information through another XML and everything works fine, its just the links I cant seem to figure out.
This is my XML
ActionScript Code:
<?xml version="1.0" encoding="utf-8" ?>
<data>
<company id="1">
[Code]......
View 1 Replies