Flash :: Massive Efficiency In Timeline Project?

Feb 1, 2012

this is the offending bit of code:

for (var i in yearMarkersArray) {
yearMarkersArray[i].x = ((timelines.x + 350) % 140) + (140 * i) - 5;
yearMarkersArray[i].text = "0";
}

This is part of the main loop that triggers whenever the user drags the zoomed-out timelines (the sprites in eventsArray) left or right. The six TLFText objects in yearMarkersArray appear to scroll left or right with the user, but are really repositioned and relabeled with the correct year markers as calculated by a function I did not include above (it's working and not relevant to this problem, I simply replaced it with the "0" for clarity).

The text-setting statement is the problem code...I've commented literally everything else out of the main loop to verify it. I even changed the statement to not involve any function call (simply setting the text attribute to "0"), and it still causes the final .swf to eat an extra 1% of my CPU every 15 seconds until finally the FPS crashes through the floor. The rest of the main loop has much, MUCH more complex and I'm sure inefficient code that also runs every frame,Since this project reads a data file with a list of timeline events whose span of years I cannot predict, I do need the displayed year markers to be done dynamically in some way. The code ultimately works (I only noticed the ridiculous slowdown when I accidentally left the movie open and idle for a few minutes),

View 2 Replies


Similar Posts:


Professional :: CS5 Flash Project Playing Back Slow In The Timeline?

Mar 16, 2012

My CS5 Flash project is playing back at half the FPS.

View 2 Replies

Limitations :: Load And Split A Massive Image In Flash??

Jul 25, 2011

How do you load an image that exceeds the 4096×4096 limitations of flash while splitting it?

View 5 Replies

Flash :: Using Bitmap Data To Draw Massive Image?

Feb 18, 2011

I am making a snow boarding game in AS3. The problem I am having is that I want to leave a trail in the snow behind the board.

I have had a think and feel that the best way of achieving this would be to use the lineTo() method to draw a line form the snowboards previous position to its current position. If I do this all of the way down the slope I would end up with a line almost 23000 pixels long which seems extremely large and will have a major impact on performance.

If I were to convert the trail movieclip to a bitmap would it improve performance? I am targeting a minimum of flash player 9 which I have found to have issues when handling bmp's over 2880 pixels so I think this method might not work.

View 2 Replies

Using The 'for' Loop For Efficiency?

Jun 17, 2009

I've got a long list of code which I think can be made far more shorter by using a 'for' loop, however, I'm not entirely sure how to go about this? Here's the code I have at the moment

if(event.target.hitTestObject(zone0_mc) && zoneFull[0] == false && event.target._ballPlaced[event.target.name.substring(4,5)] == false) event.target.x

[code].....

View 2 Replies

ActionScript 2.0 :: OnEnterFrame Efficiency?

Dec 16, 2009

Say I have 100 MC's (movie clips) in my scene that are spreading out in _x and _y. On every frame I need to check each of those MC's for a hitTest (or anything really). Would it be more programatically efficient to:A) Create a single array to hold all the MC's and do a for...loop to check all of themorB) When each MC is created create an onEnterFrame to check only itself (x100)?Hope this makes sense. This is an argument between me and my partner as to which will be the less processor intensive. My theory is that there would be no difference but I've read no documentation for it

View 3 Replies

Professional :: Building A Music Player / Efficiency?

Mar 8, 2012

I'm creating a music player to be on my website and so far I have it set up as such: The player is contained in a movieclip with a 'song progress bar', a pause and a play button.The songs are played by clicking the song title in a list in the main stage (not contained in the player movie clip), which sends the music player to the frame in which the song starts.
 
My audio is set as event audio so that the play and pause buttons can be coded as play(); and stop(): respectively which will stop the main player movie clip thus yeilding the progress bar from moving further and the song from playing.
 
This works just fine, except for the following:
 
