IDE :: Flash SortOn Function Not Working Properly?

Dec 6, 2009

Code:
var vendor_arr:Array = new Array();
//vendor_arr.push(new Array());
var level1:Array = new Array("yelp","yelp","yelp","yelp","yelp","yelp");
var level2:Array = new Array("a","b","c","d","e","f");
var level3:Array = new Array(12,14,7,2,11,24);
[Code] .....
Why is it not sorting on "bdistance" ?? its returning 2, 14, 7, 12, 11, 24... what kind of sorting is this??

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Flash - SortOn() Array Function?

Apr 13, 2011

I have an array of objects. The objects have a base class with various properties. Each time an object gets created, I push it into the array. However, I need to sort the objects based on one of their properties.Lets say in my object class, I have a function "ReturnNumber()" that returns a number, I want to sort my array based on which number was the highest. Can I use SortOn() to do this?

View 1 Replies

ActionScript 3.0 :: Timer Event Function Not Working Properly

May 6, 2009

I'm currently doing a project which strictly relies on sharp timings and uses as3 timers...
But the timers make some problems..

Here's my code used to test the timers..
Select allvar milliTimer:Timer = new Timer(1);
var secondTimer:Timer = new Timer(1000);
secondTimer.addEventListener(TimerEvent.TIMER, tickSecond);
milliTimer.start();
secondTimer.start();
function tickSecond(evt:TimerEvent):void{
[Code] .....

View 2 Replies

ActionScript 3.0 :: Error #1006: SortOn Is Not A Function

Aug 30, 2009

While I was finishing the details of the carousel from my last thread another error occured which i cant remove :

ActionScript Code:
TypeError: Error #1006: sortOn is not a function.
at circle_of_buttons_fla::MainTimeline/enterFrameHandler()

The whole day almostly i was trying to figure it out but I couldn't so i will be grateful if someone can help

[Code]...

View 1 Replies

Flash Not Working Properly In Firefox And IE

Mar 4, 2011

I sorted this problem before, but it's back again.

Both of my animations work fine in firefox, but don't loop in IE.

ABOUT ME [URL]

KZX ANIMATION 2ND FROM BOTTOM [URL]

confirm that these animations don't loop properly in IE?

View 2 Replies

ActionScript 1/2 :: GotoAndStop() Not Working Properly Using Flash CS3?

Jun 30, 2009

gotoAndStop() doesn't work. I am using Flash CS3. My code is simple:

on(release) {
_root.gotoAndStop("menu");
}

I put that code into a button. The menu frame is three frames behind the frame that I put the button on. If I replace the "menu" with "game", it works. The game frame is one frame behind the frame the button is on. What happens is instead of going to the menu frame, it flickers to the menu frame, then reloads the lose frame, which is where the button is. I know that it reloads because I have a dynamic text field that throws a random insult when you enter that frame. I can assure you. I have already double checked and triple checked that the frame label is correct. And the menu frame has stop() in it. I'm not that stupid, alright?

View 8 Replies

Flash :: MX - Sound On/off Button Not Working Properly?

Aug 8, 2009

I used the tutorial found here. The 3 frames of my button are in a movie clip, within a keyframe in the main timeline. I used the code at the end in the tutorial for the first keyframe, so that the clip begins with music playing. However; I cannot get the buttons to work. I cannot stop the sound.

View 1 Replies

Professional :: Images On Flash Not Working Properly

Sep 14, 2011

Here is the website: [URL]. If you visit the gallery, the images are sliding TOO fast and i have no idea why, They work fine if I test in the Flash.

View 1 Replies

Flash :: OnPeerConnect Not Working Properly With Adobe ?

Mar 9, 2011

Anyone familiar with using Cirrus? [URL].. I'm having the hardest time getting the onPeerConnect object to work the way it should. I just need to be able to just take 1 sides nearID and give it to the other. and then when the near tries to connect to the far, the far should return true and allow connection, then at the same time grab the connecting farID on its own with farID = subscriber.farID; (which works, i confirmed it's getting the farID) but when i try this code it just see it getting spammed with....

TRUE
NetStream.Play.Start
NetStream.Play.Start
NetStream.Connect.Success
NetStream.Connect.Closed

[Code]...

View 1 Replies

Flash - Movieclip Color Is Not Working Properly?

Nov 23, 2011

I have 2 frames and in frame 1 the target MC color is being changed to RED. After that i go to frame 2. If i came back to frame 1 the MC doesn't retain the RED color. What i do wrong. Please see the pictures.

http:[url]....

View 1 Replies

Flash :: Flixel - Alpha Not Working Properly

Jan 17, 2012

