ActionScript 2.0 :: Algorithm For Determining Variety Within Set Of Data

Aug 25, 2006

Any algorithm to see how many different variations there are within a set of data... For example, if I had:
1 1 1 1 2 3 3 2 1 1 4
The algorithm could figure that there are 4 different "types". I don't mean 4 numbers, because there are obviously more, but 4 varieties; of course, how to go about count how many of the different types.

View 9 Replies


Similar Posts:


ActionScript 3.0 :: Determining Which Data Is Being Loaded

Jun 5, 2010

- I have an array of ~200 buttons. - Each button pulls individual info from a file online:

/routes/801/
/routes/802/
/routes/803/
...- My pseudocode looks something like this:

Code:
var myURLReq:URLRequest = new URLRequest("/routes/"+butNum);
var myURLLoader:URLLoader = new URLLoader();
myURLLoader.addEventListener(Event.COMPLETE, infoLoaded);

[Code]....

My problem is this: Let's say the user clicks 5 buttons. Since data doesn't load immediately, I can't assume infoLoaded is being called in the same sequence in which the user clicks the buttons, but I need to know which file just loaded. Is there a property I can get from ev:Event so it'll give me the URL I used to load myURLLoader?

View 3 Replies

Flex :: Algorithm - How To Generate Person Based On Data

Aug 4, 2010

Based on user input height, weight, measurements and other data, dynamically generate a person (can produce 3D graphics)?

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

Ability To Export FLV From A Variety Of Sources?

Aug 28, 2009

In Mac OS X I previously had the ability to export FLV from a variety of sources- QuickTime, MPEG StreamClip, Unexpectedly, the flv export option is now missing. In CS3, there used to be an Adobe QuickTime plugin called "flv.component". That item is no longer installed by CS4.
 
- The Questions

1) Is it still possible to export FLV from QuickTime, etc.?
2) If possible, which installed file or files provides this capability?
 
OS X 10.5.8 QuickTime Pro 7.6.2

View 1 Replies

ActionScript 3.0 :: Variety Of Tutorials On Subject Of Inheritance

Oct 14, 2011

i've been reading a variety of tutorials on the subject of inheritance, and i felt ready to try creating a chain of a few classes.right now i have two similar classes, Avatar and Enemy, which extend movieclip. What i'm trying to do is move a lot of their common functionality into a parent class which i'm calling Actor. I want to make Actor extend MovieClip, then make Enemy and Avatar extend Actor instead of Movieclip.[code]
What it says is true. I have an object in my library which is a movieclip. It's Exported for Actionscript with it's class as Soldier, and a base class of Avatar. this is the continuation of the chain. However it doesn't seem to want to work.As far as i understand, the above setup is pretty much equivilant to making a .as file for Soldier that extends Avatar.

View 5 Replies

Professional :: Variety Of Differnt Display "players" On Various Webpages?

Mar 16, 2010

I appologize if this is an overly simple question, but I am unable to find a clear answer elsewhere.
 
I have a movie created in Premiere Pro 1.5 and plan on exporting it in Flash format.  The flash video will be stored on my server and linked from other web pages.  The idea is to have the video open up in it's own window and not a full sized window.  I have seen a variety of differnt display "players" on various web pages.
 
Do I have to use software outside of Premiere Pro to do this (Such as Flash CS4 Pro) or is this a matter of link coding with reference to the file location? 

View 5 Replies

Actionscript 3.0 :: What Algorithm I Should Use?

Dec 20, 2010

[flash=]
package app.demo.MyTouchApp{
import flash.display.Sprite;[code]..........

how to perform a search in XML, so I use the above method, kinda hard code I know...for example, I try to search " keyIn:String = "BR1014"; " means I wanna search BR1014 in 4 XML files, so I load the XML info into an array, and using for loop to loop the XML array (in this case TitleArray1[i], TitleArray2[i]...) and compare it with keyIn (which store the value BR1014), some how the value is located in TitleArray4[i] which have the length of 12 (trace(TitleArray4[i].length) = 12)

so everytime I run it, I will overwrite abc 12 times... and out put 12 time the abc value, in this case BR1014 was located in TitleArray4[3], so the 4th output of "abc" is BR1014 but others is all 999...

View 2 Replies

ActionScript 2.0 :: Crossing Algorithm?

Jun 4, 2011

I have table

words = [aaaa, bbbb,cccc,dddd,eeee,ffff]
and i want to make table like this:
words2 = [aabb,bbaa,ccdd,ddcc,eeff,ffee]

View 1 Replies

Sql :: Realization Of An Algorithm In SQL Query?

Dec 14, 2011

I have a database which has 2 tables:

CREATE TABLE RecipeDB (
RecipeID INT PRIMARY KEY AUTO_INCREMENT,
Name VARCHAR,[code]........

I also have an actionscript, in which I have ingArr:Array of ingredient strings.Now, I would like to realize the following queries here:

1) Select (all fields) one recipe which has the most of ingredients from the array. If more than one record have the same amount of matches, then divide the number of matches by total number of ingredients in recipe and return the one with the highest ratio. If there are no matches return nothing.

2) As above, but return 10 recipes with the most matches and do not perform check for equal number of matches. Sort the results by the number of matches.

