ActionScript 3.0 :: Boolean Tests Combination Of Values

Nov 12, 2011

The objective is when user clicks on any combination of 2 buttons you would then gotoAndPlay a new page based onthe two specific buttons you have selected? Ideally user would be able to intermix the button combinations. Code below only works for two specific buttons, but doesn't allow to intermix button clicks.

[Code]...

View 5 Replies


Similar Posts:


ActionScript 3.0 :: Boolean That Tests Combination Of Values?

Nov 11, 2011

The objective is when user clicks on any combination of 2 buttons you would then gotoAndPlay a new page based onthe two specific buttons you have selected? Ideally user would be able to intermix the button combinations.

I've attached a simple diagram that visually explains objective of actionscript.

Code below only works for two specific buttons, but doesn't allow to intermix button clicks.

[Code]...

View 4 Replies

Flex :: Fill A List With A Combination Of Database Entries And Meta-values?

Aug 31, 2009

I am acquiring the contents of a table to fill a dropdown box in a Flex 3 application:

<mx:ComboBox dataSource="{myList}" />

The list is populated by the contents of a database table of persons:

Public, John Q
Doe, Jane
...

The combo box, however, also needs to have some other meta-entries in it that do not come from the database:

ALL
ALL MEN
ALL WOMEN
Public, John Q
Doe, Jane
...

View 1 Replies

ActionScript 2.0 :: Upper- Or Lowercase For Boolean Values?

Jan 6, 2005

I'm reading a AS-book for a week now, and now it's about fscommands. But I noticed they use both lowercase & uppercase to start the boolean values (true/True & false/False).

Code:
fscommand("fullscreen", "true");
fscommand("allowscale","False");

Is that a mistake or does it just not matter?

View 1 Replies

ActionScript 2.0 :: Setting Boolean Values Within Function, So They Don't Confilct?

Jul 24, 2007

'm trying to do: I have a number of buttons on stage. When you rollover, a movie clip is attached. If you roll out, it disappears; if you click, it stays. Then you can drag it around. I'm using a boolean for the rollout disappearing trick. I've set these up in named functions.

[code]function attachBar(word) {
var showIt=false;
i++;

[code].....

View 2 Replies

Flex :: Parse Boolean Values In Strings For Use With Function.apply

Mar 13, 2010

I'm using String.split to parse a command line string into an array of strings. The result is then used to call a function using the Function.apply API.If apply(null, ["17"]) is called with this function:[code]does not work (expected output: false Boolean; actual output: true Boolean).Is there a way to make it recognize "true" and "false" (or anything else) as Boolean values, just like it does with numerical strings? Ideally "true" and "false" should also remain valid string values.

View 1 Replies

Flex :: Parse Boolean Values In Strings For Use With Function.apply?

May 5, 2003

I'm using String.split to parse a command line string into an array of strings. The result is then used to call a function using the Function.apply API.

If apply(null, ["17"]) is called with this function:

static function test(foo:int):void
{
trace(foo, typeof(foo));
}

it works as expected (output: 17 number).

However, calling apply(null, ["false"]) or apply(null, ["0"]) with this function:

static function test(foo:Boolean):void
{
trace(foo, typeof(foo));
}

does not work (expected output: false Boolean; actual output: true Boolean). Is there a way to make it recognize "true" and "false" (or anything else) as Boolean values, just like it does with numerical strings? "true" and "false" should also remain valid string values.

View 1 Replies

MX Hit Tests Won't Always Work?

Dec 28, 2009

Macromedia Flash MX 2004 I posted this somewhere else - but then realized no one actually uses that forum except to post ads...

Quote:
onClipEvent(enterFrame){
if(this.hitTest(_root.blaze))
_root.floor.speed = -20;
else{

[Code]...

I won't post the file because I'm using someone else's character and it's fine with them, but I doubt it should be here - this is the only code that's a problem, though.

View 12 Replies

ActionScript 3.0 :: Use ALT Key Combination (ex: ALT + A ...) ?

Jul 24, 2009

I have used a trick which has worked fine so far in our company's project.here how it works:
 
NOTE:
 
If you want to use AS1, ignore my soloution and just use isDown("18") with combination of othjer keys.

if you want to use AS2, you can not use isDown("18") in AS2.

if you want to use AS3 read the following:
 
1) Trap Alt keys using .isDown("18") in a SWF published as ActionScript 1.0;

3) In a SWF (AS 1.0) defined your keys like (All the letters you need, ex: A,B,...) with combination with Alt

4) Create a SWF published as Action Script 3.0.

5) Create an instance of the  Local Connection Class available in SWF(AS 3.0)

6) Create an instance of the  Local Connection Class available in SWF (AS1.0)

