actionscript 3 - Embedding resource using script -


i have create library/support application file 1000s of sound files (total size around 1gb). planning use following code:

package resources.questions {     public class hindivoice     {         [embed(source="1.mp3",symbol="c1")]         private static const c1:class;         [embed(source="2.mp3",symbol="c2")]         private static const c2:class;         //to-do add 1000 files symbol definition         public function hindivoice()         {          }     } } 

above file hard maintain. can use "for loop" iterate 1 1000 , embed sound files in project? using flash developer 4.7.

actually if object there allows metadata addition helping in effort pseudo code like:

public function hindi()         {             for(var i=3;i<=1000;i++){                 var o = new <some object metadata embed> "@[embed(source='" +i +".mp3',symbol='c"+i+"')]";                 this.addchild(o);              }         } 

it seems flex not support embedding of large files. attempt embed large size files resulted application closing without warning (found behaviour in design time did not test compilation).

i did not go ahead embedding possible ways be: 1) have password protected zip file assets. 2) use other tool java encapsulation contract code access file there.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -