Is there a way you can add elements dynamically to an existing array??
hey guys... i need to add elements to an array dynamically... how do i do that?
for example... in one of my functions i do..
for each(var item:Object in fileList){
fileListArr.push(item);
and in a later function i need to add one more element to my fileListArr...
so i tried doing
fileListArr[indexNum].push({
key:videoKey
so i need to have an array which resembles something like this...
Before adding elements...
fileListArr:
[0]: name:test1
Size:12K
caption:testing caption
number:1
[1]: name:test2
Size:12K
caption:testing caption
number:2
after adding key to array
fileListArr:
[0]: name:test1
Size:12K
caption:testing caption
number:1
key:xyxyyy11y1yy1y1y2y2u33n
[1]: name:test2
Size:12K
caption:testing caption
number:2
key:iiduudjmenri112jj2n4n3m2j1j21
any ideas?
hmm interesting... so i made the changes... i changed the array to arraylist and the code i have is as follows... but i still get an error... the error says ... "ReferenceError: Error #1056: Cannot create property key on flash.net.FileReference."
public var videoReference:VideoHandler;
public var fileRef:FileReferenceList = new FileReferenceList();
[Bindable] public var fileListArr:ArrayList = new ArrayList();
[Bindable] public var fileNames:ArrayCollection = new ArrayCollection();
public function selectionHandler(event:Event):void{
fileRef.removeEventListener(Event.SELECT, selectionHandler);
var numSelected:int = event.target.fileList.length;
var fileList:Array = event.target.fileList;
for each(var item:Object in fileList){
fileListArr.addItem(item);
fileNames.addItem({
num: fileNames.length + 1,
name: item.name,
size: formatFileSize(item.size),
status: ""
var newListLength:Number = fileListArr.length;
if(fileCounter > 0){
loopList(fileCounter);
else
loopList(0);
public function loopList(value:int):void{
//trace("looplist -->");
if(value < fileListArr.length){
_numCurrentUpload = value;
file = new FileReference();
file = FileReference(fileListArr.getItemAt(value));
file.addEventListener(Event.COMPLETE, loadVideo);
file.addEventListener(ProgressEvent.PROGRESS, fileProgress);
file.load();
public function setUploadKey(event:ResultEvent):void{
if(event.result.ThereWasAnError){
Alert.show(event.result.ErrorMessages[0]);
}else{
videoKey = event.result.UploadKey;
if(fileCounter >= fileListArr.length){
trace("in if");
fileCounter = 0;
uploadLoopList(fileCounter);
}else{
trace("in else");
//fileListArr[fileCounter - 1]['videoKey'] = videoKey;
-----> get an error here --->fileListArr.getItemAt(fileCounter - 1).key = videoKey;
//fileListArr[fileCounter - 1] = [{key: videoKey}];
loopList(fileCounter);
Similar Messages
-
Is there any way I can add extra storage to hold my Newsstand magazines?
Is there any way I can add extra storage to hold my Newsstand magazines?
Thanks for that. It is what I expected.
There are lots of WIFI and flash drives that you can plug in but, as far as I can see, they are only useful for holding stuff pre-loaded from a PC/MAC, and can only be used via a special app.
Let bus look forward to the day that Apple give us a memory extension socket. -
I have never been able to receive any updates. And cannot find cetain features like Content Aware, Adobe Watermarks etc...Is there any way I can add these and other features unavailable to me? Or do I have to upgrade the version I have? If so, how much would that be?
The only "content aware" feature in CS5 is the fill, so you are not missing anything with the updates because nothing more is there. And I honestly don't know what you mean by "Adobe watermarks" there is no such thing, but there is a series of scripts for such stuff.
Mylenium -
I misplaced my iphone. i cant find it. i downloaded find my iphone but i can't add my device (my lost iPhone) how can i find it since it is on silence. is there a way i can add this device from my macbook?
You have to have enabled Find My iPhone on your phone before it was lost in order for it to be located. If you did, you could play a loud two minute sound on it even if it was on slient, as explained here: http://help.apple.com/icloud/#/mmfc0f19b5.
-
I want to add an album to iWeb from a folder on my desktop but I do not want to first add it to iPhoto, is there a way I can add a photo to iWeb without it being from iPhoto?
Yes. You want to add photos from a folder on the desktop to an existing iWeb album page? Just bring up the page in iWeb and drag the photo into the group of thumbnails that are displayed on the page and move it to where you want it locate
OT -
Is there a way you can simply drop singles from downloads into itunes without disrupting layout
Is there a way you can simply drop singles from downloads into itunes without disrupting layout, so you can say put some recently downloaded singles off the net into your own various folder without messing up the whole neatness of all the other album covers by adding fifty plus single covers...
ie. I just dropped a Naughty boy La la la single into my perfect looking iTune library and it does this...
Adds it as an album cover with no pic, and even if I add a pic, it isn't an album anyways!
I realise I can probably create and rename every single downloaded single to exactly the same info etc, but this is sooooooooo long winded!
Please help! everything else works perfect apart from this!Hi Connor2525,
Welcome to the Support Communities!
The article below may be able to help you with this issue.
Click on the link to see more details and screenshots.
Apple - iTunes - Inside iTunes - Customizing Your Album Artwork In iTunes
http://www.apple.com/itunes/inside-itunes/2010/08/customizing-your-album-artwork -in-itunes.html
Cheers,
Judy -
I dropped my iPhone 4 in water and now it won't turn on at all, will i lose all of my data, for example my photos and messages etc? and is there any way you can back the phone up without having it switched on?
If you had previously been backing up to iCloud (or a computer with iTunes), you would possibly have a backup. That said, if you can't turn the phone on, you cannot create a backup of the device now. Sorry.
-
Is there any way you can deautherized 5 computers more than once a year?
Is there any way you can deautherized 5 computers more than once a year?
Click "Support" at the top of this page, then click the link under "Contact Us"
-
I have just signed up for family sharing. Is there any way you can get the same app on two devices but not have to share it? My sons both want clash of clans but they don't want to be on the same village and they can't both be on app at the same time?
hi, the app is not "shared", it works as if you bought the app twice with different accounts, only you paid it once. they should have 2 different villages since they're on 2 different devices.
-
Why you receive a notification and you get the banner across the top is there a way you can swipe or something to get it to go away?
Hello,
Unfortunatelly there is no option to automatically reload the sequences that got modified outside the current application.
I'm not quite sure why you are getting this message. However, since you mentioned you modified the process model, I have a couple of suggestions:
1) Make sure you are not modifing your sequences at runtime. Usually you get this message when you modify properties under SequenceFile. This is the File object and if you change it, TS may reload it.
2) When you call your sequences, also make sure you have the same prototype for the parameters your sequence is expecting and the ones you are sending.
Maybe you can gice us some more details about how you executing this sequences and how you modified the process model.
Regards,
Roberto Piacentini
National Instruments
Applications Engineer
www.ni.com/support -
Is there a way you can change your app locations on iTunes?
It's tedious when trying to drag an app that you really like past 4 'pages' of apps to the 1st page.
HI,
Is there a way you can change your app locations on iTunes?
Yes. Connect your iPhone to your computer, launch iTunes. Select your iPhone under Devices on the left. Select "Apps" in the menu. You can drag apps to any of the home screens you want, then click: Apply bottom right corner of the iTunes window.
Carolyn -
Is there a way i can add music from my iphone to itunes without paying
is there a way i can add music from my iphone to itunes without paying
If the content was purchased via iTunes, either redownload it via iTunes on the computer or transfer purchases from the device tot he computer. With the device connected, select File > Transfer Purchases.
If the content was not purchased via iTunes, copy it from the computer that it was originally synced to the device to the new computer. -
Is there a way you can see the Time Capsule in OS 9?
I am setting up a time capsule for a client for his PC/Mac Business, he has 2 Windows based PCs that run XP, one intel iMac running Tiger, and one Dual 1.25GHz G4 running an OS9 app that he needs for his business.
Is there a way you can get the time capsule volume to mount inside of OS9???There isn't even a way to connect to the IP from OS 9, and transfer files to it manually?
-
is there a way you can make a contact page with blank fields to put info. on iWeb and submit it to my email?
It depends on where you publish.
MobileMe users need to use a form service or MailShoot...
http://www.iwebformusicians.com/Website-Email-Marketing/Form-Service.html
http://www.iwebformusicians.com/Website-Email-Marketing/MailShoot.html
If you publish to another server that supports php you can do it yourself...
http://www.iwebformusicians.com/Website-Email-Marketing/Contact-Form.html
"I may receive some form of compensation, financial or otherwise, from my recommendation or link." -
HT3529 is their any way you can add timestamps to youre SMS and imessages?
is their any way you can add timestamps to youre SMS and imessages?
add time stamps, no.
view time stamps, yes. (swipe a message from right to left to show the hidden time stamps)
Maybe you are looking for
-
i have a macbook pro and a iphone. i would like to use massage therapy notebook on my mac and i dont know how to open it or install it on my mac.
-
SG300 and RVS4000 DHCP problems
We recently deployed SG300-28 to replace an old 3Com switch. The setup: RVS400 router and all workstations and server are plugged into the SG300 switch. The problem: Windows 7 workstations are unable to obtain IP addresses from the server which is al
-
Business Objects XI 4.0 Semantic Layer Questions
Can someone tell me if the new Business Objects XI 4.0 Semantic Layer is an alternative to the use of Universes? I.E. There will be no need for Crystal Reports 2011 Enterprise, and Xcelcius to use Universes at all to access SAP ERP data as well as S
-
Reg : Output determination by BAPI_PO_CHANGE
Hi, I am using BAPI_PO_CHANGE in my user exit and I need the output to be determined and an IDoc should be created. If I do it through ME22n transaction everything works fine.But through BAPI output is not proposed. Is there anything I am missing
-
Process code for /DSD/HH_CREDITDATA
Good day gurus, I am trying to load the credit master data for customers using the IDoc /DSD/HH_CREDITDATA but I cannot find the correct process code to assign in WE20 to get my IDocs processed. Could you please advice? Many thanks