ActionScript 3.0 :: Commenting Code Makes The File Smaller?

Feb 26, 2009

I'm wondering if having large peces of text commented in your code, will affect the file size of your exported file, when you put it on the net.About half of my code is commented, so removing it would reduce my file size significantly, and thus decrease loading time. or is commented code removed automatically when you export the .fla file?

View 13 Replies


Similar Posts:


Actionscript 3 :: Commenting Code - Not Being An API?

Apr 14, 2012

Do you think its needed to comment code, unless is an API? I mean, a good code. With self explanatory variables and methods.

View 1 Replies

ActionScript 3.0 :: Any Particular Use For The One Slashed Code Commenting?

Aug 13, 2011

In flash develop sometimes I may be commenting on my code and I actually write just one forward slash instead of two(by mistake),When I do this in flash develop the code actually turns pink(default settings), I was wondering if there was any particular use for the one slashed code commenting. Or is the pink writing just there to show that you've made a mistake?

View 3 Replies

ActionScript 2.0 :: Grid - Makes A Big Rectangle Of Smaller Squares?

Mar 14, 2004

I am trying to make a Grid that is equal to the width and the height of the flash movie. I have a movieclip called box which is 30x30, and want it to repead along the x to form columns and along the y to form rows so that it makes a big rectangle of smaller squares. For some reason it looks like this:

+
+
+
++++++++++++++

Instead of:

++++++++++++++
++++++++++++++
++++++++++++++
++++++++++++++

Here is my code:

