ActionScript 2.0 :: AS3: Delete The Specific Shape?

Sep 29, 2009

I've made a functions which creates rectangles:

function makeSquare(sgu:String,clo:uint):void {
var squ:Sprite = new Sprite();
addChild(squ);

[code]....

Now my problem is; that i'm from another function would like to make a call, that deletes a specific rectangle previously generated by the above function.

View 9 Replies


Similar Posts:


Delete A Shape For Real In JSFL?

Sep 24, 2009

I have this big JSFL project I'm working on that involves deleting a raw shape (ungrouped) and then replacing it with another one. The problem is that the original shape doesn't always actually get erased (I haven't figured out the precise circumstances where this happens yet though).  Even if it does get deleted, though, when I draw the new shape on the stage (using Path.makeShape), the new shape has extra vertices where its edges cross those of the original shape. So even if I end up with the correct-looking shape on the stage without the one that was there before, my shape I just created is likely to have extraneous vertices (and I need the vertices to be unchanged).

View 2 Replies

ActionScript 3.0 :: Delete A Particular Part Of A Shape?

Jul 1, 2011

I am working in a complicated shape manuplation project. In that user can join 2 shapes , he can duplicate, he can delete a particular part of a shape ect;
 
In the following code copies a shape and adds to stage.
  
import flash.display.Shape;
var sh1:Shape = new Shape();
sh1.graphics.lineStyle(2,0x000000);sh1.graphics.drawRect(45,45,100,100);addChild(sh1);trace(sh1.x);trace(sh1.y);sh1.rotation = 45;
 
[Code]... 
 
In this all the properties of sh1 copied except the rotation value. But i dont want to assign it directly like sh2.rotation = sh1.rotation;

View 3 Replies

ActionScript 3.0 :: Delete Line Shape If Button Is Pressed Again?

Mar 8, 2010

I have a line that is being drawn following a route when a play button is pushed. At the end of the movieclip the whole route is shown with the beginning and end. How do I clear that line if the user hits play again? Right now it connects the beginning and ending points and creates another line on top of the old one.

Actionscript Code:

var shape : Shape = new Shape();shape.graphics.lineStyle( 4, 0x9C1E26);shape.graphics.moveTo( arrow.x, arrow.y );addChild( shape );addEventListener( Event.ENTER_FRAME, loop );function loop( event : Event ) : void{    shape.graphics.lineTo( arrow.x, arrow.y );}

View 1 Replies

Actionscript 3 :: Using Arrays To Delete A Specific Child?

Nov 25, 2011

I am creating a game in which bubbles with simple math equations are falling from the top of the screen, and you have to enter in the answer to make the specific bubble disappear. The only problem is that I need a system that can delete the bubble(s) corresponding to the answer. I'm using an Actions-Frame code and a mathBubble AS class. I will show the frame code first.

stop();
var cooldown:int = 200;
var cooldownMax:int = 200;
inputAnswer.restrict = "^A-Za-z";

[Code].....

Reading the code is not completely necessary, I was just wondering if anybody could explain how I could use arrays to remove every child with the same answer as the randomized answer each child contains through variables "mathAnswer" and "mathAnswerString"

View 1 Replies

Actionscript 3 :: Delete Specific Attributes From All The Descendants In XML?

Feb 27, 2012

i have an XML like

var test:XML = new XML( <record id="5" name="AccountTransactions"
<field id="34" type="Nuber"/>
</record>);

i want to remove all the attributes other than id and type in all nodes of XML. by this code i am unable to do this. can you suggest better solution, other than loops.

var atts:XMLListCollection = new XMLListCollection(test.descendants().attributes().((localName() != "id") && (localName() != "type")));
atts.removeAll(); trace(test)

it still show all attributes.

View 2 Replies

Flash - JSFL: Delete All Strokes Which Match A Specific Color?

Jul 2, 2010

I'm looking for a jsfl function that can select all items on a frame and delete all strokes that match a specific color such as #0000ff

Basically I make a lot of notes with the pencil tool using red pencil strokes. But when Im done I just want to tell flash to delete all my red stokes from the screen and leave everything else intact. Any solutions to this?

View 1 Replies

ActionScript 2.0 :: Delete Specific Movie Clip From Shared Object?

Jul 18, 2011

in shared object Delete specific Items i her store MovieClip int shared object then show Movie Clips in the posistion x and y wit text field which hold the string value the problem is i cant delete specific movie clip from shared object this code

seevoo._visible = false;
user_co = SharedObject.getLocal("coment");
i=1;
///////////////// if condition to out if the value of shared object undefiend ///////////////

[code]....

View 0 Replies

ActionScript 2.0 :: AttachMovie Randomly WITHIN A Specific Shape?

Nov 2, 2010

I'm currently using a script I picked up from these forums to attach movieclips from the library based on how many child's there are in an XML document.I was wondering if it was possible though, to have each movieclip placed in a random location on the stage; but restrict that random location to a SHAPE I draw? For example if I drew a giant star, and wanted the movieclips to randomly attach anywhere within the boundaries of the star?

I know there are methods of restricting the random placement by using x and y values to keep it below or above a certain line, but is it possible to restrict placement within custom drawn shapes?

Here is the script I'm using atm:

Code:
function loadXML(true) {
if (true) {
xmlNode = this.firstChild;
title = [];

[code]....

View 4 Replies

ActionScript 3.0 :: Grouping Array Values After Specific Shape?

Mar 6, 2011

Array of color id-s represents a 3D Array of values. I've represented each value with a color(Blue is 1, Red is 2 and Green is 3). So for the example the array for the image would be:

ActionScript Code:
var myColorArray:Array = [];
myColorArray = [
[0,0,0,0,0,0,0,0,0,0],

[code]....

Now, I have an array of predefined shapes/objects. I'd like to replace the grouped colors with the shapes that I have. I'd like this to follow the rule of finding the largest shape first and then down to the smallest one.Now let's assume that the L shape is A, the Z shape is B, the third one is C and the last one is D. Now our new Object array would look like:

ActionScript Code:
var myObjectArray:Array = [];
myObjectArray = [
[0,0,0,0,0,0,0,0,0,0],

[code]...

View 3 Replies

ActionScript 2.0 :: Drawing In MX - Confined Area For Specific Shape

Jun 7, 2004

I've never used the drawing function on Flash and I followed the fairly simple tute on it just recently. Is there any way to confine the drawing area to a specific shape. Mine's a rectangluar shape that's rotated. You can download my FLA with the background image here > [URL]. I'd like to try and keep it confined to the notepad area. I think it might be a hitTest thing with if/else. My other thing would be to just rotate the notepad so that it's straight. Even still I'd like it confined to the area beginning with the corner of the notepad, not the corner of my movie.

View 2 Replies

XML :: Flash - Randomized Placement Of Nodes To Make Specific Shape

Nov 5, 2009

I have a flash ecard that I am working on and had one of those "wouldn't it be cool if..." moments!

I would like find out if it is possible to:

1) load in an xml file that contains several names
2) Load each one of those names into a predefined movie clip which would display the name
3) randomize the placement of each name in a given shape area so that the Movie clips with names would randomly fill in to make a specific shape.

View 1 Replies

ActionScript 3.0 :: Crop A Specific Irregular Shape From An Imported Image?

Jan 18, 2010

How can I crop letteraly crop a part of an imported image into a specific irregular shape that already exists on the stage as a MovieClip... a jigsaw puzzle piece for example ? (it would be prefered not to use masks).

View 3 Replies

ActionScript 3.0 :: Crop A Specific Irregulare Shape From An Imported Image?

Jan 18, 2010

I have a little question:How can I crop letteraly crop a part of an imported image into a specific irregular shape that already exists on the stage as a MovieClip... a jigsaw puzzle piece for example ? (it would be prefered not to use masks)

View 4 Replies

ActionScript 3.0 :: Multi-clickable Button - Goto A Specific Shape Tween Each Time It Is Clicked

Nov 18, 2009

I'm working on making a nitrogen tank that inflates a balloon a little bit more every time you click the tank. How do you set it up to go to a specific shape tween each time it is clicked, and then have it stop and make a reset button appear?

View 2 Replies

Actionscript 3 :: Making A Delete Button To Delete Text In The Inputtext Field

Nov 12, 2010

I got these four errors when I tried to create a button on the stage that would delete the text I inputted in the inputtext(ti). Based on the scripts I have and the errors, what should I write to create the delete button?

[Code]....

View 2 Replies

Flex :: Combobox Backspace Or Delete Key Does Not Delete Highlighted Text

Mar 26, 2010

I am implementing a flex auto-suggest combobox - as the user types in each character: Consider the string 'Stackoverflow' and user input = 'st'

1) the data provider is filtered to show all items starting with 'st'
2) text is set to auto-suggest string such that the un-typed part is highlighted.

So for instance, the combobox text may contain st'ackoverflow', where 'ackoverflow' is highlighted using setSelectedIndex()When I hit back-space or delete, and check the 'this.text' value, I expect that the last un-highlighted character ('t' in the above case) gets deleted and the data provider is filtered to show all items starting with 's'. However the text property contains 'st', as before

View 2 Replies

ActionScript 3.0 :: New Shape - 1046: Type Was Not Found Or Was Not A Compile-time Constant: Shape

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

Professional :: Adding Shape Hints Makes Shape Disappear In Between Frames

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

ActionScript 3.0 :: Draw The Shape Of A Existing Movieclip Which Is Irregular Shape?

Oct 11, 2011

need to draw the shape of a existing movieclip which is irregular shape.

View 2 Replies

ActionScript 3.0 :: Draw The Shape Of A Existing Movieclip Which Is Irregular Shape

Oct 11, 2011

need to draw the shape of a existing movieclip which is irregular shape.

View 1 Replies

ActionScript 1/2 :: Shape Colliding Another Shape, Not The Rectangleof A Movieclip?

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

Professional :: Change The Shape Of A Shape?

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

ActionScript 3.0 :: Multiple Textbox At Run Time - Delete A Textbox By Delete Key

Jul 30, 2009

i have ade moultiple textbox at run time now i want to delete a textbox by delete key how it is possible .

View 4 Replies

Xml :: Flex - Nodes Will Not Delete Despite Calling "delete"?

Feb 9, 2011

I'm trying to use the delete keyword to remove nodes from an xml file and it just plain won't work.Here's a stripped down example of what I'm working with. Every node has a child named "deleteme". If its value is equal to 1 I want to remove it from the xml file. If its anything else I want to leave it be. The delete method is deffinately gettig call but it's having no effect.

<?xml version="1.0" encoding="utf-8"?>
<stuff>
<i>

[code]......

View 1 Replies

ActionScript 3.0 :: Delete A Mc With Delete Key?

Sep 17, 2009

i have A,B,C,D moveiclip
  
now i want to delete a mc with delete key .if i select A then press delete key it will delete .

View 4 Replies

ActionScript 2.0 :: Make A Specific Thing Happen While Clicking A Specific Button

Jan 17, 2006

What I want is a hint how to make a specific thing happen while clicking a specific button. Like "if I click button 1, do this". Would like to use this script though I'm gonna add buttons over time and this is an easy way to have the functionality working.

Here's the code:

Attach Code

function hitButton(btn) {
btn.onRollOver = function() {
this.colorTo (0xC4006A);

[Code]....

View 4 Replies

ActionScript 2.0 :: Change The Colour Of A Graphic In A Specific Movie In A Specific Frame

Mar 31, 2006

i need to change the colour of a graphic in a specific movie in a specific frame. if i have a movie clip instance-named "sidetext" thats 15 frames long, and i want a graphic in the movie, called "letterp" to change to one of four colours that i want it to randomly at frame 10 and stay that colour uintil frame 15, how can i do this?

View 2 Replies

ActionScript 3.0 :: Loop A Specific Bit Of My Movie Until A Specific Link Is Clicked?

Mar 29, 2010

how I can loop a specific bit of my movie until a specific link is clicked?

View 5 Replies

Flash 10 :: Export Specific Frames Not All Frame - Specific Timeline

Sep 15, 2010

how do i export specific frames not all frame. ex: if flash has 1 to 200 frames. here i want to export 51 to 150 frames as a movie. if there is any command or plugin to export movie like this.

View 0 Replies







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