7) Talk between AS1 and AS3 using the local connection 
 
 NOTE: In order for your key combination to happen only once but not continusly, you need to do a trick like the following: THIS IS Action Script 1.0 SWF

stop();
 
var lastKey            = 0; var keyListener      = new Object(); var sending_lc       = new LocalConnection(); var resetFromAS3  = new LocalConnection();[code].........

View 3 Replies

Video And Slideshow Combination?

Oct 5, 2009

I need to create a flash file with video but at specific frames/times in the video I need an image to appear next to the video. This is the result of a research conference where the speakers were filmed as they talked through their presentation. The flash file needs to show this video alongside the slides from the speakers powerpoint presentation.

I already have the video converted using the media encoder and the slides from powerpoint converted to jpegs.I just need to know how I select a time/frame in the video and presumable generate some actionscript code to load an image at that playback time in the flash file.
 
A rather clunky version of what I am trying to di can be found at: http:[url]....

View 2 Replies

ActionScript 2.0 :: Player XML Combination?

Dec 15, 2011

Attached is a fla and it requires one xml file to load but the same has been missing. The name o the xml is playlist.xml. how the xml file to be write so that the player easily load the data from xml and will display

View 5 Replies

Setting Up Functional Tests In Flex?

Apr 23, 2010

I'm setting up a functional test suite for an application that loads an external configuration file. Right now, I'm using flexunit's addAsync function to load it and then again to test if the contents point to services that exist and can be accessed.

The trouble with this is that having this kind of two (or more) stage method means that I'm running all of my tests in the context of one test with dozens of asserts, which seems like a kind of degenerate way to use the framework, and makes bugs harder to find. Is there a way to have something like an asynchronous setup? Is there another testing framework that handles this better?

View 3 Replies

Organizing FlexUnit 4 Tests In FlexBuilder 3?

Jan 24, 2011

I've recently started practising test driven development - thus far I've been working on a library project, so I've organised my FlexUnit tests in a separate FlexBuilder 3 project, linking against my library's swc.Now I'm working on a web app and wondering how best to organise the tests for this. At the moment I've put them in a src/test package in the project I'm testing, with the test runner application at the same level as the default application. Is this the best way to do it, or should I have a separate test project and link in the source for the application I'm testing?

View 1 Replies

Professional :: Random Name Combination Generator?

Feb 19, 2010

I am currently putting together a simple game where people have to pass my tests to join a club. At the end I would like them to be given a unique name. I imagine this could be done if I make 3 lists of 50 words, and right a piece of code that randomly selects one word from each list to create a unique combination almost every time. I am using actionscript 2 because I am fairly novice and this is about as complicated as my code is going to be, but is this to bigger job for action script 2?

View 4 Replies

Flash :: Professional - Rhinoceros 4.0 In Combination

Oct 18, 2011

I would like to build a website in flash and use 3D models that I have made in Rhinoceros 4.0. Is it possible somehow to import Rhino 3D models into flash?

View 2 Replies

ActionScript 2.0 :: Key Combination Using Class From MichaelxxOA - ALT Key

Mar 22, 2007

I was using the class from Michael there nice class btw I was wondering is it possible to use the ALT key in flash for trigger events? I tried using the class from Michael but didnt work for me or maybe I was doing something wrong. When I tried when this class it open the menu on top of the flash player or html page.

View 2 Replies

Flex :: Include Unit Tests In A Library?

Nov 24, 2009

I'm working on a general code library for ActionScript 3.0 called as3lib which includes several extensions to the core API and some useful functions. I've written several unit tests (using FlexUnit) to make sure everything is working correctly.

What is the best way to organize these tests in the library? Currently, I have all my code in src/ and my tests in test/ but I've set up a secondary Flex project to run the unit tests. I am also manually adding and removing the test files from the library when I want to run the tests.

Preferably one where the compiled library doesn't include the test files but I don't need two separate projects to test them.

View 4 Replies

Actionscript :: Programming Tests For Flash Developers?

Feb 19, 2010

What programming tests do company's give Flash developers?

I would like to level the playing field for developers and recruiters.

I've heard companies give debugging tests with broken documents you have to fix. Flash developers could include Flash IDE users and actionscript programmers.

Everyone would like to know what to expect and understand some of the blind spots we face. A rundown on "what to be prepared for" may be a right answer. Best anecdote or inside scoop on major companies is good too (don't have to use real names, it's up to you). Perhaps you have an opinion of what is fair or reasonable, I'd like to know.

View 6 Replies

Flex :: Writing Integration Tests For App Using SqLite?

Jun 28, 2010

I want to write integration tests for a Flex application using pureMVC architecture.The back-end is sqlite.

View 1 Replies

Actionscript :: Creating A Function That Tests If An Array Contains Something?

Jun 19, 2011