Code:
onLoad = function () {
boxWidth = box._width;[code]...

View 5 Replies

ActionScript 2.0 :: Same Instance Name Makes Code Only Work For One Object?

Apr 17, 2010

I happen to have this real massive code for an object in my game.(please guys dont move this to the game section the problem has hardly anything to do with that) One of them is a propane tank, the other a box and the third is a barrel.(it doesnt really make much diff i just want you guys to get a better picture of whats going on)So inside of each movieclip i put in this MASSIVE code.

ActionScript Code:
onClipEvent(load) {
var right:Boolean = true;
}

[code]....

it works fine but when i put in an instance name the whole thing messes up.only one of them works and all the others follow commands from the same one. so lets say if presse is true for the working on, presse will be true for all the rest. The problem still happens if i use different combinations of objects like 3 crates or 1 propane tank and 2 crates. Can someone please help me find a solution without changing the instance name. By the way '_root.hater' is the character.

View 0 Replies

ActionScript 2.0 :: Code Makes Flash Player Run Slowly

Jul 7, 2005

I am trying to get my mc to move up and have copies of that same mc follow about every 40 pixels. Basically a scroll with my "8ball" mc. Showing the mc every 30 pixels in the y-direction. I am using this code in the mc and I get a message saying that the script is causing Flash Player to run slowly.[code]

View 1 Replies

ActionScript 2.0 :: Photo Gallery - Make The Image Window Smaller And The Overall Movie Smaller?

Jun 25, 2004

I found this really neat photo gallery on flashkit but there is no support or readme included. how to size this thing.. the AS code does have comments but I am not a coder.I'd like to make the image window smaller and the overall movie smaller. 325x325 or so

View 10 Replies

ActionScript 2.0 :: Create Code That Makes A Movieclip Repeled By The Mouse?

Nov 6, 2006

i had this problem buggin me all evenin... does anyone know how to create code that makes a movieclip repeled by the mouse? like this kind of movement.. -- http:[url].....

View 5 Replies

Can't Get File To Be Smaller

May 4, 2010

I've been trying to get this png file as small as possible. It's currently 96kb and I'm going to use it for banner ads. Most limits are 40kb. When I compress this down and reduce the quality to about 50 it only gets me down to 50kb. Still over. I've tried converting it to a vector and a few other things but no luck.how I can get this as small as possible while preserving the blank background?

View 7 Replies

Can't Get Png File To Be Smaller Than 50k

May 4, 2010

I've been trying to get this png file as small as possible. It's  currently 96kb and I'm going to use it for banner ads. Most limits are  40kb. When I compress this down and reduce the quality to about 50 it  only gets me down to 50kb. Still over. I've tried converting it to a vector and a few other things but no luck. how I can get  this as small as possible while preserving the blank background?[url]...

View 2 Replies

Flex :: Why Is The Size Of Swf File Smaller Than The Sum Of It's Swc's

Jun 24, 2009

I compile my Flex application with several swc's (libraries) and it creates a swf file. The sum of the swc's is roughly 4 MB yet the actual swf generated is only 1.6 MB. How is this possible?

View 3 Replies

IDE :: File - Resized (smaller) Look Pixelated?

Mar 18, 2009

Why when I take a file that's huge and resize it smaller does it look so pixelated? I have on smoothing and the file looks great until I make it smaller.

View 2 Replies

Actionscript 3 :: Commenting Event Handlers Parameters?

Apr 14, 2012

How should I comment an event handler param?I mean, should I comment event handler param?Example:TimerMessage class extends Timer.TimerMessage class, has a setMessage method, which stores a text message whithin its public var 'message'.in usage:

var timer_message:TimerMessage = new TimerMessage(1000, 1)
timer_message.setMessage('hello')
timer_message.addEventListener(TimerEvent.TIMER_COMPLETE, displayMessage)

[code].....

View 1 Replies

ActionScript 1/2 :: Embedded .swf -- Load A Larger .swf File (#2) Into A Smaller One (#1)?

Aug 30, 2010

I have 2 .swf files.#2 will be dynamically loading into #1.

Lets say the stage size of #1 is 600x400.

Lets say the stage size of #2 is 800x600.

Is it possible to load a larger .swf file (#2) into a smaller one (#1), and somehow see the whole thing? As in, not crop the embedded file to the dimensions of the smaller "containing" file?

View 2 Replies

ActionScript 2.0 :: Better Colour Change Method For Smaller File?

Apr 5, 2005

using better code to reduce file size.I've just done a colour change swf for a friend who has a clothing business. Basically it just needed to change the colour of the t-shirt according to button presses.I just wanted to know if there is a better way (more code i assume) to do the colour changes? I'm looking for a really compact file size because there's a lot more to go in it yet.

View 3 Replies

Publish Settings And Quality Changes Don't Make File Size Smaller

Aug 24, 2006

My swf file is rather large, so I tried changing the quality settings and the publish settings, but nothing I do seems to change the size of the final swf.

View 2 Replies

ActionScript 3.0 :: Preloader Starts With Loading On 100% - Created A Smaller File To Demonstrate?

May 23, 2010

I have created a preloader in flash, with help from a tutorial, but it doesn't work properly. The preloader starts with loading on 100%. This is what I'm talking about:[url].......I created a smaller file to demonstrate my problem.

The code that I used is:

stop();
import flash.display.*;
this.stop();[code]..........

View 11 Replies

ActionScript 3.0 :: Make One .as File Code Interact With Another .as File's Code?

Mar 16, 2010

I am trying to find out how to make one .as file code interact with another .as file's code.like, if I had one .as file that specified options of movies and then when the user clicks on a movie (loaded through xml) it uses code from another .as file to load the correct movie.

View 5 Replies

ActionScript 2.0 :: File Which Makes A Ball Move To Left / When Pressing Right Arrow Key

Feb 4, 2009

I've attached a file which makes a ball move to the left when pressing the right arrow key.[code]On a Key.RIGHT it goes through a for loop. Shifting the ball 200 times 1 pixel to the left. Every iteration it tests for a hit with coordinates 100/50 (indicated by the red crosshairs). If there's no hit it moves 1 pixel to the left. If there is a hit it stops moving (no ball._x--).Funny thing is: while it eventually finds a hit, it does a final For Loop. Even though it should find a hit during that last loop when the ball is passing the crosshairs, it doesn't and moves the ball a final time 200 times 1 pixel to the left. Ending up with below image.URL...Why doesn't it find a 'hit' for that final For Loop while it's clearly passing it?

View 5 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

ActionScript 3.0 :: Write A Class File Using A .as File Instead Of Writing Code Into The Script Tab Of A .fla File?

Feb 4, 2010

I am trying to write a class file using a .as file instead of writing code into the script tab of a .fla file.When I write stage.addChild(img); I get an error that stage is null. When I take out stage, and just write addChild(img); the code runs fine, but nothing appears on stage. Do I need to do something to set a stage active?
 
Is this because I don't have a Main class? My class is named after the file and I don't have a file named Main.Here is the code. As it is, it runs and I get the two trace outputs, but no graphic on my screen.
 
package  { import flash.display.DisplayObject; import flash.display.Sprite; import flash.display.Loader; import flash.events.*; import flash.net.*;  public class HelloWorldImage extends Sprite {  private var background:DisplayObject, foreground:DisplayObject;  private var url:String = "hw_jpg.jpg";  private var loader:Loader = new Loader( );    public function

[code].....

View 7 Replies

ActionScript 1/2 :: ClickTAG Code In A Flash Banner Be Changed If Only Have The .swf File And Not The .fla File?

Oct 26, 2009

Can the clickTAG code in a flash banner be changed if you only have the .swf file and not the .fla file?

View 1 Replies

ActionScript 3.0 :: Code The Variable In The Html-file And Receive It In The As-file?

Sep 19, 2010

I have trouble passing a variable from HTML to Flash.I use swf-object2.2.how to code the variable in the html-file and how to receive it in the as-file?Its a simple shopId = 110

View 3 Replies

ActionScript 3.0 :: Repeating Code - Load A Different Xml File Not Just Use One File

May 24, 2010

So I have this code which loads an xml file

[Code].....

I want to have several buttons however load a different xml file, not just use one file. Would this mean I would have to recreate the above code for every button, or is there anyway I could reuse it?

View 1 Replies

Convert Swf File To Fla File With Script Code?

Mar 1, 2011

I have one designign query in need the code of Swf file so first i need to convert it to fla then i need a script code of it.but didnt fine it on internet.

View 1 Replies

Website Smaller When Uploaded?

Dec 9, 2011

I have created my website with flash pro cs5 and when i open my html it looks okay but when i upload it to my server host and view swf file it looks smaller in myindex html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

[code].....

View 1 Replies

ActionScript 3.0 :: .swf With Embedded .flv Much Smaller?

Jan 11, 2009

Don't know why it's smaller.Also, I could use .flv in Dreaweaver, but DW always insists on putting a skin on it.

View 1 Replies

Professional :: Swf Doesn't Get Smaller

Dec 28, 2010

I made a Flash 8 movie (Swf) that is 212kb in size. I could reduce the size of my .Swf by compressing its pictures. I did so, reducing the pictures inside it from 518kb to 183kb with Irfanview but when I import them into my movie/library and save it there is NO difference in size - it stays on 212kb.

View 5 Replies

ActionScript 2.0 :: Swf Doesn't Get Smaller?

Dec 28, 2010

I made a Flash 8 movie (Swf) that is 212kb in size.

I could reduce the size of my .Swf by compressing its pictures.

I did so, reducing the pictures inside it from 518kb to 183kb with Irfanview but when I import them into my movie/library and save it there is NO difference in size - it stays on 212kb.

View 3 Replies

Professional :: Nested Movieclip Become Smaller ?

Nov 27, 2011

I created a stage size 960 by 640, than i create a movieclip exactly the same size as the stage, but when i double click to get into the movieclip everything get smaller an object with 960 by 640 has reduce to 184by 140??? How do I get it back to the original size?

View 2 Replies







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