ActionScript 2.0 :: How To Simplify And Improve Code

Feb 14, 2007

Been reading up on the flash transition object. I came up with this way of fading out one clip and fading in another and having them loop forever using the transition objects but it's very dirty coding and not very flexible.

Is there a way to clean it up so that I can add as many clips as I want without having to write more code, just by adding more movie clips to the stage?

[Code]...

View 2 Replies


Similar Posts:


ActionScript 3.0 :: Simplify Code - How To Use Loop?

Aug 9, 2010

how can i simplify this code:

PHP Code:
stop();

import com.greensock.*;
import com.greensock.easing.*;
import flash.events.MouseEvent;[code]........

I think, for loop can be used but i don't know how

View 1 Replies

ActionScript 2.0 :: Simplify The Code For Mouse Events?

Dec 16, 2010

I have this code that's repeating for 40 different instance names that play 40 different movieclip names.

Is it possible not to repeat all this code for every instance name? For example creating a function that catch the instance name that is pressed and plays the correct moviclip name?

[Code]...

View 4 Replies

Flex :: Simplify AS3 Binding/event-dispatching Code?

Dec 8, 2009

There are 3 properties (example 1):

[Bindable] public var name:String;
[Bindable] public var email:Number;
[Bindable] public var address:Boolean;

I needed to have 3 helper methods that will be bindable too (example 2):

[Bindable] public var name:String;
[Bindable] public var email:Number;
[Bindable] public var address:Boolean;[code]......

View 3 Replies

ActionScript 2.0 :: Default Simplify The Code For Mouse Events?

Dec 16, 2010

I have this code that's repeating for 40 different instance names that play 40 different movieclip names.Is it possible not to repeat all this code for every instance name?For example creating a function that catch the instance name that is pressed and plays the correct moviclip name?

Code:
pressed=false;
clic=null;

[code].....

View 3 Replies

ActionScript 3.0 :: Improve Tile Effect Code In OOP?

Nov 9, 2009

I have two symbols in the Library...they are a shape of ball (Ball class) and a shape of a box (Box class)...I have a Tile.as class...which can create a tile effect with either the Ball class or the Box class...I can enter into the Tile class and change the tile effect to the shape I want to use...but I dont wish to do this. I would like be able to define a parameter which I can then pass in an argument for what I shape I want...to the Tile class constructor...so the class can be more flexible...But I don't know how I can do this...

