Flash :: Double Or Float Data Type In Flex?
Jan 25, 2011What data type do I use in flex (flash builder) to create a "double" or "float" data type. I need the numbers after a decimal point. (i.e. prices)
View 2 RepliesWhat data type do I use in flex (flash builder) to create a "double" or "float" data type. I need the numbers after a decimal point. (i.e. prices)
View 2 Repliesis there way make swf like this : http:[url]......
View 1 RepliesI'm trying to read some data in from a sql source, some of which contains double quotes embedded in the text. I know I can strip the doublequotes, but don't want to go that route if I can avoid it. I've tried replacing to double quotes with hex codes before passing the text via parameter to my flash file, but the text string always cuts off at the hex code, the same as if the double quote were present in the string. For example:This is a "text" stringreplace double quotes with hex: This is a x22textx22 stringesults when read into flash: This is a <remainder is dropped>Yet if I type the same text string in a variable in flash, the string displays the double quotes properly:
View 1 Repliesi load in AS3 data into flash and mantain their data type? Like receiving an array and even with arrays in it and recognizing that is an array instead of a standard string.
And if this is possible is it more reliable then using XML?
private function getPercentage(max:Number, value:Number):int
{
return Number((value*100) / max);
[code].....
I'm trying to convert the byteArray of a Sound Object to an array with floats. The Sound Object plays back fine & at full length, but the float Array i get from it is cut off (but sounds correct), so i must be doing something wrong in the conversion:[code]The top two channels are the original Sound Object.The lower two is the float Array Data. I aligned them so you can see that the beginning is cut off and obviously the length is incorrect.
View 1 Replies[Flex 4] Float left or right in layouts or containers?i have a main container, that is dynamic, 100% width, and in it there are 3 components. one should be floating to left, to right and the other will be centered. how do i do that?
View 3 RepliesWhen running flash on a web page you usually have to click the Flash object once and then once again to click a button.
Is there a way to avoid this because many users are missing the second click and wondering why nothing is happening.
I'd like to convert an arbitrary string (or for easier process a string hash) to a float number between 0 and 1. The purpose is to create a function that returns a color code for a given string so the user always sees that entity in the same color that is generated from its name.OP included this code in comments (included here for readability):
var hashed:String = MD5.hash(input); // creates a 32 long hexa
const max:Number = Number("0xffffffffffffffffffffffffffffffff");
var hashedHexa:Number = Number("0x" + hashed);
[code]....
Take a look at this demo, how do they accomplish the Inline Changes feature? To me it looks like they are floating a movieclip over the textarea. What I can't figure out is how they anchored the movieclip to stay in the correct position. If you type something before the movieclip it moves position along with the text, the movieclips even move to the next line when the text word wraps. Does anyone have an idea?
View 1 RepliesI have intercepted x-amf data being posted to a website from my computer by a flash application. I have the collected POST data in hex form. While some of it has translated directly to text, the rest is showing wierd symbols which probably means they're flash objects. How do I parse this data to get meaningful output outta it?
Basically, I need a script/program/anything that will take in amf data in the hex form, and output text and flash objects...
I am trying to save a Sprite object as a file on the device I'm working on and it seems to work. the problem I'm having is reading the saved file back and placing it back on stage as a sprite. Below is the code I have so far, could someone tell me what it is I'm doing wrong? I have a suspicion that the saved isn't what I expect it to be since the file sizes have been under a kilobyte.
public function save_album(e:Event):void
{
var outFile:File = File.documentsDirectory; // dest folder is desktop[code]....
How can I define a custom data type in flash? for example in C/C++ I can do something like this:
[Code]...
Is there a way something like this can be done in flash? Basically I want to be able to create my own variable types.
I need to send a byte array of data (its an image source) along with a bunch of other vars to a service.If I send the byte array using something like the following
var request:URLRequest = new URLRequest ( 'http://www.mydomain.com/upload.php' );
var loader: URLLoader = new URLLoader();
request.contentType = 'application/octet-stream';
[code].....
Typically you create a Vector (strongly typed array) specifying a data type like:
new Vector<PictureBox>();
However I need to create a utility method that should be able to create a vector of any given datatype. Is it possible to specify a type using a variable instead of hard-coding it?
var type:Class = PictureBox;
new Vector<type>();
I am loading images and data into flash via XML. Some bits of data are missing an image or just don't have one for various reasons. When the image URL is null flash returns the message TypeError: Error #2007: Parameter url must be non-null. I have been trying to catch this error using IO error event but I am unsure if this is the the correct method for doing this as I can't seem to get it working. This is causing a problem for me because when I add the items to the stage the data doesn't match the images and what I would like to do once I am able to capture this error is push a default image into the _trackArray which i will then use to add items to the stage.
[Code]...
I wanna ask if its possible to pass flash input type data to xml file?
View 9 RepliesWhat I have is a flash media player, and I want this to float on top of our forum such that when a user scrolls down, the media player follows.
I have yet to find a way to make it sit above html. It always pushes it down.
You can see the media player I am talking about at [URL]
This is the code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
[Code]....
I'm loading a toolbar that goes over the content of a website that is reviewed. The toolbar has some information we can fill in about the website we're reviewing. There is a problem when there's flash embedded in the original page. Our toolbar will show up behind the flash movie, so we can't use the toolbar as intended. Since we don't have control over the page that is loaded we can not alter the settings of the embedded video.
The question is: how can we make the DIV appear floating above the FLASH even though we don't have control over the embedded flash object?
Just started playing with the new AIR functions NetworkInfo and NetworkInterface, but can't build ...
This is the example I started from: tourdeflex But these lines cause errors:
var networkInfo:NetworkInfo = NetworkInfo.networkInfo;
var networkInterfaces:Vector.<NetworkInterface> = networkInfo.findInterfaces();
Is it possible to convert a float to a currency string in Flash AS2?
View 2 RepliesI want to implement a gameplay recording feature in a project, which would only record player input and seed of the RNG at the beginning of the level. Then I could take such record and play it on my computer in order to test it for validity.I'm only concerned with some numerical differences which might appear between different Flash Player version, Operating Systems or CPUs (or whatever else that might be affected). The project would be written for Flash Player 10.0.0+. What stuff I am concerned with:
[code]...
I won't be using stuff like hitTest, getObjectsUnderPoint, hitTestPoint, getBounds and so on, all collisions will be geometrical.So, are there any chances that using any of the pointed things above will yield different results on different systems? If so, what can I do to avoid them?
I'm using BlazeDS to marshall Java objects to Flex. What I'm seeing is that if a Java Float holds a integer value (whole number, such as 123), then it gets marshalled to a ActionScript int. I would expect that a Java Float always gets marshalled to an ActionScript Number as documented in the BlazeDS Developer Guide.
Is there a way to configure this or is this just a BlazeDS bug? Follow-up: The float is contained within a map. The Java map that is being passed to BlazeDS looks something like:
[Code]...
So it's serializing the value correctly, just as the wrong type.
I just started learning Flash Actionscript.
this._y = random(Stage.height)-(this._height/2)-Stage.height-200;
I got it from a code that make ball falling from top to bottom and i analysis that is this code that make it work. I wanted to change the code to make float from bottom to top.
We have a small flash application that has an text box.
under OSX Lion, with flash < 10.3.. it works fine
with OSX Lion and Flash 10.3.. every character typed to it, appears twice.
I want to place MCs in various places on top of an html background. the code for the background is here:
<div style="position:relative; width:100%; height:100%; z-index:10; left:
0px; top: 0px; visibility: visible;
<div align="center"><img src="Demo/Mech-Brake-LR.jpg"></div>
Its not officially a background image, but I want it to stay the same no matter what is being played...
im having some problems pushing the two vars below into a timerupdate function while trying to stop them turning into NANs.
Code:
vx=2.3;
vy=1.3;
//they are declared private
Im passing 2 floats(vx, vy) into a class, then running a function called
Code:
update(e:TimerEvent){
trace("Update:",this.x, this.y ,vx, vy, );
this.x+=vx;
[Code]....
Use Double Datatype in flex?
View 2 RepliesI'm tasked with updating a Flex project created by an outside contractor and in the Actionscript is the following chunk:
CONFIG::FLASH_10_1
{
//Some code here
}
I've never seen this type of structure before and I'm having a heck of a time trying to search for it on Google - I've found what it means in just about every programming language except AS3.
I created several components that are placed inside a VGroup. in one of the components code, i want to add an image and to move it. i don't want the image to be part of the vgroup and to be bound to the vgroup area, i want it to be like float in css. how can I do that?
update I want to be able to move the element in the entire area of the application. not to move it within the vgroup. i don't want this object to be attached to any container besides the main application window in order for me not to have limits how much can i move it and where.
[Code]...