ActionScript 3.0 :: Progress Bar On Slow Code?

Aug 1, 2011

I'm making a game, and while loading and saving levels the code can be quite slow, and at the moment that means the game just hangs while waiting for it. I was wondering if it's at all possible to set up some kind of way to track the progress of the code and display it visually as it happens. For example, to test this I set up a quick bit of dummy code that just fills an array with random numbers:

ActionScript Code:
public function init(e:Event):void {
var storageArray:Array = new Array();

[code]........

View 6 Replies


Similar Posts:


Flash :: Php Become Very Slow, Same Code?

Oct 29, 2009

I did a flash application that has a login form in flash, and authenticates in php. That was 3 months ago, and the sending requests and response is very fast -- that is, when i click submit button, within 3 - 5 seconds it will have a response from php.

Recently, I did another login in flash, using similar code as I previously have done. Now, the sending request and respond is very long, each time the server may take up to 10 seconds to respond. Why is it taking so long yet the previous one is fast?

Same host, same php files, similar swf (not much changes in swf).

View 1 Replies

Flex :: Finding Code Which Indicates A Progress Bar When There Is Activity On Microphone?

Dec 27, 2010

Any microphone action script code which indicates a progress bar when there is activity on microphone

View 1 Replies

Actionscript 3 :: Short "progress Code" Algorithm?

Apr 21, 2011

Does anyone have ideas to securely encode a small amount of data into approximately 8 characters? I have a project (Flash and Flex (AS3) not that it really matters) that must be deployed on CD/DVD-ROM (no local storage nor network access) but with a requirement to allow people to come back where they left off. Therefore there will need to be a code that is human-friendly to print (on dead-tree or PDF) or write down and to enter back into an input field, as well as being secure to stop cheating between different students.

There are 14 assessment items that can be completed in any order. At the moment I CRC32 their "login name" and take 16 bits from that result, and combine them with the 14 assessment bits into 30 bits that is then encoded using a form of Base32, giving 6 characters, then adding a check character, then using a character replacement for encryption. Upon return to the program and entering the 7 character progress code, after decryption and extraction, if there is a match in the name hash parts, it is assumed the completion bits are correct.

One problem identified was that only two characters change when completing each item. Is there some algorithm that would completely change the entire string if any one bit changes? Or is there a completely better way? I'd also like to store more data (dates, more bits for the hash to reduce collisions, location within the course, etc) but don't want to go above 8 or 10 characters.

View 2 Replies

Create A Progress Bar (248px Wide) With A Slider That Moves According To The Movie Progress

Jun 4, 2010

I have an SWF movie (1375 frames) and created a progress bar (248px wide) with a slider that moves according to the movie progress. I'm doing that next way:Calculating the distance for the slider to be moved each frame (248 / 1375) On each ENTER_FRAME moving the slider for the calculated distance The problem is - the movie ends far before the slider reaches the end of the progress bar.

I'm thinking that the distance (Step 1) is is somehow ends floored by Flash and the actual distance it moves the slider is smaller than required. That's why the movie ends, but the timeline control just passed the 2/3 of its way. My question is - is there any solution for the problem? Or any other way to go, if it's a wrong one?

View 2 Replies

Flex :: User GetRepeaterItem To Set The Progress Of A Progress Bar?

Mar 2, 2011

I have a progress bar inside a repeater and therefore I will need to use getRepeaterItem to set it's progress as suggested in this question.

How can I do that such that the value of progress may be taken from repMonitor.currentItem.threatLevel?

<mx:Accordion id="monAccordian" includeIn="Monitoring" x="10" y="10" width="554" height="242" change="monAccordianChange()" >
<mx:Repeater id="repMonitor" dataProvider="{monitoringArray}">

[Code]....

View 1 Replies

Flash :: Timeline Code To Object Oriented Code - Access Instances Already On Stage

Jan 12, 2011

As stupid as my question might sound, i have spent the last 2 weeks reading oop books; but could use some guidance. I have a flash project that is basically a supped up slide show. On the stage i have the following: main_mc (instance name = images_mc) = movieclip which holds "pictures" ui1 (instance name = ui1_mc) = user interface that allows user to draw on picture (when drawing is enabled) ui2 (instance name = ui2_mc) = activates invisible hit areas (buttons) on select pics, when hit area is clicked, we jump to another pic in the main_mc.

I accomplished all of this on the timeline, but am updating the code to OOP. I am having A HELL OF A TIME trying to figure out how to store references to the instances (images_mc etc..), so i can control them from varying class files. I have found it is easy to control the instances from the documentclass, but not from unrelated class files. Example: images_mc.stop(); works in document class; but ovieclip(Parent).images_mc.stop() doesn't seem to work from any class file.(ui2 class file for example);

[Code]...

View 2 Replies

ActionScript 1/2 :: Repeat Small Bit Of Code 1-100 Hundred Times With Each Code Having Different Instance Name?

Nov 20, 2010

here's a part of my code:
 
player_mc.onEnterFrame = function() {
if (enemy0.hitTest(this)) {
enemy0.speed = 0;
} else {

[code]...
 
Note the red code, I need to repeat this an unknown amount yet multiple times but with the number on the end of enemy incremented by 1 each time. It starts with 0 as you can see the code just above the red. I heard about for loops using 'i' but im unsure about how to use it.

edit: ah, this forum isnt letting me highlight red. Everything in this editor is also failing. well, when I say code in red i mean this code:

if (enemy1.hitTest(this)) {
enemy1.speed = 0;
} else {
enemy1.speed = 1;
}

View 3 Replies

ActionScript 3.0 :: Way To Have Main Timeline Code Interact With Code Inside Of Symbol.

Jan 29, 2012

I'm looking for a way to have my main timeline code interact with code inside of a symbol.I'm tying to get my timeline inside the symbol to gotoAndPlay(10) when something happens in my main timeline code.

View 3 Replies

Javascript :: Can Js Code On Site Prevent Other Js Code From Detecting Presence Of Flash

Jan 22, 2011

I'm looking for a workaround to the "AdSense does not let you choose only images but no flash" issue. I'm rather a newbie to JS, but is there any way for one script to prevent other scripts embedded in a site from detecting the presence of the flash plugin? Even if it doesn't work with AdSense, it would be nice to know if there's a hack to do this that might work in other settings.By the way, I suppose I wouldn't care if it failed to work on IE or obsolete browser versions.

View 1 Replies

ActionScript 2.0 :: Centralize Code In All Movies Using Dot Notation Instead Of Spreading Code All Over The Place?

Jul 10, 2003

I have attached a simple test fla.I am trying to centralize my code in all my movies using dot notation instead of spreading my code all over the place. It never works, I must be doing something wrong.The test .fla has a movieclip with a timeline animation. I used the linkage identifier to name it 'reload' AND named the instance 'reload'.

_root.reload.onRollOver = function() {
this.gotoAndPlay(2);
}

The pointer doesnt even change to a hand.

View 4 Replies

Flash :: Relationship Of Code On First Frame Of Main Time Line To Class Code And Library Objects?

Mar 27, 2011

Got to the point where the hole in my AS3 knowledge is getting large!Realising I have confusion about the relationship of:Body of code on first frame of AS3 file.(Which I have so far used to create instances of library objects using addchild and make calls to class code).Is this code called the document code? What do people call it?Numerous classes linked together by extending each other etc.Library objects (usually graphical objects)Should it be done differently? have the following problems due to lack of understanding:Addchild complicated from a class but straight forward in main body code.Cant call functions on the main body code from classes, because class code does not know the main body code exists?

View 1 Replies

ActionScript 3.0 :: Delete Row With Code=4, But In The DetailTable, All The Rows With Code=4 Are NOT Deleted?

Feb 4, 2010

I have 2 tables,a main table with a field code as primary key, and other table detail, named p.e. DetailTable, with 3 fiels as primary key.What I want to do, it's a delete a row in MainTable, all the rows in DetailTable,where field code is the same as field code in MainTable should be deleted too.Here is the SQL to create the tables.

var sql2:String = "CREATE TABLE IF NOT EXISTS MainTable [code]....

when tables are created, insert data. I connect without problems, delete a row in MainTable (see the code), for example delete row with code=4, but in the DetailTable, all the rows with code=4 are NOT deleted Why?

[CODE]// Inside a class
private var conn:SQLConnection; 
public function constructorClass(){conn = new SQLConnection();ConexionBD();}[code]...

View 3 Replies

ActionScript 3.0 :: Copy And Pasted Code, First Code Works, Second Doesn't?

Jun 9, 2011

I've literally been staring at this for 7 hours. I'm missing something.I have two movie clips on the stage. The instance name of the first is puzzleAK. The instance name of the second is pieceAK.The first is linked to a custom class called GeoPuzzle. The second is linked to a custom class called GeoPiece.The code compiles but throws an error (as explained).The code in the main timeline:

puzzleAK.fullName = "Alaska";puzzleAK.abbrev = "AK";puzzleAK.isLocked = false;trace ("made it through puzzle definitions: " + puzzleAK.fullName + " " + puzzleAK.abbrev + " " + puzzleAK.isLocked);

[code].....

View 7 Replies

ActionScript 3.0 :: Timeline Code And Separate AS File Code Working Together

Dec 27, 2010

Is there a way to make code on the timeline and code in a separate AS file communicate with each other?I have two buttons, a yes button and a no button.I have a confirm box which is a movie clip. In the movie clip I have the two buttons on it and code so that every time one of the buttons is clicked it runs a function.I have the rest of my code for the movie (so the code to make the confirm box appear) on a separate AS file.Is there a way I can define the functions on the movie clip and run the functions with the separate AS file?

View 7 Replies

Library/API/program For Converting Flash Code Into Html5 Code?

Aug 25, 2004

What library/API or even a program for converting flash code into html 5 code automatically do you recommend me?

View 2 Replies

Slow Down MC Fps

Jun 4, 2009

Im not really new to flash, but pretty useless at Actionscripting and i think thats what i need in this situation.A flash movie was predesigned for us at 12 FPS. which was fine at first but now i have to import those movies into Adobe Presenter 7 which once published runs them at 30 FPS by default. So you can see my problem.. the 12FPS files run way to fast.Im trying to avoid having to edit everyone of those movies and increase the timelines to work with 30 FPS.. that would take weeks.So my question is, can i load the entire movie into a MovieClip and then set my main movies property to 30 FPS and have the MC play at only 12 FPS? i believe i read about this somewhere.or is there a way to automatically extend the timelines? im using CS3 Pro.

View 12 Replies

ActionScript 2.0 :: Converting On-clip Code To On-frame Code?

Mar 19, 2009

converting the following code (i got from some site, i can't remember which) to on-frame code:

Code:
onClipEvent (enterFrame) {
with (_root.player) {
// Controls Player Speed

[Code].....

Basically its a movement and hittest script for a maze. It works great but I need it running within an onEnterFrame in the frame code.

Currently the code is on a clip which contains the clip "walls". and player is on the _root timeline.

View 1 Replies

ActionScript 3.0 :: Code Vs Class Code / Stage Items Go?

Oct 22, 2011

I had a 2 frame setup with some actionscript for each frame. Tried to move it all into one class file and a

1. frame .fla. ; Hiding and showing the resp. moviclips when i virtually move from frame 1 to frame

2. Now I get these ...Error #1069: Property edit_panel_mc not found on flash.display and there is no default value. errors or..

when i thought beeing clever adding the stage. prefix ReferenceError: Error #1069: Property edit_panel_mc not found on flash.display.Stage and there is no default value. The mc's are on the stage... i have a single .as classfile. Why cant I reference them? or how should i do it/ what should i do to change it from beeing .fla script to class script.

View 9 Replies

ActionScript 3.0 :: Change Bitmap Code To MovieClip Code?

Nov 17, 2011

I'm working on an app for iOS where I want to load content dynamically from the library that contains text and graphics inside different MovieClip's.However, I have a problem, the code I have is for bitmap!How can I change it so it works for MovieClip instead?I want to use the MovieClip instead of bitmap?Also want to use the MovieClip class instead of Sprite class?[code]

View 5 Replies

Flash :: Converting Code To Pixel Bender Code?

Jul 9, 2010

I'm looking for some help converting as3 code to pixelbender code in an attempt to improve the performance of my application. This as3 code goes as follows. I scan through the Number values of a bytearray in chunks. Lets say this chunk lenght was 100 numbers I read 2 numbers (left and right) and try find the maximum values. The numbers in my bytearray are PCM data so there is millions of them and this code can often take a long time to execute, especially on a low spec machine.

The whole aim of this is to render a waveform as quickly as possible. I know very little about pixel bender. I can basically make a new file and create a shaderJob of it in flash but I'm really uncertain how to approach this...

[Code]...

View 1 Replies

Actionscript 3.0 :: Code A Class Instead Of Putting Code In The Stage?

Oct 1, 2009

I see a lot of tutorials about coding actionscript 3 when they use all the code in a Class.I keep thinking every time why they use it in a class, instead of using actionscript on the stage.why it is more functional to code a class instead of putting code in the stage actionscript?

View 3 Replies

ActionScript 2.0 :: Convert Button Code To Frame Code

Jun 5, 2007

I have a button with the following code attached to it:

[Code]....

I want to use this code on a frame. Is it onLoad I need to use??

View 1 Replies

Slow Down My Movie?

Jun 18, 2010

I have created a logo using several objects. And they come one by one on my stage while playing. But these objects (which all are movie clips) coming too fast.

View 9 Replies

ActionScript 3.0 :: My SWF Too SLow

Sep 1, 2009

I'm working in an application that is a kind of presentation with lots of content that should be displayed in "frames".

But I realized, after some struggle, that to put all the content inside the .FLA file doesn't work. Just a couple of tables with text imported from ms word are enough to let the FLA file unusable, even though it occupies little space on disk.

So I've written a function that loads content from an XML file and display it into a movieclip, that contains empty textfields and image containers. Another function organizes the content.

The problem is that the SWF file gets extremely heavy after navigating over a couple of frames, and I believe is shouldn't cause all the content is dynamic. I managed to remove all the listeners and loaded images.

If i have the windows task manager(ctrlalt del) opened while the Flash application is on, I notice that every time I update the content of a "frame" by clicking on a menu item or the navigation buttons, the flashplayer consumes more and more memory.[code]...

View 2 Replies

Adding A Progress Bar?

Aug 14, 2009

I have created a progress bar using AS2 before but I only vaggly remember how I know that it involes using some code that deals with percentages but other then that I don't remember how to do it and I really don't remember how to apply it to my my .swf. and have it appear in my HTML page.My flash file was created using AS2 in Flash CS3

View 1 Replies

ActionScript 3.0 :: Preloading Code To Code Without Having To Re-write Everything?

Jul 3, 2010

I have a small slideshow loading 3 different images with XML in an animated loader.My problem is that the first round, when the images are not cached in the browser, it starts playing before the images are finished loading.Is there a way to add a sort of preloading code to my code below without having to re-write everything? I tried to add an eventListener COMPLETE to the loading images but somehow it wont work?[code]

View 1 Replies

Flash CS4 For Mac Is Slow As Fudge?

Oct 20, 2008

Some stuff is as fast as before, like scrubbing and playing and applying a tween.But other, simple stuff, like selecting frames, adding frames - regular or key - takes 2-5 seconds each. Really anything with the timeline is slow. This happens especially with long movies (1.5 minutes - 2500 frames). Which shouldn't matter. I had movies 5 minutes long working fine.

View 21 Replies

Flash Animation Too Slow

Feb 12, 2009

I have Flash CS3 installed (windows) I have two images, I shape tween from one to the other.

The .fla file is 15MB in size, and the .swf is 800kb,

My problem is that, even though I've set the animation to run at 30fps, I barley manage more than 1.4fps a second, it should take 5seconds to complete, yet its taking 140seconds.

I have a 2GHZ dual core PC, with 2GB RAM,

I want it to be a smooth transition.

View 2 Replies

Slow Down Embedded Video In .fla?

Jul 6, 2009

i have an embedded video in my .fla. It's like the "background" of the scene. I need to slow down this video in a specific keyframe, and then return to the normal speed.

View 2 Replies







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