ActionScript 2.0 :: Delete Small Circle And Create Another One At The Same Location?
Apr 29, 2011
I'm using AS 2.0 I have big MC(circle - vector). It's not perfect circle because of Flash.On this circle I have some mc's (small circles - bitmaps) --> I'm using attachMovie on Big circle. I'm rotating with big circle by 45 degrees.
Sometimes I have to delete small circle and create another one at the same location. But after rebuild the position of new small circle is a little bit changed[mm].
It's visible and I'm very disappointed. It happens even the rotation is 0.
View 1 Replies
Similar Posts:
Apr 29, 2011
I'm using AS 2.0.I have big MC(circle - vector). It's not perfect circle because of Flash.On this circle I have some mc's (small circles - bitmaps) --> I'm using attachMovie on Big circle. I'm rotating with big circle by 45 degrees.Sometimes I have to delete small circle and create another one at the same location. But after rebuild the position of new small circle is a little bit changed[mm].It's visible and I'm very disappointed. It happens even the rotation is 0.
View 6 Replies
May 4, 2010
just wondering how i can add a small explosion like thing when the ball hits the yellow circle, and not just a picture appearing on the hit (game attached, and using adobe Cs5)
View 2 Replies
Apr 26, 2011
I bought a Flash video tutorial online for Animating and the FIRST step is to create a circle with the circle tool, and the guy does it online, and it fills itself in. I repeat his actions exactly and I cannot get the same result at all. I just get a circle.
View 5 Replies
Oct 19, 2006
At the moment I create an onEnterFrame function to ease a movie clip into view. I then delete it. I want to be able to recreate a similar onEnter Frame function later to swoosh the movie clip out of view. At the moment weird things happen when I try and do the second onEnterFrame.I know I could put this all in the original onEnterFrame, but I don't wanna be wasting processor time doing an if statement every frame to work out if it's time to swoosh out the movieclip. Or should I not worry because that's negligible cpu time?
View 3 Replies
Mar 11, 2010
Buteh, I sat down to create a small app to calculate X in order to solve 2nd grade equations.
So, in order to manage this I had to translate "x = -p/2 +- sqrt((p/2)^2 - q), right?
Everything works fine until I reach the step when I must perform equations with -p/2 and sqrt((p/2)^2 - q).
Adding and/or subtracting with these numbers causes Flash to return NaN.
View 5 Replies
Feb 5, 2009
i have a problem to make the trademark symbol smaller and stick on the top (to give it a nice look, now it looks like this "dflasdfa�" and thats not very nice). Im using htmlText textfield, the data comes from an xml file. So i could use CDATA and put some <span> tags around trademark, but that wouldnt send it to the top right? And it would be a lot of work too.
View 0 Replies
Aug 9, 2004
Im trying to create a small data visualization project. i'm wanted multicoloured balls to fall the mouse round the screen and when you click one it brings up data from an xml document. im currently using a image of a ball is there away to generate one in flash so far this is what i have
ball.onEnterFrame = function() {
var xMouse = _root._xmouse;
var yMouse = _root._ymouse;
[code]....
View 14 Replies
Dec 5, 2010
I'm trying to create a contact form, using a small PHP script.The PHP is working fine, the problem is in the AS.For some reason, I can't get the ActionScript to gather the information from all the fields in the contact form.For the last two fields, I get the error "Implicit coercion of a value of type String to an unrelated type Number." Here's the relevant part of the code:
var email_data:String = "name=" + name_txt.text
+ "&email=" + email_txt.text
+ "&place=" + place_txt.text[code]....
All of the fields exist as input text fields on the Stage - anyone have an idea why there's a problem with the time_txt and message_txt fields?
View 2 Replies
Mar 9, 2010
I have been using AS3 for over a year but only to create some web pages with simpleanimations using tween Engines like TweenLite etc. without having to rely too much on custom classes, one reason is obviously because I don�t know understand classes that well, even though I have created some re-usable classes like a class to add a glow or fade all my images or links when mouse over, but nothing fancy and I have been always curious as to how or what the pros do for small projects like a web site or a simple banner. 1- How often do you have to create custom classes for small projects, and for what parts of the project (navigation etc)? 2- Do you try to manipulate all of your MovieClips with classes? The reason for my question is because I want to start thinking more about classes (OOP) and stop witting all my code in the .FLA file or a class using the Document Class (which is no different than putting it directly on the .FLA file) IF classes is the way to go.
View 8 Replies
Apr 15, 2010
How can I have a function create Array depending upon the passed argument. Am I doing this right?
function createArray(n:int):Array
{
for(var i:int=0; i<n; i++)
{
var nArr = new Array();
[Code]...
View 4 Replies
May 15, 2003
As part of my brief, I have to create a small flash movie that will load a random quote (which is actually a jpeg image), fade it in to view, display it for a length of time (probably only 3-5 seconds), fade it out and then load another random quote. Is this possible to do, purely using actionscript? I can randomly load an image - I used the "Random Background Image" tutorial on this site - but getting the fading/pausing/fading then moving to another quote has got me stumped.
The images are imported into their own swf file that is loaded into a placeholder movie on the html page. I tried adding in a for loop to the individual swf and the placeholder movie, to loop through alpha property of the image (just to fade up for the moment, till I get it working) - but this didn't work at all. I could use tweens for the fading, but this could end up a mess and more work than it needs to be as there could be quite a lot of quotes added over time.
View 2 Replies
Jul 19, 2010
how to create flash movies but the damn program is too complicated. Been trying to figure out how to create a shape inside it as it doesnt want to import any image I have into the library.Is there a way to just create a simple circle?
View 1 Replies
Dec 9, 2010
I am quite experienced in Photshop and other elements however I am an absolute novice when it comes to flash.
What I am trying to create is an effect for a logo in which the motif in a semi circle shape which i want to appear in a wipe fashion starting left to right so that in wipe across and the shape appears in full at the end.
The shape in a rainbow....this would also have the company name below the logo which would be visible from start to finish. I have attached the picture of the logo. I would like the gold pot to also appear in the swipe of the rainbow.
View 3 Replies
Dec 5, 2010
I write some working code that creates a circle on mouse click with a radius of 5 and with a random colour each time...I have the code to create the circle and the code for the random colour here:
var myColour:Number = Math.floor(Math.random()*0xFFFFFF);
this.graphics.beginFill(myColour);
this.graphics.drawCircle(0, 0, 10);
this.graphics.endFill();
Essentially I want to create a Flash application that places random coloured circles with a radius of 5 on the stage with a centre location of the mouse position each time a user clicks.
View 5 Replies
Oct 13, 2011
I'm making a small Flash game, which is rotating rings in an image to create a coherent picture. Think of the puzzles in Assassins Creed.I have three scenes set up, one with the puzzle, one with a fade to white transition, and one with a congratulatory screen.
I have this code to check if the orientation of the rings match, but I'm really new to actionscript so I'm not sure if it's right or not.
function orientationCheck()
{
if (center.orientation == 0 && ring1.orientation == 0 && ring2.orientation == 0 && ring3.orientation == 0 && ring4.orientation == 0)
[code]....
Unfortunately it keeps playing through the movie and not giving the player time to solve the puzzle.
View 9 Replies
Dec 11, 2009
I am trying to create and delete empty movies that I can load external .swfs into. While the below works if I get rid of
var currentLoaded = "my_loader" + myNum;
I can't work out how to dynamically name the empty movies, as the below just comes up with errors. I'm pretty new to AS3 and stuck. Any ideas?
var myNum = 0;
var currentLoaded = "my_loader" + myNum;
function loadNew (myNum){
[code]....
View 1 Replies
Mar 2, 2009
i'm trying to create a swf that retrieves the users location (town)I've looked about online and it seems this could be done by using longitutde/latitude values for example(Guessing thats how you would do it - open to suggestions though!)I've seen working examples of this on various peices of flash that magically tell you what town your.
View 2 Replies
Dec 10, 2010
I've been trying to learn just now how to dynamically create a radial gradient in a circle. All the pages that I can find use the command 'beginGradientFill', but when I use it I get the following messages:
Warning: 1060: Migration issue: The method beginGradientFill is no longer supported. For more information, see the Graphics class..
and
TypeError: Error #1006: beginGradientFill is not a function.
Unfortunately I can't seem to find the replacement, or any other pages that describe an alternative to that function. What is the way to do a radial gradient now?
View 3 Replies
Jan 19, 2012
I works with Flex 4.5 and I like to create a custom dropdownlist. Indeed, I'd like to show in each line on my dropdownlist a label and a delete button. The goal is to delete the line on click to delete button. This look like simple, but I don't found how to do that.
View 1 Replies
Mar 21, 2010
what im trying to figure out is how exactly do you create a minimap that can register each object location
View 2 Replies
Apr 10, 2010
how to create a navigation option (like the one seen at the bottom right corner in Google maps) for a location map in flash (as3.0)
View 6 Replies
Apr 6, 2009
I'm trying to create a radar effect (a looping circle which gets larger). Now, the way i do this with other programming languages is to draw a rectangle as the background with a low alpha amount. Then draw the circle growing on top of the background, then draw the background again in the loop.I've got it working like this in flash but it gets really slow after a very short time since I am adding children each time the loops goes through.
Code:
var radarSize:Number = 1;
stage.addEventListener(Event.ENTER_FRAME, loop);
//-----------------------------------------------
[code]....
View 2 Replies
Jun 1, 2010
whether it is possible to automatically create a motion tween of a black circle that would result in an animated drawing of a line? The circle should not only move but also leave its own copy at each frame of its route.
View 2 Replies
Jul 2, 2011
I have a class which loads images for one photoalbum category
Code:
dynamic public class Submenu extends flash.display.MovieClip
{
[code]......
View 2 Replies
Apr 16, 2005
[code]How can I create a condition to delete this onEnterFrame at the proper moment?
View 2 Replies
Jul 28, 2009
I need to allow the user to create a circle with a specific radius and colour in a certain frame (lets say frame 2), and then add that circle as a symbol to a different frame (say frame 1). First off, im simply creating a circle.. This is what ive got in frame 2 so far:
(in Frame 2 of the timeline)
Code:
stop();
import flash.display.DisplayObject;
import flash.display.Graphics;
import flash.display.Shape;
[code]....
Ive got this much working, but I dont understand how to convert the output of this function to a symbol usable in another frame..
View 3 Replies
Sep 12, 2009
Trying to create a simple shopping cart with text boxes and delete buttons on the fly and everything is created properly, but I can't get them to delete.
My code:
Code:
for (i=0; i<clothingCart.length; i++) {
var ci:TextField = new TextField();
itemArray[i]=ci;
[code]....
I get the same basic error no matter what:
Quote: The supplied DisplayObject must be a child of the caller.
View 1 Replies
Jan 3, 2011
I am trying to recreate an effect like the clouds on[url]...I would like to be able to click and drag on an object then once mouse is released the object would dynamically return to start position. I am struggling to get my script (AS3) to dynamically return it to original location.
View 1 Replies
Mar 8, 2005
I'm developing a game atm, and I need some help on the mathematics/coding of colliding circles (and their change in x/y speed). What i need to know is how to calculate the direction and speed a circle has after colliding with a static (non-moving) circle. I know how to detect a collision between the two, but I'm not sure about the maths I need to give the circle the right speed and direction after the collision
If i do know how far away the two circle-points (in the middle of each) are to each other (in both x and y coords) would it be easy for me to find the new speed and direction of the large circle in the example above? I know that I somehow should use the angles to pretend the circle hits a flat "wall" (as it only hits one point), and then calculate the new speed/direction. My only problem is that I'm not sure how to decide the angle of this flat "wall" and how x and y speeds should change when colliding with a wall that is angled. Does anyone here have any insight, links or tips on how I can du this?
View 6 Replies