ActionScript 3.0 :: Build A Basic Calculator In Flex?

Apr 4, 2011

I want to build a basic calculator in Flex, My calculator will do the process that is entered in the text box and it will show it on that text box.For an example :

Text Box = "10+1"
Click the button
Text Box = "11"

View 3 Replies


Similar Posts:


Actionscript 3 :: Math Inconsistencies - Build A Calculator In Flex?

Feb 6, 2010

I'm trying to build a calculator in Flex / actionscript 3 but have some weird results using the class Math :

trace(1.4 - .4); //should be 1 but it is 0.9999999999999999
trace(1.5 - .5); //should be 1 and it is 1
trace(1.444 - .444); //should be 1 and it is 1
trace(1.555 - .555); //should be 1 but it is 0.9999999999999999

I know there are some issues with floating point numbers, but as you can see, it should at least fail for all of my examples, am I right?How the problem is solved in other calculators and how should I proceed in order to build a usable calculator in Actionscript 3 .

View 3 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 3.0 :: Build A Basic Quiz?

Nov 26, 2010

I'm trying to build a basic quiz - there are 6 questions and I want it to display a score at the end. Everything works and it shows a value at the end (but always '0'). It's not keeping proper scoring as users go along, it should be adding '1' point for each score, no matter what option is clicked it just traces '0' in the output window. Maybe something to do with the variable or? Kinda new to Flash, the chunk of code I believe to be the issue is below, 
 
import flash.events.MouseEvent;
//varialbe for keeping score
var score:Number = 0;
//event listeners for button clicks, which will adjust the scoring array

[code].....

View 1 Replies

Flash :: Flex - TFS Build 2010 Call An Ant Script And / Or Build?

Mar 31, 2011

In TFS 2010 build, I have a new build and I want to call an ant script that builds Flash. How do I call the ant script? Also How can I compile the Flash directly? I've seen the Power Tools and this question but it doesn't help me as we don't have TFS 2008. I can't find any documentation on how to use the power tools except the 1 sentence on the bottom of download page saying to create your build the old way and import it (which isn't very helpful). I've installed the power tools on the agent computer but I don't see any new options in the Toolbox when I'm designing the build flow.

View 2 Replies

Flex :: Creating Ant Build Script To Build Only When A Dependency Was Updated?

Apr 14, 2011

I just started working with ant a few days ago. Right now I have a general buildall.xml which should call each project's build.xml. Because some projects depend on each other, I need to rebuild some other projects which depend on it. This isn't a problem--I'm just setting the depends property of the target. However, ant is always building the dependencies, even when the files haven't changed.Let's say project1 has no dependencies; project2 depends on project1; project3 depends on project1, 2; project4 depends on project1, 2, and 3; and so on.I could hack a solution which looks at project K, and checks if project 1 .. project K have updated files using uptodate. If so, then run the target. This is messy and appears unnecessary.

What is the cleanest way to implement this?EDIT: So I decided to just hack in a bunch of targets, "check_projectK" where it does the uptodate checks on all of its source files, its build file, and the build files of the 1 .. K-1 projects. Due to dependencies, this is always handled correctly. However, this is still a large amount of copy and paste for a large workspace.

View 1 Replies

Flex :: Flex - Basic Usage Of Swffit. How To Make It Work

Feb 10, 2010

How swffit (http://swffit.millermedeiros.com/) can be used? I mean in my project I have dynamically expanding flash application, so once the expanding part riches the bottom I see standard flash scroll bar. Not browser scrollbar...

Here is how I defined my application:






public function addPanel(evt:Event):void
{
var panel:Panel = new Panel();
panel.name = "new";
panel.title = "new";
panel.height = 30;
panel.width = 100;
this.addChild(panel);
SWFFit.fit('my_flash', 800, 600);
}


public function main(event:Event):void{
SWFFit.fit('my_flash', 800, 600);


}
]]>
</mx:Script>
<mx:Button label="Add" click="addPanel(event)"/>




The html file (same as described in docs):

<html>
<head>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript" src="swffit.js"></script>
<script type="text/javascript">
swfobject.registerObject("my_flash", "8.0.0");
swffit.fit("my_flash",800,600);
</script>
</head>

<body>
<object id="my_flash" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%">
<param name="movie" value="Sample.swf" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="Sample.swf" width="100%" height="100%">
<!--<![endif]-->

