Flash :: Professional - New Dev Center Article On Using Pro Efficiently
Aug 30, 2011
Longtime Flash Pro, Flex, and AIR developer, Dmitriy Yukhanov, has written a new article for the Dev Center listing over 60 tips for efficient use of Flash Pro. Categories include: Improving performance Optimizing file size of project assets Developing Flash projects more elegantly Making project files easier to update Most of the tips are illustrated and quite easy to understand. This is one of the most comprehensive articles on this topic that I have seen.
I inserted video into flash movie. I loaded the .swf & .fla files onto a server and went into the properties in the flash movie and pointed to the server to pull the .fla file & the movie controls .swf file. I can preview the movie in flash with no problem. I am wanting to use the object code that was created as part of the .html file that was generated by flash and insert this into an article to display the video. I path the .swf file in the object code to point to where it resides on the server but the video will not play using just the object code. Is there a way to do this using just a object or embed code without the need for scripts?
I have one fla with a lot of library symbols. At some time part of these symbols were copied to another fla, and updated. Rather than copying the modified symbols back to the original movie, I want to use authortime sharing. So I click on one symbol at a time in the original fla, click source, scroll to the other file in the file chooser, wait for the library to open, scroll to an identically named clip inside an identically named folder ....the source is shown as a full path - is there a way to make it relative (in fact the two fla files reside in the same folder)?
What I want is I've a flash xml widget(created myself!) works like when I post a new article it'll be displayed in that widget through accessing rss. Then I placed it my website for visitors can publish it there site as a widget, the real requirement is coming now, I want to add a "pcode"(pcode means like utm tag, see the example [URL] in this url "demo" is the pcode) after the ending of each links from the article widget title(note: its an swf). So there is a 'variable' for pcode sets by php guy. So I want to pass that variable from php to Actionscript and it should display at the end of the article url like /?pcode=varible
I have overcome a problem, but my solution seems really inefficient and clunky. Please consider this problem:
I have an array collection with articles in.
This array collection is filtered to a currently selected article category.
There is a cursor bound to a view that shows the current article. When a category is deleted I need to delete orphened articles, I can't use the cursor or collection without affecting the views as they are bound.
After i publish a flash project and try to open the html file with a browser it is always at the left of the browser, why? In addition i have some problems with size too..
What is the size of the browser's area for viewing any content(i mean the parts below the navigation tabs to start menu)? How can i adjust my project to this? Note: My html settings seems true, it says "center center" but i dont know how to solve this.
how to horizontally center my Flash movie in the web browser window after publishing?
A bit of background: I was able to achieve this using <center></center> tags a few years ago. But I have since upgraded to CS5 and I understand that this old method is now obsolete.
I have found a few threads/forums that address this, but I know nothing about HTML and these threads don't help me because they assume you have more knowledge than I possess. When opening up the index.html file in Dreamweaver I can't find anything that looks vaguely familiar to what is being discussed. I have found some code samples using <div></div> tags but have no idea where to place it.
So I will need it explained to me in a step by step fashion, including which file I need to fix and what program I should use. Code samples will be very welcome if you can tell me exactly where it goes.
I have a news module that I am creating using XML that looks like this right now: When the user clicks on an article, I want the article to expand downwards pushing anything below it down too. How could I do that dynamically?
[URL] This article seems to say that all Flex 4 elements are now being added to a project using addElement() instead of addChild(). So my only question is why the switch?
I am building a Flex application using Pure MVC pattern and Zend framework for calling php code on the server. I need to sync some data with my server which is using MySQL as the database. And there are 5 such tables I need to sync. So I call these php functions at regular intervals from Flex and use long polling on php side. The client side code for my subjects lies in 5 different proxies.
Should I send 5 separate requests from each proxy to call the php code which is lying in separate classes. Or should I build a separate proxy to send 1 request from 1 php file and then distribute this data among different proxies on the client side. Which one will be more effecient? Mathematics shows using separate proxies and php classes allow more number of users to be accomodated on the server.Can I write 1 SQL command to fetch data from all 5 tables given they cant be joined on any column?
The game that I'm currently making has many bitmaps, for the sheets for various things. Is there a way that I can store these efficiently so my flash file is huge?
I have 9 movieclips in the stage. When I click a movieclip I load an image to it. The below code does this with one movieclip named o1. I feel stupid to just copypaste the code nine times for o1, o2, o3.. etc. What would be more efficient way of doing this?
ActionScript Code: var request:URLRequest = new URLRequest(XMLslides.item.thumbnail[i]); var tloader:Loader = new Loader();[code].....
Works fine (it's in a for loop, ...after the main XML object is loaded)... but this:
ActionScript Code: var request:URLRequest = new URLRequest(XMLslides.item.thumbnail[i]); var tloader:Loader = new Loader();[code].....
Causes those thumbnails to be attached to the masked buttons, but not the new ones.Is there a way to do this without creating another loader object? I want to keep it efficient.
I've created a game engine using bitmaps and box2D, the floors for the game engine is made out of a number of lines which then has a bitmap fill applied to it, then it adds a little bit of grass on top of these floors....Here's a quick video to show you what I'm talking about:http:[url].....
This all works fine on my main computer, but when I move over to my netbook, I struggle to get 10fps... Because of this I am now looking for as many ways as possible to improve the efficiency of my code. So far what I've done that appears to of had some positive effect is:
- Use bitmapCaching on layers where it's appropriate to do so.
- Use scrollRect to scroll on only the necessary part of each of the layers.
However I'm still having big problems when it comes to scrolling the terrain on my netbook - are there any ideas that anyone might have which might be able to speed up the game slightly?
I have a browser-deployed Flash app (not an AIR app with access to SQLConnection) and it fetches JSON results from a remote server via HTTPService. I need to extract subsets from the returned resultset, an array of objects, efficiently. Mutltiple calls through the cloud to the back-end won't do. It all has to happen client-side.Is there any collection class in Flex ActionScript that can sort an array of objects by one of the properties the objects all have in common, like the Array sortOn method, and then also provides a binary search method can extract a subset of objects from the sorted version of the array without visiting every item in the array and comparing?if I have an array of objects and each object had a zip property and a name property, I'd like to be able to extract all objects with zip = 10015 from the a copy of the original array where the copy has been sorted on zip.
I have an ArrayCollection of Objects. Each Object with three attributes:CustomerID, Income and DateMy goal is to chart this data for each customer (or a couple together) in a Income by Date LineChart display. Selection of customers is done with ArrayCollection filters.Data is fetched from an SQL database, however, each customer has some data points missing.f there was zero income on August 8, 2010 there will be no entry for that.Charting the ArrayCollection as is, is misleading because there is no indication of the missing data points.One way to solve this is to artificially add zero points for the missing dates for each customer. However, this would explode the data set (and impact performance).
I have a 20x20 matrix set up in Excel that I'd like to recreate in Flash. Essentially the values are either 0 or a calculated formula of -Fo or 1+2(Fo).
My question is with a matrix of this size, is there an efficient way to create and populate it besides hard coding the address for each data cell? Can I make this using a loop?
I've attached a snippet of what the Excel sheet looks like. Notice the data trend.
Ok so I have many images all the same size in different keyframes in the same layer... I want to align them all to the stage at once... rather then each individually... how do i do this
When I do Publish settings (HTML tab), I would like to set it the way that my swf would be floating in the middle of the screen.However, I always end up with my website being "stuck" on the left or right side of the screen.These are the settings I have done, which result in the site being placed on left side of the screen:
TEMPLATE: Flash Only DIMENSIONS: Match Movie PLAYBACK: none is checked
I used the publish feature of flash but it does not seem to center the SWF in the browser. Why is there a centering feature on the publish settings under HTML tab if it does not center the SWF? It only works if you set Dimensions to Percent but that exposes the area beyond the stage and i don't want it to be seen. In addition that causes some movieclips to be improperly positioned. The Flash Alignment should have been disabled if the Dimensions is not set to Percent. Perhaps a simple script that centers my swf file in a browser..
I really wish Flash and Photoshop would make possible a grid system like 3D apps so the center of any page would be: X:0 and Y: 0, then when placing graphics you could just type in X:0 and Y:0 and the graphic would be placed in the center of the stage.
I'm new at Flash so my code understanding is very limited. For my 1st site I tried to make a very simple site which would float in the center of the browser, but my site is centered and stuck at the top below the browser.
1. How do I get it centered both vertical & horizontal?
2. How do I edit the placement position in design mode without having to go into code?
My site address is [URL] I'm sure I have more code then is needed because I started with a sample file and tried to delete unneeded parts.
I needed to make my document size larger. Is there an easy way to center all the content in the new size? Right now everything is flushed to the top left corner.
I have a Flash GUI loading in external SWFs, published as a projector file and the functionality seems to be working perfectly...however, for some inexplicable reason, when I press Ctrl + F to view in fullscreen mode...the stage snaps to the top left corner.[code]just to see what would happen...the result...well, the above code worked...for about a half-a-second...then the main movie (i.e. the stage) snapped right back to the top left corner.
When I zoom out, instead of centering the document on my zoom, it pushes the doc to the upper left corner. It is pretty maddening, as I am zooming in and out a lot.
I found an interesting article: [URL] I read the 2 .article, named: "Chapter 5: Two-way audio-video communications" [URL] I have copied the server side code and the client side code out of the e-book("A Better Two-Way Chat Application").