- When I select event as my audio type the quality reduces dramatically Having the audio files in my library and not obtained from some outside source (i.e on my website's server) causes the .fla file to be much larger as well as the .swf Being as my project is at 24 FPS and each song is represented in as many frames as it takesto play the song out, my music player at present has only 3 songs 'in it', and my frames in the movie clip are approaching 20,000 (this is VERY tedious to work with) 
 
I'm sure there is a more efficient way of doing things, but my knowledge is limited. I'd imagine I can do something along the lines of loading .mp3's off of my website into the frame and the play pause buttons will enact more elaborate scripts that not only stop the progress bar but also stop the music from playing temporarily, or something like this. But I have no idea how to implement it

View 2 Replies

ActionScript 2.0 :: Lines Between Dots Approach: Efficiency?

Dec 20, 2006

I've got a question about the efficiency of two functions I wrote that do the same thing. I'm trying to figure out which one to use. The functions draw lines between a series of points, and continually redraw them as the points move. The first function uses the drawing functions in flash.The second function creates an empty movieclip and draws a short line in it, then uses trig to scale / rotate the movieClip to make it fit between the dots.Both work, but as my program gets larger I'm wondering which function would calculate faster.

View 5 Replies

ActionScript 3.0 :: Increase Efficiency Of Created Moves Around The Screen And Another Object

Sep 21, 2009

I wrote a class for an object that as soon as it is created moves around the screen and can create another object (replicating itself). That seems to work fine for a while, but after like 20 or so objects on the screen things slow down a lot! I create the first object on frame one. The rest is all done by the objects themselves.

Would it be better if the objects did not move around on their own, but rather through a loop on frame one or does it not matter? I am working on a simulation that should go up to over 100 objects, but with this problem can't get there. The object is just a movie clip (imported png picture about 4 by 7 pixel, not animated). I was going to replace it with an animated one later, but that seems unlikely now.

View 4 Replies

Add A Widget Board To Flash Project So Users Can Embed Project In Their Webpage?

Jul 4, 2009

I would like to add a widget board to my flash project so users can embed my project in their web page or wiget display. To see what I'm talking bout go here [URL] and click the white + mark on their widgets.If your a moderater please put this in the correct area, and consider making it a sticky so we can post new ways to impliment in different sites as they become available.

View 2 Replies

Actionscript 3.0 :: Import Authorware Project And / Or Director Project In Flash

Dec 10, 2010

I just wanted to ask if I have a project created in authorware and one more in director.I just wanted to ask can we convert authorware project in flash directly or indirectly?Or can we import authorware project and/or director project in flash.does anybody know or anybody has done this b4???

View 1 Replies

Flash8 : Massive Slowdown When Exporting To Movie?

May 26, 2009

I've been building my app' and testing it every day by exporting it to a movie, and testing everything.It's all been going very well and the .swf is usually exported to my desktop in less tha the time it takes to minimize the Flash window.Today I started work on my .fla (mark18) and added a "back" button to every scene (it takes the user back to a main page with the actionscript:

on (release) {
_root.gotoAndPlay("Main");
}

There are 9 scenes which are very short.BUT, when I tried to export it, it took about 15 minutes to export.

View 4 Replies

ActionScript 3.0 :: Loading A Massive Amount Of Images?

Nov 21, 2010

I made an app. I figured out how to load all my images into in.
 
I have about 1000 images and 1000 sounds that I am using in it. About 70MB of data
 
How will this affect a users computer?
 
Is it even possible the load up this much content?
 
I ask because I am getting stack overload error on my bulkloader!
 
Scares me to think that months of work will go down the drain because I can't load this much data!

View 4 Replies

Professional :: Massive Internet Explorer Conflict

Jul 8, 2011

I got this website at work which I've just updated.It was working pretty well, yesterday I showed it to a friend.And it was working perfectly. This morning, I hear sound but all i get is a black screen.It works on every other browser (chrome, firefox, SeaMonkey, etc.) but in Internet Explorer, black screened.If anyone can,I need a quick solution, my bosses are freaking out and that is kindda out of my league as for "trouble shoot".Why something that was working not even 12 hours go goes awry on me today?

View 2 Replies

Flash :: Buider Project Can't Listen Event In CS4 Project

Jan 28, 2010

I am developing a project in Flash Builder which will load a file built by Flash CS4. The code in Flash CS4 is below, it's a doc class. I am sure the dispatchEvent has been invoked[code]...

View 1 Replies

Media Server :: Massive CPU Usage FMS 3.5 Live Streaming

Jun 3, 2009

We have a problem working with FMS 3.5 (installed on a IIS server). Configuration of the servers all based on IIS: webserver (authentification, xml data loaded by Flash app, data (on IIS) sended to and recieve from FMS). Seperate FMS 3.5 (latest update) server. Only running FMS (no other apps are running on this machine).

[Code]...

View 7 Replies

Actionscript 3 :: Refactor Nicely To Avoid The Massive Switch?

Aug 9, 2011

I see this quite a lot and I was wondering if there was a way to refactor this nicely to avoid the massive switch? This is a method in a factory: RoomControllerFactory, instantiating a game location based on its type. Here's an example from a switch in the factory method:

[Code]...

View 2 Replies

Actionscript 3 :: Single Massive Class For All Data Storage?

Nov 14, 2011

I have created a class that I've been using as the storage for all listings in my applications. The class allows me to "sign" an object to a listing (which can be created on the fly via the sign() method like so):

manager.sign(myObject, "someList"); This stores the index of the element (using it's unique id) in the newly created or previously created listing "someList" as well as the object in a 2D array. So for example, I might end up with this:

[Code]...

View 1 Replies

ActionScript 3 :: Embedding Simplified Chinese - Massive File Size

Nov 4, 2010

So I am trying to embed some simplified Chinese into my flash file. When I turn off embed fonts the flash file is fine. If I add simplified chinese char set it makes the swf massive. Is there a way to embed a smaller character set than the ones flash offers. Standard English Characters if I add all the characters and pnctuation amount to 106, simplified Chinese is 11,218 it just is not doable.

So
(i) Can I smooth html text in flash
or
(ii) Can I used a reduced character set?

View 1 Replies

Flash :: Flex Project In A CodeIgniter Project?

Jun 18, 2011

I have a CodeIgniter project and I made a back-office in Flex. I was wondering how I can implement the Flex project in my CodeIgniter since I'm working with routing I can't route to any directory. So there isn't a way to display the back-office.

View 1 Replies

Professional :: Move Project To See The Not-project Area Around The Project?

Jun 21, 2010

I cant "center" my project, like you can see its "fixed" (yellow lines) in the left side and I cant see "invisible" part of project... (area around the project). how can I move my project so I can see the not-project area around the project. (picture 2).

At the moment situation... (cant see that area around the project)
http://img19.imageshack.us/img19/1186/68553623.png

View 2 Replies

Flash 10 :: Flash Project Test Project "Cannot Open A Protected Movie"?

Nov 17, 2011

I have set up a Flash Project to publish two FLAs simultaneously.However, when I click on "Test Project" I get the following error message:Quote:Cannot open a protected movie.However, when I publish each of these FLAs independently, I do not get the error message and the file publishes and runs with no problem.

View 0 Replies

ActionScript 3.0 :: Preload Project, But Wait For Said Project To Load External Assets?

Jun 15, 2009

I am working on this one project that has a couple of movieclips (already placed on stage) which have a custom class set to export via the Library. Each of those custom classes loads an external SWF using URLRequest().

Is it possible (or, what is the best way) to preload the whole project first, including the external SWFs?

View 7 Replies

Java :: New Project Created With Flex Mojo's Archetype Throws Cannot Find Parent Project-Maven Exception

Jun 15, 2010

Maven 2.2.1 unzipped,M2_HOME set and repository altered to point to different drive location in settings.xml Flex 4.0:

Installed Created a multi-modular webapp project using flexmojo:

mvn archetype:generate
-DarchetypeRepository=http://repository.sonatype.org/content/groups/flexgroup
-DarchetypeGroupId=org.sonatype.flexmojos
-DarchetypeArtifactId=flexmojos-archetypes-modular-webapp
-DarchetypeVersion=RELEASE

with following options

groupId=com.test
artifactId=test
version=1.0-snapshot

[code]....

Parent pom has swc, swf, war as modules.

Dependency is war->swf->swc.

With parent artifactId of swf, swc, war set to swf, swc, test respectively.On executing mvn on test folder(for that matter clean or anything) I get this following error.

G:Projects est>mvn -e
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
Downloading: http://repo1.maven.org/maven2/com/test/swc/1.0-snapshot/swc-1.0-snapshot.pom

[code]....

Looks like its trying to download the project from maven's central repository instead of building it.

View 2 Replies

Flash :: Call Flex Project From Other Flex Project?

Sep 16, 2011

I have 2 flex projects which were create in flash builder 4.5.....how can i call one project from second??? the best would execute to the same window.... I'm interesting about both possibility (in browser and air too).

View 1 Replies

Flash :: Convert Midi Timeline Into Actual Timeline That Should Be Played

Mar 13, 2011

I have researched the subject for some time now and still haven't figure it out.I use midas3 library (Midi-actionscript3) to import midi to flash. I get each note-item on a timeline. I get the divisions value (192) and all of the "GET-TEMPO" elements are equal to 81.I tried a lot of combinations to get the actual time of the midi but still no good (timeline*192/60 for example).The reason I know it is not synchronized to the actual time is that when I visualize the notes as simple rectangles in flash - I check if they appear exactly to what the mp3 file plays (I have converted the midi file to this mp3 using simple conversion program)I have read a lot about how all is calculated but still haven't figure out the number I need to use to get it right (timeline * MysteriusConstant = ReaTIME, what is the value of MysteriusConstant? is it really constant? and if not how do I calculate how it is changed?)

View 1 Replies

Actionscript :: Disadvantages Of A Flex Project Vs Project?

Oct 20, 2009

I've recently started making a game in FlexBuilder. The game is currently a Flex project. Is there any downside to using Flex as opposed to just Actionscript? A friend of a friend told me that Flex is slower than an Actionscript project. I've been unable to validate this on the internet; is there any truth to that claim?

View 6 Replies

Flex :: Get Project Framework Into ActionScript Project?

Mar 27, 2011

If I create a new flex project with flashbuilder, these are the libraries that get included by default through the Flex SDK[code]...

View 1 Replies

Eclipse :: Flex - Putting A Separate Project In The "example" Folder Of A GitHub Project?

Apr 30, 2011

I have one Eclipse Workspace containing two projects. - The first is my actual library. - The second is example code for using the library.When I push this code to GitHub, I don't want two separate projects, I want the example code to go into an "example" folder of the second library.How and where would I do this? From Eclipse, GIT, or GitHub?Or is there a better way of including sample code in GitHub projects? (the example code doesn't actually need any version control)

View 1 Replies

ActionScript :: Android - What Is The Difference Between Mobile Project And Flex Mobile Project

Jun 5, 2011

I am going to make an Arabic application using Flex builder 4.5. I have two questions that need to be answered What is the difference between ActionScript Mobile Project and Flex Mobile Project. (AS Mobile Project supports iOS and Android but I doubt about it!!)
Is Arabic support available in Flex Mobile Projects or AS Mobile Projects? I know TLF supports Desktop and web apps but does it support mobile platforms?

View 1 Replies







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