Calculate Adler32 Checksum For Zip?

Aug 22, 2009

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]...

View 3 Replies


Similar Posts:


Actionscript 3 :: Flex - Calculate Checksum Of Different Files?

Aug 11, 2010

I am developing an application in flex in which I need to calculate checksum of different files. I would like to know if there is a direct method in actionscript to calculate that or do I have to go for any external libraries?

View 2 Replies

ActionScript 3.0 :: Calculate Age From XML Data; Calculate Dates

Jul 1, 2011

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]......

View 0 Replies

Flex :: How To Calculate The Xmldata

Aug 18, 2010

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]...

View 1 Replies

Actionscript 3 :: Fastest Way To Calculate Fog Of War?

Jan 14, 2011

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 Replies

ActionScript 3.0 :: Calculate The Value Of A Formula?

Oct 21, 2009

I 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 Replies

ActionScript 3.0 :: Calculate Total With XML?

Apr 28, 2011

I 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.

View 2 Replies

ActionScript 2.0 :: Calculate An Intercept Course?

Nov 30, 2006

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)

View 2 Replies

ActionScript 2.0 :: How To Calculate Cos/sin/tan Manually

Aug 30, 2003

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 Replies

ActionScript 3.0 :: Calculate Inner Rectangle?

May 20, 2010

how 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 Replies

ActionScript 2.0 :: CS3 Calculate Date Difference?

Nov 9, 2009

I 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].....

View 8 Replies

ActionScript 3.0 :: Calculate 3D Plane From 2D Projection

Jan 16, 2012

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.

View 5 Replies

ActionScript 3.0 :: Way To Calculate Time Diffrence?

Jul 8, 2009

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].....

View 8 Replies

ActionScript 3.0 :: How To Calculate Childlist In XMLdata

Mar 17, 2010

I have lot of child inside my xml data.I want to calculate total my child list

View 2 Replies

ActionScript 3.0 :: Calculate The Sum Of Numbers In An Array?

Apr 27, 2010

So 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].......

View 3 Replies

ActionScript 3.0 :: Calculate All Points On A Curve?

Mar 20, 2011

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.

View 24 Replies

ActionScript 3.0 :: Ability To Calculate Number Of Mcs On Another Mc?

Dec 20, 2011

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].....

View 6 Replies

ActionScript 3.0 :: Calculate Based Upon An Mc Touching An Mc?

Dec 20, 2011

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 Replies

Actionscript 3 :: Calculate Shades Of A Given Hex Color?

Feb 13, 2010

I 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 Replies

Flex :: Calculate The Sum Of A Datagrid's Rows?

Jun 6, 2010

I 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?

View 1 Replies

Flash - How To Calculate XML Parsing Time

Feb 19, 2011

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] .....

View 1 Replies

Flash :: Calculate Days Between Two Dates?

Sep 1, 2011

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.

View 2 Replies

Flash :: Calculate The Angle (BAC) In Degree?

Feb 25, 2012

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]...

View 1 Replies

ActionScript 3.0 :: Calculate Current Page Set?

Aug 17, 2009

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 Replies

ActionScript 2.0 :: Calculate The Circle Radians?

Feb 20, 2010

i 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

ActionScript 3.0 :: Calculate Position According To Rotation?

Jun 16, 2011

I have child (1) and I am rotating it by some custom num of degrees. After rotation (2) I want to 'align' this child to left_center side of the parent (should look like 3). Without roration I would set x to 0, but after rotation position of registation point changes.

way to calculate new x/y position based on rotation.

View 6 Replies

ActionScript 3.0 :: Calculate Positions And Scales?

Sep 16, 2011

For some reason the "scaled.width" - the movieclip that have scaled already - after scaling it even more with TweenLite.to function by factor .3 aren't equal with the predicted result => scaled.width * .3. Orginal width is something I don't know but scaled width is something like 420. Now multiplying it by factor .3 the result should be something like 140, now when I put TweenLite.to function to scale my scaled movieclip by factor .3 the width in the end is something like 267.And frankly speakin I really can't imagine where the result came from.

Some back ground:I import three images dynamically. Each of them to their own MovieClip containers. I don't know the dimensions of images so I need to scale them proportionally to their dimensions to fit to the desired size.That was intuitively easy. I managed also to align them horizontally in the center of the screen after the first scaling by the knowledge that their registration point can be found from the top left corner. I also managed to align each of them on vertically in the middle of the 1/3 part of the empty stage with desired marginals: in the top there are 20 pixels space, between the images there are 20 pixels space and in the bottom there are 20 pixels space.

Now the problems comes when I need to tween them to their final positions. Each of them to the top of the stage and each of them in 1/3 part of the empty space horizontally scaled at the same time smaller with factor .3.Intuitively when I think the x position can be found by same way than the way I found y positions (related to the space left after the middle image is positioned). So in theory I thought the x position for the image that comes in the center should be as much as finalX = stage.stageWidth / 2 - current.width * .3 / 2(the center point of the stage minus the half of the width of the image after the scale)but when I give finalX for the tweenLite as a x position and .3 as a scaling factor the result is something different.

View 1 Replies

Actionscript 3.0 :: Calculate Difference Between 2 Bitmaps?

Jun 13, 2009

i'm trying to calculate the difference between 2 Bitmaps.One bitmap is an external image, with only black and white.The other one is a bitmap created by AS3 and filled with red.The external image has some basis shapes on it, now in flash i want to know where these shapes are and create a movieclip out of them so i can later use it.Now what i've done is created 2 bitmaps for the image, and 1 sprite to try and make those movieclips.The thing that i have now is this:

Code: Select allthis.trackBmpd = new BitmapData(loader.width, loader.height, true);
this.trackBmp = new Bitmap(this.trackBmpd);
this.trackBmpd.draw(this.loader);

[code]....

But here i'm kinda stuck, i use the blendmode to see what the difference is, but how can i use this blendmode to create those movieclips out of it?

View 1 Replies

Actionscript 3.0 :: Preloading SWF Do Not Calculate Images (XML)

Sep 3, 2009

im creating a site with one frame and one swf, some images are call from an XML file populating som mcs, i have just made a second SWF with the preloading(just like lee´s tutorial), but the problem is that only calculates the size of the SWF(content) but not the size of the images from the XML, so i have to wait some time where i only see the structure of the SWF but empty! i was thinking of making other preloding for that images, but its going to be strange 2 consecutive preloding..

View 2 Replies

ActionScript 2.0 :: Calculate Where Lines Intersect?

Apr 3, 2005

I have been playing around with the fmx2004 drawing api. I am drawing a complex shape and all is well but I would like to make the lines smoother. I haven't been able to find a smoothing function but I am working on a custom solution using the curveTo method.

I have to be able to calculate where two lines intersect. i have their slopes and two points along each line, so now all I need to do is calculate their intersection. I can do it on paper but not in flash

View 5 Replies







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