View 2 Replies

ActionScript 3.0 :: Algorithm - Stimulate Sea Wave

Dec 15, 2011

I want to stimulate sea wave,but I have no idea about it. Is there an example code for it? I know as3 can make many good graphics and text effect, so I want to learn it eagerly,but I don't know which book should I read. Anyone could introduce a good book for me about as3 algorithm? More example code are better in the book.

View 3 Replies

Java :: Sha Or Md5 Algorithm Encrypt And Decrypt?

Feb 25, 2010

I am developing my application in flex and JSP, so when I am passing values through HTTP Service Post method with request object but these values are tracing and modifying by testing team so I am planning to encrypt values in flex and decrypt it in jsp.so is there any algorithms like SHA or MD5 more secure algorithms,

[Code]...

View 4 Replies

AS3 :: C - Implementation Of Upper Power Of Two Algorithm

Mar 1, 2011

I have been trying to implement the Round Up Power Of 2 algorithm outlined in the following link in AS3.

[Code]...

The algorithm works great for most of the values I've tested. It is mentioned that this will return 0 when given an input value of 0 which is technically incorrect but I'm ok with that output. What I'm not ok with is when given an input of 1 I get and output of 1. I'm thinking that this must be a caveat of AS3 and its wonky uint implementation but I can't seem to figure it out. I have also tried using the >>> logical shift operator to the same result. My C is a little rusty, but I'm not sure how this would even return 2 in C. Can someone explain to me whats going wrong here? I assume if an input of 1 was a special case it would have been mentioned in the above link.

View 1 Replies

Flash :: Erase Algorithm To Be Implemented Using AS3?

Jun 10, 2011

Is there any algorithm to perform erase operation in a bitmap? I would like to create functionality similar to how photoshop or other graphic application performs erase. Is erase operation so difficult that there isn't much help (for bitmaps) available? I am OK even with name of an algorithm, I can proceed from there.

View 2 Replies

Flash :: Algorithm To Create Concertina?

Sep 12, 2011

I've searched and racked to no avail.. so, does anyone have an algorithm to create a concertina type rectangle, ideally horizontally. The desired effect is exactly like that of normal horizontal Window Blinds (assume they're closed- doesn't matter) of say 30 parts (or slats) of equal height and uniform width.

When such a blind is raised half-way up notice how the parts at the bottom go from dead flat to an increasing value in height, with perhaps the top-most part hanging normally.

Similarly, when the whole Blind is all the way up, all parts are flat. Conversely, when the whole Blind is fully extended, all parts hang at their own, uniform height. It's this "slightly differing but related to my neighbors height" I'm stuck on.

View 1 Replies

ActionScript 2.0 :: A Algorithm Of The Number's Sequence?

Dec 13, 2004

how to implement this algorithm: I have number (1-100), however, it will return to 0, when it meets 10, likewise 11 returns to 1, 12 to 2...

90 -> 0
91 -> 1
...

View 3 Replies

ActionScript 3.0 :: Button Animation Algorithm?

Apr 26, 2008

I have 5 Button movieclips, each with different states, (OVER, OUT, and ACTIVATED)Obviously when you rollover the button, itll play the over animation, itll also apply for the rollout event of the button. When you click the button, itll go to the activated state.Here's my question...What condition will i use so that when a certain button is activated and i click on a different button, the activated button will play its rollout state before going to its idle state.. What's happening to me is itll just quickly go to its idle state without playing his roll out animation.

View 8 Replies

ActionScript 2.0 :: Making Algorithm Using Two Arrays?

Jul 25, 2008

I am programing with AS2 so here goes my question: I want to create an algorithm that looks up an array and finds the nearest integer in it. Lets say i have different numbers like 1, 2, 4, 5, 8, 9 and i want to find the nearest member to 6 from those numbers. How should i build the algorithm. So far i'm using two arrays and two inside loops, but cant find the right way to make it.

View 3 Replies

ActionScript 2.0 :: Cyclic Algorithm In Flash

Jun 5, 2004

my program calculates ax,ay -> using this variables -> vx,vy -> after that I calculate the little step that my mc will make, in other words I calc x,y position [code]as you can see all depend on each other...but the problem is that after getting new x,y I want this x,y to be used to calculate next step!fo every new coordinate I want new vx,vy ax ay!

View 8 Replies

ActionScript 2.0 :: An Algorithm Of The Number's Sequence?

Dec 13, 2004

I met a problem while I am learning the flash actionscript 2.The question is how to implement this algorithm: I have number (1-100), however, it will return to 0, when it meets 10, likewise 11 returns to 1, 12 to 2...

90 -> 0
91 -> 1
...

View 3 Replies

Flash - Get Shortest Number Algorithm In AS Syntax

Apr 15, 2010