I have something odd happening when I update a FlxSprite's alpha repeatedly to make it fade out. Instead of taking 150 seconds to fade out completely (I actually want 15 seconds), it fades out over maybe 2 seconds. I tried tracing the actual alpha value, and the sprite is invisible when the alpha value is around 0.95 (95% opacity, ie slightly transparent). how I can get the alpha to work properly in Flixel?

[Code]....

View 2 Replies

ActionScript 2.0 :: Flash Not Working Properly In Html

Feb 11, 2009

I have a html file which has flash in it. The flash has few buttons on it. WHen i just click on the html page, the flash works. However, when i get into the html file from other pages, which i use action script getURL to link it. The html file show the flash but the buttons in it is not working.

View 1 Replies

Professional :: Link Not Working Properly In Flash Banner

Oct 13, 2011

We have a Flash banner on the home page and each slide has a link to some other page. Everything works fine, exept in IE.
 
Basically what happens is that if you click on the banner the first time, the link will work fine and bring you to the new page. However, if you go back to the home page again, then the banner does not even present a link anymore (it will still work fine as far as the banner rotation is concerned - just no more links)..

View 4 Replies

Actionscript 2.0 :: Flash Buttons Not Working Properly On Website?

Jan 27, 2009

I am building a website that is all in flash.In the first frame there are 6 buttons. Each button has a code to go to a different place in the timeline, where something happens. For example, one of the buttons has this code:

on (release) {
gotoAndPlay("web");
}

Another button has this code:

on (release) {
gotoAndPlay("widgets");
}

And so on.Everything happens on the same timeline.When I publish the movie to test it (ctrl+enter), everything works great.The problem happens when I upload the file to my ftp and try to view it online. In that case, when pressing one of the buttons, instead of jumping to the place in the timeline where it should go, it just continues on to the next frame on the timeline. So for example if I press the "web" button, instead of going to the label "web" it just continues on to frame 2 in the timeline, and then 3,4,5 and so on until there is a stop(); in the actionscript.

After the first press though, it goes back to working fine. Meaning, the second time I press the "web" button, it will go to the "web" label, and from the second click onwards everything works great. it's just the first click on ALL the buttons that doesn't work, although it does work locally...

View 2 Replies

ActionScript 3.0 :: Flash Function Not Executing Properly?

Dec 24, 2011

I have the following code, it traces hi when increase is clicked, but spinspeed remains at 1.

Code:
var spinSpeed:Number = 1;
polyStar.rotation += spinSpeed;
increase.addEventListener(MouseEvent.CLICK, addspeed);

[code]....

View 4 Replies

Actionscript 3 :: Function From A MouseEvent Activated Function Will It Not Work Properly?

Jan 3, 2012

I am working with AS3 to build a very simple mp3 player on my site. So far the play and pause button work fine, but when I try to move the slider then click the pause button, it doesn't pause, and then clicking the play button again causes it to play a new file.I'm assuming that for some reason when I call the playMp3 function from my MouseEvent, it's within an object or something and not at the root, so it's like loading a new sound file, but I don't know how to fix that.URL...

View 2 Replies

ActionScript 3.0 :: Flash SortOn Messing Up Arrays

Feb 24, 2011

I'm using the .sortOn() function in AS3.0 to sort an array with multiple elements.First, I push the values to the array, like this:[code] The program has a number of "loops" it goes through. So, I push data to this array (which is global) a first time, sort it, and then later I clear the array with the .shift() function in conjunction with a for loop. I then push new data to the array with the same line of code mentioned above.But what's happening is this: on the first round, everything works great, and this is what my output looks like:[code]Before I cleared the array with for loop and .shift(), it would say "Northern Alberta & Prairies" in ALL array slots. Since I started using the .shift() function I managed to get BC to remain, but it's still clearing my southern alberta entry.

View 2 Replies

ActionScript 2.0 :: While() Not Working Properly

Apr 2, 2004

i tried following the duplicate mc tutorial, however the part on putting the code in a frame to get it to duplicate on load doesn't seem to work for me

here's my code in the frame:

