ActionScript 3.0 :: Application To Calculate Chances Of Winning Lottery?
Mar 17, 2011I need to make an application to calculate your chances of winning the lottery i want to use input textfields.
View 2 RepliesI need to make an application to calculate your chances of winning the lottery i want to use input textfields.
View 2 RepliesI have flash movie with 5 frames in swfloader. Is there any chances to scroll between frames like documents?
View 1 RepliesI'm trying to make an scratch lottery ticket in as3 by using the bitmapData class. The scratch function is working fine, but I want to add an function that is challenging. When 75% of the lottery ticket surface is scratched of I want to trigger an event.
My ActionScript Code:
var toolsize = skraper_mc.width;
var tooloffset = toolsize/2;
var basepoint = new flash.geom.Point(0,0);
var bitmap:Bitmap=new Bitmap();
[Code] .....
There are two buttons and a dynamic text box in my flash. The two buttons are start and end button. When you click the start button, you will find the random data in the dynamic text box changing constantly until you click the stop button.
View 3 RepliesI have created a small game and i set up a time with it.. But when you win/lose you go to another 'picture' and then you no longer can see your final time.. My question is: How do I Stop the time and view it on the winning/losing picture? If you need any codes just ask And if there is some pro flash people and who are bored they might add me on MSN and teach me more?
View 11 RepliesI am newer in FLEX and currently i am using FLEX 3.0 I want to develop a Tic Tac Toe game in FLEX. At first i think this one is the easiest for me but now its going to be very tough for me. I have searched on Internet but not a single link that much so please give me proper Idea with proper code. Here i am giving you the sample code. its a bit of complex so sorry for that.
[Code]...
I have check the winning condition on btn_click() function but you can give me the idea to change it when the one row is completed. I want to know how to handle the array of TicTacToe Game.
I as this working in AS2 and need to update to AS3...shows that AS3 doesn't like sloppy coding. Here's what I need: I pull data from an XML and that works when I put the data into a dynamic text box. However, I can't seem to get the date of birth into a variable. I have some code that calcs age in years but uses a string literal that I thought I could just replace with a variable from my XML...ain't a workin'. Here's the code I have:
ActionScript Code:
import flash.display.*;
import flash.text.*;
import flash.events.*;
[Code]......
I'm using a combination of Paul Duncans php ZipStream [url]...
Works fine in Air, but when running Flex in browser, the zip needs to include a Adler32 checksum in the header for FZip to be read.
How can I calculate an Adler32 checksum for the zip in php?[code]...
i'm getting the xmldata from the httpservice (using cgi) and i have not set resultformat(it is coming as an object only),the xml data in this format
[Code]...
when i was tried to count the employee tag,i getting the problem, my code will like this:
[Code]...
I have the following function in my FogOfWar class, it calculates if its team can see the position that is passed on the arguments:[code]My problem is that, with only 3 characters in the game, it can only run 4000 times per second, which is not too much.I can implement a cache, so it caches the most commons positions, but, what else can I do to optimize it?
View 2 RepliesI need to calculate the value of a formula which is passed dynamically by using text box.This formula contains a set of variables which are already declared and assigned a value(hard coded). I will provide a submit button , on clicking this button I must be able to evaluate the formula that I have passed dynamically using the text box.
View 2 RepliesI have problems with calculating values of a childnode.
My XML structure
<FILE>
<NUMBER TYPE="test"> 1 </NUMBER>
<NUMBER TYPE="test"> 2 </NUMBER>
</FILE>
[Code].....
the trace outputs: 2 (last row)
and not 3 as i expected. De Element++ is not working.
I'm working on a game which will involve space battles, and automated turrets. The turrets are giving me the headache right now. Here's what I got so far.
[URL]
The problem is, that the turrets aim at the center of their target, instead of aiming in front of their target to compensate for their movement. I can't seem to crack the equations needed to get the right rotation, for the turret to fire from. The data the turret has avaible, or that I could easily make avaible to it, are:
- The distance to the target (and it's x and y components)
- The current speed vector (the size and rotation)
- The angle between the heading of the target and the turret's location
- The speed of the turret's shot (fixed speed)
write down the formulas that flash MX uses when you use the functions tan/sin/cos...I am trying to get a good grasp on these things and it
View 12 Replieshow to find the biggest possible area within a rotated image (the black rect in attached image), but can't figure out how to calculate the points TL, TR, BR, BL to draw my rectangle (the red rectangle in attached image).
View 3 RepliesI am trying to create a 30 day trial period limitation in Flash CS3. I am having a problem with checking the number of days. I am using zinc mdm to get the date of an external file. Following is the code I am using.
var d1:Date = new Date(mdm.FileSystem.getFileDate("c:\myText.txt")) ;
var d2:Date = new Date();
//(Date2 - Date1)/
[Code].....
I'm basically trying to emulate Photoshop's Vanishing Point tool where you can define the 4 2D points and the 3D plane is calculated from that information, in terms of the rotation of the plane relative to x y and z axes.
So if you have an image like this one:
And you define the points of the four corners, maybe like this:
It would define the 3D plane that the surface must live on relative to the x y and z axes. Researching this has led me to some tutorials on drawTriangles and Homographies, but they all seem to be focused on mapping bitmap data and I can't seem to find anything that defines a 3D plane itself.
I am trying to figure out a way to calculate time diffrence betweennow and a set timevar
settime:Number = 2:35am
and
now would be getDate();
[code].....
I have lot of child inside my xml data.I want to calculate total my child list
View 2 RepliesSo my array contains marks for a ficticious class and i need to be able to calculate these marks to give me a class average which is this formula; all marks added / number of marksIs there a way to do this within an array?
My code for the program so far is:
// Create Arrayvar marks:Array =["100","76","80","54","23"];// Button Functionenter_btn.addEventListener(MouseEvent.CLICK, onClick); function
[code].......
I try to calculate all the points on a curve.
The curve decided by the width(X on the picture) and height(Y on the picture) properties of a movieclip.The distance between each green point on curve is the same.
So i got the ability to add a numeric value to an mc down. So every time i pick up a coin with a value attached to it, and place it on a hand mc, it'll trace the value i've assigned. very excited on this aspect. I've been searching around for the ability to have a master value that I set say for example 5.0. When I hit another mc, this function (that i need to find out about) would check the values that are resting on the hand. I could not find the proper syntax. I have a very good idea of where it would go and what it would look like but I'm missing the forumla. Now I've bold/underlined the area that I think the check would be executed. When you hit the checkout button, it would tally the myValue sums that are currently resting on the hand mc. So my thought train is that I'd declare another variable like masterTotal (the value I want the person to match), and the handTotal (what is resting on the hand).
import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.transitions.TweenEvent;
[code].....
I have a running total. When an mc hits the table or hand it'll adjust the total. The problem is I only want the total to reflect when an object is resting on the hand mc. If i remove something from it, remove its value from the total. Now to be smart I have it add when an mc hits the hand, and remove a value if an mc hits the table. The problem, if I never touch the hand and keep dropping the mcs on the table, i get a negative value. Is there a way to calculate a total only when a mc rests on the hand mc
View 8 RepliesI need a way to calculate lighter hex color(s) based on a provided one. I realize I could use a color transform, but I need the actual value in order to generate a gradient.
View 5 RepliesI have this datagrid which has columns with a NumericStepper as an itemEditor where the user can change the number of items he wants to buy. How can I calculate the sum of all cells when the user updates datagrid's values?
EDIT 1
My datagrid is about colors and sizes of a product. The columns are generated dynamically from this function
private function getColumn(dataField:String, headerText:String,editable:Boolean) : DataGridColumn
{
var column:DataGridColumn = new DataGridColumn(dataField);
[Code]....
the row.size28 is generated dynamically. So it could be row.size29,row.size30 etc.
How can I loop through all my cells without knowing their data.property?
I want to calculate the parsing time....
package {
import flash.display.MovieClip;
import flash.net.URLLoader;
import flash.events.Event;
import flash.net.URLRequest;
public class Graph extends MovieClip {
[Code] .....
I use this script currently to determine the difference between two dates:
[Code]...
The problem with this is I want to monitor the actual physical day change so if someone accessed the application at 11:59 PM and then came back 5 minutes later this would register as a 1 day difference (a new day), this current script requires atleast 12 hours to have passed between two dates for it to register as a new day.
I have thought about using the date number etc, but because months and years are so different it is quite a complex route, there must be something simpler.
I have this code :
var a:Apoint = new Apoint();
a.x =0; a.y=200;
addChild(a);
var b:Bpoint = new Bpoint();
b.x =275; b.y=100;
[Code]...
I have built a pagination gallery and am having some trouble calculating the current set of pages from the current page (and whether it is the last set and if so does the last set have a full set or less than a full set).[code]...
View 2 Repliesi have one problem. i create one circle and i placed more than one points outer of circle (the points are created dynamic).
View 1 Replies