Flash - Circles Adding Outside Of Square Box

May 9, 2011

import flash.display.Sprite;
var bin:Sprite = new Sprite();
var cir:Sprite = new Sprite();
cir.graphics.beginFill(0x00ff00,1);
cir.graphics.drawCircle(0,0,30);
cir.graphics.endFill();
bin.graphics.beginFill(0xff0000,1);
bin.graphics.drawRoundRect(40,40,100,100,5,5);
bin.graphics.endFill();
addChild(bin);
bin.addChild(cir);
Here why do the circle added outside the square box?

View 3 Replies


Similar Posts:


ActionScript 3.0 :: Chasing Hero Game Character As A Square And The Enemies Are Circles At The Moment

Sep 11, 2009

i am making a game and i have my main character as a square and the enemies are circles at the moment. i have just made the circles home in on the main character, but my problem is when the enemies come inline with the x or y coordinates of my character they start vibrating/shaking. im not sure how to fix this. i have included my fla so you can easily see whats going wrong.

View 1 Replies

ActionScript 3.0 :: Adding And Removing Circles On The Circumference Of A Big Circle?

Nov 26, 2010

A number of circles (a.b,c etc.) drawn on the circumference of a circle X.

When + button is clicked, a new circle is added on the circumference which makes thar circle X expand. When a circle 'a' is drag and dropped to a garbage image, circle 'a' gets deleted making the circle X shrink in size.

View 1 Replies

ActionScript 2.0 :: Randomly Animate Circles Moving Around Inside A Bigger Circles?

May 12, 2005

how to randomly animate circles moving around inside a bigger circles? the small circles will have a collision effect on each other and on rollover of each individual circle, the name of it will come out in the bottom.. so the big circle will act as a wall preventing them from coming out..

View 1 Replies

ActionScript 2.0 :: Circles In Circles Animation

May 12, 2005

anyone know of any tutorials or any codes on how to randomly animate circles moving around inside a bigger circles? the small circles will have a collision effect on each other and on rollover of each individual circle, the name of it will come out in the bottom.. so the big circle will act as a wall preventing them from coming out.. yeah, by the way i have attched the file so more or less u will understand wat im saying.

View 1 Replies

ActionScript 2.0 :: When Creating A Dynamic Square With The Api - Won't Drawing Api Square Object

Dec 2, 2010

when creating a dynamic square with the api. 400 by 400. I am not sure why it wont draw the object

[Code]...

View 2 Replies

ActionScript 2.0 :: Have An Enemy Square That Chases The Player Square?

Jan 15, 2010

I have this game, and some levels have a moving square as the player, you move the square with your arrow keys.... I want to have an enemy square that chases the player square.... They only chased mario when you didn't look at them? Kinda like that...... but in this regards:

I only want the enemy square to chase the player square when the player square moves.... soo say the player square moves 5 pixels per movement (know how to do all that), I want the enemy square to move when the player square moves..... towards the player square at like 7 pixels per movement..... so eventually you won't be able to avoid the enemy square....

View 4 Replies

Flash :: Drawing A Shape With Circles

Oct 22, 2011

The issue I am having is how to tackle forming a logo using circles. I have done one letter manually, however it would take forever to do this with every single letter, and so I am asking here if anyone knew of a faster method. Requirements:

- Has to fill non-circular letters(i.e. does not have to be precise, but look like it has edges)

- Circles have to animate in, therefore they need to have drop shadow and seem like they are landing in place

View 1 Replies

Actionscript 3 :: Flash Drawing A Line Between Two Circles?

Nov 23, 2011

I'm trying to draw two circles at random positions, and draw a line between those two circles - but flash doesn't seem to register the x|y coordinates of the circle in my code.How would I do this. Better yet, how would I do this so that if I were to drag one of the circles, the line would maintain the connection between those points? Here's my code:

var sw = stage.stageWidth;
var sh = stage.stageHeight;
var cr = 6; //circle radius

[code].....

View 2 Replies