ActionScript Code:
package {
import flash.display.*;
public class Main extends MovieClip {

[code]....

View 1 Replies

Actionscript :: Improve The Performance And Reduce Code Size?

Jan 25, 2011

There is so many ways to improve the actionscript performance and reduce code size. Let share what tricks you can come up with.

View 1 Replies

ActionScript 3.0 :: Simplify Functions An Variables?

May 26, 2009

I have an animation that has roll overs controlled by AS (see code below). It works the way I have the code, but it's really messy code. And I hate that I'm have the functions rewritten for each event.How can I simplify this code?

//On the main timeline
var gearsEnabled:Boolean = true;
var gears2Enabled:Boolean = true;

[code]....

View 4 Replies

ActionScript 1/2 :: Simplify With Array Loops?

Jul 11, 2009

I have a test here which is for a more complex interaction, but the principle is the same. What I would like to know is how to make the code more efficient, possibly through array loops?

View 5 Replies

ActionScript 3.0 :: Simple 'for Loop' To Simplify?

Apr 3, 2011

im a complete noob. how would i get this code into a simple 'for loop' to add 3 sprites named heart1, heart 2 and heart3. basically to simplify this mess

ActionScript Code:
var heart1:Sprite = new Sprite();
with (heart1.graphics) {
beginFill(0xFF0000); 
drawRect(0,0,20,10);

[Code]...

View 4 Replies

Flex :: Simplify Adding Multiple Text Inputs?

Oct 4, 2009

i have an application in which i have around 100 textinputs all are numbers

i want to simplify the addition ie. any other way than saying txt1.text+txt2.text.....

that would increase my code a lot

is it possible to have (n+=txt*.text) or some thing like that

View 1 Replies

ActionScript 2.0 :: Simplify A Switch Case With A Loop And Array?

Jun 21, 2008

I have this switch and I know there must be an easier way to accomplish this. For example if the user selects something it sets that button to a certain frame in this case nSelected, and sets all other buttons to a frame labeled nDefault.[code]...

View 4 Replies

ActionScript 3.0 :: Class To Simplify RollOver And RollOut Of A MovieClip?

Nov 15, 2011

Last week I made a class to simplify rollOver and rollOut event of a button based on MovieClip with ENTER_FRAME event. It works well but I'm not quite sure this is the best class, since I'm new in AS3 Classes. Now, if you don't mind to take a glimpse of my class.

Here is the class

Code:
/**
* VERSION: Early
* DATE: 2011-11-15
* AS3

[code]....

View 2 Replies

Way To Improve Video Quality

Jul 14, 2010

There is no maintainAspectRation property for video object.Then how to improve the quality of video when even we resize the video dynamically.It has to maintain good quality.How to achieve this.

View 7 Replies

Flex :: How To Improve Performance Of App

Jan 19, 2010

I am working on a flex application. The application occupies 100% of the browser screen, but it is slow to load. How should I improve the performance, what are the best techniques one should follow for improving the performance of a flex App. I did try some stuff though, I am not using relative layout instead i am using absolute layout and putting the buttons/images etc at exact places in a Canvas, still i feel it is slow. Can I profile the App or flex code to see where exactly the app is taking the maximum time to execute.

View 3 Replies

IDE :: Faulty 3D Transformation - How To Improve

Jan 31, 2009

I'm playing around with Flash CS4 trial and tried to 'compose' a 3d Box by putting 6 MovieClips as the side elements of the box in one clip which represents the whole box. (only using the Flash Tools, no Actionscript). Within the BoxClip (after doubleclick on the BoxClip on stage), all sides look right, each side is positioned with the correct angles and coordinates. Outside the BoxClip, back on root stage, the box sides are not parallel anymore, the angles are not 90 degrees, there is no 'box' actually. So I guess, one of the problems is the 3D Center point of the objects which is absolute to one point in coordinate space. The other problem is the faulty '3D' display in Flash, that is, changing from inside to ouside a clip changes the view also. So far, the Flash GUI seems quite useless for doing some '3D'. How to improve the workflow?

View 3 Replies

IDE :: Improve Quality Of Sound?

May 28, 2010

The quality of sound when playing my flash file on the timeline in flash CS4 is excellent, however when I go to test movie the sounds quality becomes awful, like its being played in a tunnel on terrible speakers, my sound files are .wav files, am I missing a process I must do to ensure the quality of sound is carried through to the final published animation?

View 5 Replies

Media Server :: How To Improve FMS Performance

Mar 25, 2011

I have two FMS 3.5 streaming servers... Both have Windows Server 2003 x64 with 16 GB of RAM..I'm streaming from a common storage and my Application.xml file is like this:

<Application>
<StreamManager>
<VirtualDirectory>

[code].....

View 7 Replies

Improve Font Appearances In Flash?

Feb 24, 2010

I am using Helvetica Neue 43 Light and it looks great as Dynamic Text without embedding the fonts. It is nice and bright, sharp edging, etc.

I notice though, that on other computers, the Helvetica Neue font is displayed as Times. I am presuming because these other computers do not have Helvetica Neue installed on their computer system.

If I embed the fonts, it looks the same as static text or text that I have broken apart. The fonts are thicker and has blurry edges.

Is there any way of getting around this and have my Helvetica Neue looking sharp and crispy like dynamic text without embedding the fonts.

View 3 Replies

Flex :: Improve The Performance Of PurePDF?

Jan 31, 2011

I am using the Open source PurePDF library in my Flex AIR application. The problem is performance:It takes 100% CPU usage and too long to generate a PDF.

I have done some analysis on it and find that the text writing in pdf is expensive. That's why I need to know how I can improve the performance. Are there any fonts for which pdf generation is less expensive, or is there some setting or tip that can make this process somewhat better in terms of performance? secondly in case of images the ImageElement generation is very expensive when writing that element to PDF. Is there any way to reduce the processing?

I found a way to reduce the ImageElement generation processing by resizing the image using flex and by then passing the small image's bitmap data to the image element. It works fine, and i have reduced the time of execution to a good extent. is there any way to tell PDF to work in chunks or divide the work in such a way that it may take more time to complete but won't block the GUI while the PDF is being generated?

View 2 Replies

ActionScript 2.0 :: Improve SEO For Flash Websites?

Oct 8, 2008

I would like to know if anybody could help me to learn more on improving SEO for flash websites as it is not as good as for html websites (if i am not mistaken).I have heard something about xml that can be used to improve your SEO for all your flash websites.

View 1 Replies

ActionScript 3.0 :: Improve Graphics Drawing Angle?

Dec 28, 2009

I have a code, that draws a horizontal line, then it turns into a slope, and at the end of the slope it draws a circle. Here's a code:

Code:
var xspeed:Number = 1; // defines increments for x of slope
var yspeed:Number = 2; // defines increments for y of slope
var hspeed:Number = 5; // horizontal line increments

[code]....

Create document 800x700 and put this code into main timeline. Now test movie As you can see, everything works great. But there is a problem. The circle is being drawn at 0 degree angle. But I want the circle to match the angle of the slope, so it looks like the slope and the circle are both at the same angle.

View 3 Replies

ActionScript 3.0 :: Improve Performance By Using Multiple Air Apps?

Feb 17, 2012

I have a program that is decently complicated in one area and the rest is simple. The complicated stuff is data crunching, pretty much. Would I get an increased performance by doing the data crunching in a second app and just having it send the couple bits of info I want from it to my other app that would be the front end of the program? Or is this a dumb idea? I know air doesn't by default multi thread, so I was just trying to think of a "work around."

View 1 Replies

Flex :: Improve Speed Of Adobe Script?

Nov 27, 2009

I am working on my first Adobe Flex application, and have a code section that appears to be running very slowly (but it does function properly!). CC_Output is a text control, all the other controls are checkboxes (CC, CC_Duration, etc.)[code]

View 3 Replies

ActionScript 3 :: Improve Performance Using Blitting For Graphics?

Sep 9, 2010

I am a bit new to using blitting for graphics. But I have worked up a few demos myself, and I have been reading a lot of information on the methods used. One common theme I have been seeing though is that all of them brute force rendering; drawing the farthest back object first and stepping through all other objects. even drawing objects that are going to be completely overlapped. The reason all of them say this is that any kind of testing to see what should be drawn actually takes more time than just drawing everything with no checks. Is there any kind of way to detect what should be drawn, that will run faster than just drawing everything?

View 1 Replies

Flash - Possible To Improve Performance Of Drawing Technique?

Oct 22, 2010

Am currently working on a tool created by a colleague of mine and would like to improve performance. Basically, it's a tool for drawing on screen and uses a combination of Sprites and the Graphics class to draw a line segment every time the mouse is moved when the mouse button is down. Here is the drawing bit:

// on MouseMove
protected function drawLine(e:MouseEvent):void {
if (currentTool.thickness > 0){
//pen
var line:Sprite = new Sprite();
line.graphics.lineStyle(currentTool.thickness, currentColour);
[Code] .....

As you can see, it checks if the line 'thickness' property and draws if it is and erases if it isn't. I did think of using a technique similar to blotting here where it'd draw to a bitmap but I'm not sure this'd give the performance boost I want or if, indeed, there would be any way to have an eraser function. The drawing itself works nicely - this isn't the problem, it's the performance of the subsequent 'drawn' sprites.

View 3 Replies

Improve The Space Between Flex Checkbox And It's Label?

Nov 25, 2010

How to improve the space between Flex Checkbox and it's label ?

View 1 Replies

Flex :: Improve The Performance Of The SQLite Database?

Apr 26, 2011

Background: I am using SQLite database in my flex application. Size of the database is 4 MB and have 5 tables which are

table 1 have 2500 records
table 2 have 8700 records
table 3 have 3000 records
table 4 have 5000 records
table 5 have 2000 records.

Problem: Whenever I run a select query on any table, it takes around (approx 50 seconds) to fetch data from database tables. This has made the application quite slow and unresponsive while it fetches the data from the table.

How can i improve the performance of the SQLite database so that the time taken to fetch the data from the tables is reduced?

View 3 Replies

Improve Text Quality In Flash With Enabled 3D?

Aug 7, 2011

I've put text in TextField, set Z coordinate to enable 3D, and placed object close to the screen plane. Text quality is very bad. Is there any way to force Flash draw proper vector text? Fonts are embedded, so it's not a problem.

View 1 Replies

ActionScript 3.0 :: How To Improve The Quality Of Dynamic Text

Jul 31, 2009

I am using dynamic text fields in my movie,but its looks very bad so i plan to use textformat, But i couldn't find any quality properties over there.

View 9 Replies







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