stop();
amount = 5;
while(amount>0) {

[Code]....

apparently the clip only gets duplicated once where's the problem?

View 5 Replies

ActionScript 3.0 :: URL Loader Not Working Properly

Jun 25, 2009

I'm trying to do in this case is populate a List UIComponent that I created with information that I get back from the PHP file. For some reason the loader.addEventListener(Event.COMPLETE, userOnLoad) isn't working and my program never gets any farther than that.

Here is my code:
import fl.controls.*;
import flash.display.Sprite;
import fl.managers.StyleManager;
DECLARATIONS
var backgroundArea:Sprite = new Sprite();
var loginArea:Sprite = new Sprite();
var userArea:Sprite = new Sprite();
[Code] .....

View 1 Replies

ActionScript 1/2 :: IsNaN Not Working Properly?

Nov 26, 2010

I've noticed that by using isNaN(number), it doesn't always return true when needed. In fact, by using:
 
var bool:Boolean = isNaN(parseFloat(numberStr));trace(bool);
 
It will return true with:

-sdfda
$%&$
asdf
 
BUT, false (when it should be true) with:
 
230asdfs
230sdfasd.50
 
It seems like the letters between the numbers aren't even considered and it returns false when it should in fact return true... If it starts with a letter, it returns true, otherwise, with a number, it's false...I need to check whether or not there are any non-numeric (except "dot") in the parameter "numberStr" (a String).

View 4 Replies

ActionScript 3.0 :: CS5 Preloader Not Working Properly

May 6, 2011

I've implemented an internal preloader in my project but it's not working properly. I use Simulate Download but the preloader only shows after something like 80% is completed, which sort of destroys the purpose of the whole thing.

import flash.events.ProgressEvent;
stop();
function preloader(progressEvt:ProgressEvent):void{
var totalBytes:Number = progressEvt.bytesTotal;
var loadedBytes:Number = progressEvt.bytesLoaded;
[Code] .....

View 6 Replies

ActionScript 3.0 :: UncaughtErrorEvent Not Working Properly

Oct 2, 2011

I don't really get UncaughtErrorEvent working for my Air 2.6 application. if i step through the code with the debugger, i get very strange results.that's the code:
 
public class Main extends Sprite{
public function Main(){
loaderInfo.uncaughtErrorEvents.addEventListener(UncaughtErrorEvent.UNCAUGHT_ERROR,

[code].....

View 9 Replies

ActionScript 3.0 :: SWF Not Working Properly After Upload

Dec 29, 2011

I have a Flash gallery that works locally but not after upload.I added several photos to the xml file and only the original 8 jpgs are displayed.URL...

View 5 Replies

ActionScript 2.0 :: Preloading Not Working Properly?

Jun 30, 2009

I have a preloader in the first frame. The preloader appears only after 80 percent loading of swf.

View 0 Replies

ActionScript 3.0 :: Stop() Is Not Working Properly

Jul 6, 2009

The stop() is not working properly as if it were being ignored. I have even recreated a dummy flash document the stop() did work, however, it is still not working on the original design.

View 6 Replies

ActionScript 3.0 :: Droptarget.name Not Working Properly?

Aug 6, 2009

I'm setting up some objects connected to classes onto a movie clip dynamically, and although I'm setting the name fine, when I drag another movie clip on top of it and trace for droptarget.name I always get something like "instance01" what am I doing wrong?

View 4 Replies

Actionscript 3.0 :: URLLoader Not Working Properly?

Jun 26, 2009

i've been going over this code all day and I have no idea what's wrong with it. I'm doing a similiar operation a little higher and that one works so I have no idea why this one doesn't. All I'm trying to do in this case is populate a List UIComponent that I created with information that I get back from the PHP file. For some reason the loader.addEventListener(Event.COMPLETE, userOnLoad) isn't working and my program never gets any farther than that.

Here is my code:

Code: Select allimport fl.controls.*;
import flash.display.Sprite;
import fl.managers.StyleManager;

[Code].....

View 1 Replies

IDE :: Email Link Not Working Properly?

Aug 25, 2009

When tested my email window opens twice.

There is no target attribute used at all.

Also ?subject= don't work. Subject field blank in email popup box.

Using Flash 8.

on (press, release) {
getURL("mailto:me@thisplace.com?subject=No subject showing");
}

View 2 Replies

IDE :: Xml Images Not Working Properly With Masks?

Sep 8, 2009

I have created an image gallery for a client using actionscript 2 and xml. I have the gallery pulling in the images and text from the xml file and displaying correctly. The problem is the rollover/rollout affect I need to do. The image need an itunes affect flip, so the image looks like it flips to display a description then when you roll out it should flip back to show the image. The flash so far can be seen here [URL]

The flash works by pulling the image in from xml and putting it inside a place holder MC inside another movieclip. This movie clip contains a mask which creates the flip affect and shows a white box containing text over the image. When you rollover this works fine, but when I roll out the image, and title have disappeared when the white box is removed.

At the moment I have left the rollover affect out (as you can see on the link) but for my own sanity I would love to know why I can't get this to work. I probably havent explained this very well so I have attached a demo of how I am trying to get the rollover affect to work.

View 1 Replies

ActionScript 3.0 :: AddEventListener Not Working Properly?

Nov 25, 2009

have generated a random grid from movie clips stored in timeline. When I click on the movie clips, it should show a trace statement, but it is not working properly. Sometimes it shows the trace message, sometimes it does not show. My code is like this

Code:
package
{

[code].....

View 3 Replies







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