Professional :: No Video With IE9 Flash 'Square'

May 10, 2011

I recently purchased a new Acer notebook computer for my business travel in late March 2011. The machine is running Windows 7 64bit OS and had IE8 64bit installed. I installed IE9 upon receipt of an update notice from Microsoft and downloaded Adobe Flash Player 'Square'. I am unable to view any internet video on news websites (ie: CNN, Fox, MSNBC, etc). The screen is completely blank, but does contain the audio. I do receive video for any 'You Tube' file I have attempted. I have removed and reinstalled both IE9 and Flash 'Square' multiple times after attempting various 'fix' I have found on line, but the problem persists and I cannot view video content. This is forcing me to use 'Chrome' when using this machine.

View 4 Replies

IDE :: Square Root Flash Calculator?

May 8, 2009

Is there a simple way of pressing a button on a flash calculator to calculate the square root (sqrt)? I cant find anything about it. for example

Code:

// Tangent of the angle in degree
function Dotan () {
if (display == 90) {
display = "Infinity";

[code]....

View 4 Replies

ActionScript 3.0 :: Draw A Square In Flash If Co-ordinates Are Is In XML?

Oct 14, 2008

How it is possible to draw a square in Flash if co-ordinates are is in XML?

View 3 Replies

As3 :: Flash - Square Bracket Before Class Definition?

Apr 12, 2011

I've seen the embed tag used before the class definition, but I just saw that Keith is using these..

[Event(name="select", type="flash.events.Event")]
[Event(name="close", type="flash.events.Event")]
[Event(name="resize", type="flash.events.Event")]

[code].....

View 1 Replies

Flash :: Professional - Draw Anything Like A Square Or A Line It Is Green

Mar 8, 2010

When i try and draw anything like a square or a line it is green. Also when i try and fill naything it doesnt work!!!! It is quite important that i get it fixed because i need to use flash for an assesment that is due in next week!!!

View 1 Replies

Professional :: Make A Transparent Square Box Swf File In Flash Cs4?

Jun 4, 2010

I have one picture imported into flash cs4 and would like to make a rectangle box which should be transparent. Finally I will save it as .swf file for later use. But the box should be transparent (without any background). How can I do that?

View 1 Replies

ActionScript 3.0 :: Make An Extrusion For A Red Square Movieclip In Flash?

May 17, 2011

How can I make an extrusion for a red square movieclip in flash or as3?

View 4 Replies

ActionScript 2.0 :: Display The Square Root Symbol In A Text Box Flash 8?

Jul 12, 2006

does anyone know if there is a way to display the square root symbol in a text box flash 8 using actionscript? For instance I just want to display the square root of 4 just the problem not the actual calculated value.

View 1 Replies

ActionScript 3.0 :: Make A Basic Flash Calculator Except It Only Has To Be Able To Square The Number Provided By The User?

Dec 14, 2009

I'm trying to make a basic flash calculator except it only has to be able to square the number provided by the user, I have followed many tutorials but I keep getting the NaN as the output. Here is the actionscript:

import flash.events.MouseEvent;
square_btn.addEventListener(MouseEvent.CLICK,
squareClick);

[code]...

I also need to have Input box and Error Messages & Highlighted Input Box.

View 1 Replies

ActionScript 2.0 :: Draggable Circles With RGB Mix Add

Nov 29, 2010

I got to create an app with 3 draggable circles. (Red,Green,Blue). At the centre overlay the RGB needs to display the mixed RGB. I.e if red and blue, overlay display magenta. If green and red overlay display yellow. If red, blue and green overlay display white, etc.

View 1 Replies

ActionScript 2.0 :: Make The Circles Go From Down To Up?

Nov 4, 2003

im so lost in how to make the circles go from down to up instead of going left to right.

Tutorail: Creating Continuous Movement

[URL]

Specifically i'd like to know the actionscript code.

View 4 Replies

ActionScript 3.0 :: Animate Circles On Random

Apr 29, 2010

I try to animate cricles on random.. Its not working for me.. somewhere the code needs to correct.. Here my code...

[Code]....

View 3 Replies

Flex :: Overlay Circles On Google Map?

Feb 14, 2011

I want to use semi transparent circles to show the intensity of the effect by altering the radius of the circle and animate it while placing them. for example it appears as a dot and then grows to the intended size in fraction of a sec.

I could see some functions in javascript API but not in Flex. Saw some examples that uses polygon. But i dont want to plot all 360 points for just one circle.

View 2 Replies

Get The Circles Animated To Get The Next Image To Display?

Oct 15, 2011

I can make images transparrent and tween etc. I want to create an animation (like this one), if someone can please help put me in the correct direction? I am not sure how to get the circles animated to get the next image to display.

View 2 Replies

ActionScript 3.0 :: Circles That Act As Mask For Picture

Jan 19, 2010

I've got the code for circle on an image (mask). I've got it in my first frame and I need do something else in 2nd frame but after the movie in 1st frame is finished.
Code:
//This container contains all the circles that act as a mask for the picture
var container:Sprite = new Sprite();
//Assign the container to be the image's mask
picture.mask = container;
//Add the container to the stage
addChild (container);
/*

This timer is responsible for creating a circle every 0.05 seconds. A total of 20 circles will be created.
*/
var timer = new Timer(50,20);
timer.addEventListener (TimerEvent.TIMER, createMaskBall);
timer.start ();
//The timer calls this function every 0.05 seconds
function createMaskBall (e:Event):void {
[Code] .....

View 5 Replies

ActionScript 3.0 :: LineTo Drawing Circles?

Jan 31, 2010

I have been working on a drawing "game" in my spare time (which is limited). This is probably a common question, if so I appologize. By the way, I do not have the code here, it is on my other computer. Anyway, I was using the lineTo method and a timer listener to fire the addition of each new line segment, if that makes sense. The problem is that when you try to draw an arc quickly, it looks terrible. It draws straight lines. I tried adjusting the timer, which helps a bit but still not great. I looked at the curveTo but could not figure out a logical way to get the achor coordinates. I did some research online and found some that use addChild with bitmaps. I would rather use lines. Has anyone tackled this before?

View 3 Replies

ActionScript 2.0 :: Draw Circles With Mouse?

Apr 4, 2011

I am looking for a way to draw circles using the mouse using the lineTo method, but need a way to find when collision occurs between the line that you're drawing and the line that's already on the screen.

View 0 Replies

ActionScript 3.0 :: Random Numbered Circles?

Apr 10, 2011

My problem is I need to generate numbered circles ( from 1 to 100) and I need to make them click able. When I click the circles in order (i.e. 1, 2 , 3...etc) the clicked circle should change color or get disabled (to indicate it is clicked). I should not be able to click the next numbered circle until I press the previous numbered circle and there should be a counter to show how many correct circles are clicked.

View 1 Replies

ActionScript 3.0 :: Circles Moving Around Inside One Another

Dec 23, 2011

I am trying to code some circles to move around inside one another. I have managed to do the hit test bit, but its getting them to stop at the edge inside one another is what I am having problem with. The aim is so the user can drag the red circle and the yellow stays where it is within the red, but when you drag the yellow circle the red moves with it.

View 2 Replies

ActionScript 2.0 :: Vibrating Circles - Turn It Off?

Oct 24, 2003

I have used Kirupa's tutorial on vibrating circles and dont know how to turn it off.I am using the circles in Scene 1 and want them to disappear when you enter into Scene 2.

View 2 Replies

ActionScript 2.0 :: Sequence Of Expanding Circles?

Nov 17, 2006

I've been messing with some code from lionbichstudios.com. I'm looking for a way to have 5 circles appear in succession and expand and fade away. Works fine for one circle but I haven't found a good way to create a sequence of circles. The one hitch: the code needs to appear all in one frame. (I'm using Flash MX 2004)

Here's the basic code:

[Code]...

View 3 Replies







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