<div>
<a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" title="Get Adobe Flash player" /></a><br />
You need <a href="http://www.adobe.com/go/getflashplayer">Flash Player 8</a> and allow javascript to see the content of this site..
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>

</body>
</html>


Will be happy to hear any feedback,



Added fixes described in answer 1. but come across interesting issue: e.g. browser scroll bar appears only on browser window resize, not when clicking add button...

http://img.skitch.com/20100210-qx9trerh8rq5athhnuwtidetr6.png

After add is clicked several times, I see flash default scroll bar...

View 1 Replies

Flex :: OSMF With Basic Authentication?

Jul 24, 2011

How would one create a video or audio stream using OSMF when there must be basic authentication on the url?Can one feed in Audio/Video using HTTPService to provide the header authentication?

View 2 Replies

Flex :: Remote Image With Basic Authentication?

Jul 24, 2011

I would like to load a an image from an external domain and I have the below so far:

private function get_coverArt(coverArtID:String):void
{
var requestString:String = "/rest/getCoverArt.view?v=1.5.0&c=AirSub&id=" + coverArtID;

[Code].....

View 1 Replies

Flex :: Call Web Service With Basic Authentication?

Mar 27, 2012

I want to call web service which has basic authentication.once url get authenticated then want to call particular service example xyz() which takes 2 parameter and return a flag .

View 1 Replies

Flex :: Adding Runtime-library-path To Flex Build Configuration Using Ant Mxmlc Task

Feb 9, 2011

I'm trying to build a flex project, linking it to some RLSs. When setting up the project in Flex Builder, the corresponding "build configuration" (that I got by adding -dump-config to the compiler options) generates (among other things) a tag like this :

<runtime-shared-libraries>
<url>some-lib.swf</url>
<url>some-other-lib.swf</url>

[Code]....

View 2 Replies

Flex :: Build Flex Stack Bar Chart From Objects Array?

Apr 21, 2010

I have a dynamic ArrayCollection that will contain a unknown number of objects of type MyObj:

class MyObj
{
type:String

[code]........

View 1 Replies

Eclipse :: Retrieve Build Information After Build Completes In FDT?

Jul 30, 2011

Using FDT, when I have a debug configuration with several operations in the launcher chain and the final launcher opens in Flash Player, how can I retrieve the build output from the console once the build is complete and Flash player is running?

It seems that once Flash Player has started the console clears to make way for the application's trace output, but I need to be able to look back over the events and build times for each item in my launch chain while Flash Player is running. Is there a setting I can enable to either log my build output to a file or to preserve it in the console?

Edit: I know I can still read the info when building normally, this question is specifically for building with the debugger.

View 1 Replies

Flex :: Build Several Files In Maven Flex?

Jan 31, 2012

I can use Maven with FlexMojos to generate swf file, but because I have several mxml files need to build, could I build them in 1 Maven pom file?I know if I separate them into several projects, Maven can build them. But because these mxml files have some shared functions, it's not easy to manage if I separate them.Another question is the size of swf file. The original file size build by Flex builder is about 80KB, but the file size by Maven is about 800KB. Is it normal?

View 2 Replies

Flex :: Use Air To Build A Chromeless CD Auto-run App?

Oct 15, 2009

We'd like to have an app autorun when our clients put in our info CD. Is it possible to do this using Adobe AIR... We were thinking of using the Flash Projector cause it compiles to an .exe which is easily launched, but there's no way to get rid of the ugly window chrome is there?

View 3 Replies

Flex :: Air - Build A Desktop Apps?

Jul 10, 2010

building a desktop app that can compile java, c, c++ files and display the results using the flex app

View 3 Replies

Flex :: Build Tooltip For Fxg Button

Feb 10, 2011

I have a nice looking fxg button, to which I want to attach a tooltip- how do I achieve that without much hassle? (the spark button does this out-of-box, but is not very visually pleasing)The examples I have seen on search is reverse- using fxg effects in the tooltip.

View 1 Replies

Flash :: Build External SWF In Flex?

Feb 24, 2011

I have a a module that I want to include in the swf build but I want the swf to be able to use the module (separate swf) externally. How can I build both the application and the module in different swf files? (I know it's something with the compiler, but not quite sure)

View 1 Replies

Flex :: Build A Template Like JSF Include Tag Or What Else?

Mar 7, 2011

I wanna creating a flex application. In that application left, down and right side will be same all pages but on center screen will be changed in order to click event. Is that possible? When i click button on the center screen, center screen will show another MXML (call another MXML but left, right and down side will be same). How can i do that?

View 1 Replies

Build A Flex Project On Ant Or Maven?

Jan 5, 2012

I am going to write a build commands for flex 4.5 project, which is only based on actionscript not with java. I am very new to both maven and ant.So can you people suggest which is more compatible and robust with Flex 4.5

View 1 Replies

Actionscript 3 :: Flex - Run Scripts Before/after Build?

Jun 11, 2009

Currently I'm building my Flex projects using Flex Builder's "built in" build system (ie, "clicking the run button"), but I'd like to start running scripts before/after the build.What's the easiest way to do that? Or, even, where should I start looking?

View 2 Replies

ActionScript 2.0 :: How To Build In Flex Or Flash

Jun 17, 2008

Anybody knows about family tree concept?How to build in flex or flash?

View 1 Replies

ActionScript 3.0 :: Build Mp3 Player In Flex / Air Application?

Oct 18, 2009

I need to implement add mp3 player to my AIR application build with flex

is there any tutorials on building mp3 player ( i didn't found any in the web )

View 2 Replies

Flex :: Swc Build Using Org.sonatype.flexmojos Is Failing?

Oct 14, 2011

I am trying to create and build a flex library project (.swc) using maven 2 firsttime.I am able to create directory structure but build is failing. My maven settings are : Maven version : apache-maven-3.0.2

mvn archetype:generate
-DarchetypeGroupId=org.sonatype.flexmojos
-DarchetypeArtifactId=flexmojos-archetypes-library

[code].....

View 5 Replies

Flex :: How To Add Post Build Actions In Builder

Aug 14, 2009

How do I add post-build actions in Flex Builder? For example, I'd like my build to work as normal, and execute from the bin folder; but I'd also like a copy of the final SWF to be copied to another folder automatically.

View 7 Replies

Actionscript 3 :: Flex 4: Build A Group With A Background?

Oct 15, 2009

I'm trying to build a simple component extending spark.components.Group to have a background color, more specifically a spark.primitives.Rect component stretched to fill the background.

This is what I've come up with thus far:

<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/halo"
<fx:Metadata>

[Code].....

View 2 Replies

Flex :: Run AIR Debug Launcher (ADL) Without A GUI For Continuous Build?

Apr 22, 2010

Is it possible to run the ADL without a GUI so that I can run FlexUnit tests during a nightly build? Right now, when I execute our test runner on our server (Ubuntu 9.04) it fails with the output: "Gtk-WARNING **: cannot open display:".

View 1 Replies

Flex :: Use A Style.css File From A .swc And Build The Project With ANT

Jul 9, 2010

I have an .SWC library with a style.css file inside. The .SWC file is added to my project and the style.css is used this way: <fx:Style source="assets/style/style.css" /> If I want to build my project with an ANT-script it says that "the external stylesheet couldn't be found". In ANT you need to write the path for assets with an leading "/". So this would work: <fx:Style source="/assets/style/style.css" /> But in this case it isn't possible to retrieve the style.css from the .swc as the compiler says that "the external stylesheet couldn't be found". Is there any way to use the style.css inside the .swc AND use ANT to build the project?

View 1 Replies

Flex :: Build A Txt Document And Write In Application?

Aug 14, 2010

how can build a txt document and write in flex application ?

View 1 Replies

Flex :: How To Build Interactive Data Visualizations

Oct 15, 2010

I'm trying to learn how to build interactive data visualizations, and I think I want to go the Flash/Flex/ActionScript route instead of using Processing.The problem is, I've never understood what the difference between all three is, so I don't know which one I should be learning.It sounds like Flash is more for designers/non-programmers, Flex is more for programmers, and ActionScript is just the programming language used in Flash and Flex (i.e., Flash and Flex are to Actionscript as the iPhone SDK is to Objective C...?). Is this correct?If so, I'm a programmer, so it sounds like I'd want to go either the Flex or ActionScript route. What's the difference between picking up an ActionScript book vs. picking up a Flex book?

View 2 Replies







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