I want to put shortest int in shortest:
shortest = 500;
for(i = 1; i <= _global.var_process_count; i++) {
if(_root["process" + i].process_time_original.text < shortest)
shortest = _root["process" + i].process_time_original.text ;
}
What's wrong with above lines of code?

View 1 Replies

Actionscript 3 :: Implement SHA1 Algorithm In Flex?

Dec 9, 2010

I am building an application in Flex, wherein I need to encrypt user id and password using the SHA1 alogorithm. I have not come across any standard Flex library which allows me to do this. Does anyone know how to achieve this in Flex?

View 1 Replies

ActionScript 3.0 :: Manage The Depths Of The MCs Was A BubbleSorting Algorithm

Feb 5, 2009

I'm currently working on side scroller that has an isometric-type perspective (think Double Dragon) and the only thing I could think of to use to manage the depths of the MCs was a bubbleSorting algorithm.

[Code]...

Now this works fine (because I don't have a huge amount of MCs to sort), so I guess this is more of an academic question. As far as I know, bubblesorting is pretty much one of the worst sorting algorithms out there. Has anyone successfully adapted a better one for this purpose? Not trying to get you to post your code as much as just an idea for me to play around with because I'm a geek like that.

View 0 Replies

ActionScript 3.0 :: Linked List Sorting Best Algorithm?

Dec 26, 2009

I know there isn't a built-in linked list in AS3, but one can easily write his own. However, I found it difficult to come up with a good solution for sorting such list.If you didn't know, linked list is a chain of "cell" objects, where each object has a reference to the next object, typically you can write it like this:

Cell1.next = Cell2;
Cell2.next = Cell3;
CellN.next = null;

(Circular linked list and bidi linked lists are out of the scope of my problem, for now at least).

I looked into other languages that do have linked lists or even standard libraries for them, however, I don't seem to be able to either port any of their solutions, or, some of them, if ported to AS3 would not be workable (since they use recursion) or would otherwise have huge overhead because of lots of method calls etc.

I think, I'm focused on 2 possible algorithms: Merge sort and Insertion sort. These two seem to be most applicable to AS3. However, I may be wrong - so, please fill free to correct me.

View 5 Replies

Actionscript 3.0 :: Good Algorithm To Move Along A Path?

May 17, 2009

I have finished a little game called "math match". The idea of the game comes from "math mountain", a game is for the player who must caculate some kind of mathmatic questions, if the answer is correct, the player will move along a predefined path in several steps. I am newbie for programming games, so I am not sure what I have done in moving the role is the correct one, although it works okay. I know in Flash CS3, I can use motion guid layer to make the role move along a predefined path, but it seems it's not good in the game, or I don't know how to control it in actionscript 3.0. So I used many 'marks'(little movieclip) along the path. That divide a path into small pieces of lines, so I can move the role along the lines. If the 'marks' is enough, the precise is enough, the movement works okay.

But I think it's quite not a good method. I don't know if there is any good algorithm to move the movieclip along a predefined path, and this path is random, is hardly to be described by any math equation. I think in Flash CS3, we can draw a path by author tools, indeed Flash CS3 use some algorithm to do that. If we can get that math equation, we can simulate the movement very precisily, but is it possible? I don't know.

View 7 Replies

ActionScript 2.0 :: Mod-10 Number Validation Algorithm (modulo 10)

Jul 22, 2005

I'm looking for a Mod-10 (modulo 10) validation algorithm writen in actionscript. From a text-field, the user will enter a code and on submit, actionscript will validate if the number is right.

View 3 Replies

ActionScript 3.0 :: Algorithm Break Down A Number Into N Chunks?

Jul 17, 2009

I'm looking for an algorithm that will break down a number into n chunks, so that the sum of the chunks will equal the original number. Example - take 30,000 and break it into 100 random numbers - but the sum of those numbers needs to be 30,000.Seems there must be some algorithm to do this, just not sure what it is called.

View 6 Replies

ActionScript 2.0 :: Image Placement Algorithm Or Logic?

Jul 31, 2010

I'm builiding some sort of data portfolio in a section of a website. The method i'm using is the next one:

- Load an XML with all the data
- Call a function to build the portfolio.
- Use a "for" within said function to place all of the images at their respective positions

So, what I'm trying to achieve is to place the all of the nodes at the same time on and off screen following the next pattern:

[Code]...

View 1 Replies

ActionScript 3.0 :: Flash Matching Pattern Algorithm

Dec 2, 2010

[Code]...

Is there a way to do this with RegExp maybe? I know that I could just add each variation of each pattern to the array, and just search it, but I want to do it more intelligently.

View 4 Replies

ActionScript 3.0 :: Determining The Value Of A Bit In A Byte?

Feb 28, 2012

Determining the value of a bit in a byte? Hence at a current position?It's something with bitwise but im not entirely getting it. I know how preset a uint's value (a 32 bit's value)Just not....able to take part of a bit (say the 3rd, 4th, 5th, and 6th position of byte A into a new byte(byte B))etter example:001101000101110100101110101011101000Let's say that's a 32 bit segment.

View 6 Replies







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