openList = Array([1,1], [2,3], [4,5]);
containss = function (input, arrayData, tellID) {
for (i = 0; i < arrayData.length; i++) {
if (arrayData[i] == input) {

[code]....

This code returns false when openList contains 2,3. When I add trace(arrayData[i]), I get 1,1 2,3 4,5 and when I do trace(input) I get 2,3.

View 1 Replies

Actionscript 3 :: Write Unit Tests For Dictionary

Jan 20, 2012

This is kinda related to my other question: flex dictionary bug? The HashMap has a method getValues() which returns an array of values:

[cODE]....

the loop for (var key:* in map) iterates the keys of the dictionary map, but it seems its implementation does it in some random way. What is the best way to write a test since I don't know what the array returned by getValues method will contain? I thought I could do it by calling the sort method, and compare the values, is there a better way to do it?assertEquals(map.getValues().sort(), "value A,value B,value C,value X,value Y,value Z");

View 1 Replies

ActionScript 3.0 :: Positioning Works In Tests But Not In Browser?

Oct 25, 2010

I wrote an app that uses the stage.stageWidth and stage.stageHeight to position various elements. It works beautifully when I run the swf in the standalone player, but when I upload it to a site and view it in the browser the positioning is all wrong!

View 2 Replies

ActionScript 3.0 :: Why Doesn't The Keyboard Combination Work

Feb 4, 2009

Im in the very start of trying to make a little game. he problem is when you hold down the up arrow(speed) + left arrow(left turn) + space bar(brake). But the same combination, just changing the left turn with a right turn(right arrow), that works. he code is boat badly written and partly in Norwegian, sorry, but here it is:

Code:
package {
import flash.display.*;

[code].....

View 5 Replies

ActionScript 3.0 :: Action Be Initiated Through Pressing A Key Combination?

Sep 11, 2008

Can an action be initiated through pressing a key combination? Here's a snippet instructing a MovieClip to move right when SHIFT+Z are pressed...

Code:
stage.addEventListener(KeyboardEvent.KEY_DOWN, testFn);
function testFn(event:KeyboardEvent){
if(event.keyCode == 16 && 90){
dot.x += 5;
}
}

Only the first key is recognized, i.e. the dot moves when SHIFT only or SHIFT+Z together are pressed; the swf's ignoring the second key.

View 4 Replies

ActionScript 2.0 :: Detect When Keys Are Pressed In Combination?

Aug 15, 2006

I've followed the thread there: [URL]

I understand that this class allow the script to detect when keys are pressed in combination.

But what is exactly the implementation when a key is used both in single and combination states. Let's say that you've the "q" key used alone and "shift-q"...how would one proceed to achieve this detection?

View 2 Replies

Reset Database To Known State Between FlexUnit4 Integration Tests?

Oct 24, 2010

I have a Flex web app that communicates with a Java back-end via BlazeDS. The Flex client is composed of a flex-client module, which holds the views and presentation models and a separate flex-service module which holds the models (value objects) and service objects.

I am in the process of writing asynchronous integration tests for the flex-service module's RemoteObjects using FlexUnit4. In some of the tests, I modify the test data and query it back to see if everything works (a technique shown here: [url]...

How do I go about resetting the database to a known state before each FlexUnit4 test method (or test method chain)? In my Java server integration tests, I did this via a combination of DBUnit and Spring Test's transactions -- which rollback after each test method. But these Flexunit integration span multiple requests and thus multiple transactions.

View 3 Replies

Flex :: Configure Eclipse To Run FlexUnit Tests Automatically?

Jun 8, 2009

I'd like to set up my projects in Eclipse to run FlexUnit tests everytime I save my work.

I found an example with JUnit here : [URL]

How would you do it? Is it possible to run FlexUnit tests without Flash Player?

View 3 Replies

Flex 3 - Key Press Combination To Trigger An Event/function?

Jun 1, 2011

Within a specific canvas, I would like a user to be able to press a combination of keys which will trigger an event.(a bit like a cheat in an old megadrive game). Not sure where to start though. Anyone know if it is possible and if so could you give me a clue with how to start?

View 2 Replies

ActionScript 3.0 :: Capturing Keyboard Input For Specific Key Combination's?

Jun 15, 2010

capturing any of the keyboard combinations below in the Flash Player. I am building this as a stand alone .swf file, so there won't be any conflicts with a internet browser, though my concern is reserved operating system shortcut keys.

F3
Press
Alt + X
Alt + X + .

[code]....

View 1 Replies

ActionScript 2.0 :: Determining If Data Is A Number Or Word Combination?

Aug 4, 2002

I am running an if statement to determing whether the data entered by a user is a number or a combination of letters and/or numbers. How could I determine whether the data is just numbers? Like:

PHP Code:

if (textbox == notanumber) {
do something


I have tried using NaN and "undefined" without much success.

View 7 Replies







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