Problem with Duplicate Movie Clip which is tracked in an Array

I have a problem with my inventory code using Shared Objects.
What i did was to track the collected items in an array. Each time
the user collects an item, the original iconMC is duplicated and
loads a picture of the item (function loadImage). However, my
problem is that this retains the original array so even if I
already added new items into the inventory, the newest item doesn't
show. original array length = 2, new array length = 3; the last
item doesn't show. If I reload my flash, its the only time that
this shows. Now if I get an item and lessen the inventory, it still
retains the original length and doubles (or triples, depending on
how many items i lessened) the last item.
var so:SharedObject = SharedObject.getLocal("lakbayUser",
var i:Number = so.data.currentUserIndex;
var ctr = 0;
var iconCtr;
var iconArray: Array; //temporary storage of items placed
inside icon
function selectIcon(num){
eval("iconMC"+num)._alpha = 0;
so.data.users
[15][0] = true;
so.data.users[15][1] = iconArray
//loads the next icon
function setNextIconMC(itemCtr, iconCtr){
if(iconCtr > 0) {
newName = "iconMC" + iconCtr;
newPos = 130 * iconCtr;
_root.itemaHolderMC.iconHolderMC.iconMC0.duplicateMovieClip(newName,iconCtr+1);//does
not duplcate if unloadMovie is called
this[newName]._x = newPos;
this["iconMC"+iconCtr].enabled = true;
this["iconMC"+iconCtr]._alpha = 100;
loadMovie("gamit/icon"+itemCtr+".jpg",_root.itemaHolderMC.iconHolderMC[newName]);
trace(_root.itemaHolderMC.iconHolderMC[newName]);
else {
iconMC0.enabled = true;
iconMC0._alpha = 100;
loadMovie("gamit/icon"+itemCtr+".jpg",_root.itemaHolderMC.iconHolderMC.iconMC0);
//loads all the icons into the container
function loadImage(){
iconCtr=0;
iconArray = new Array();
for(itemCtr = 0; itemCtr < so.data.users
[14].length; itemCtr++){
if(so.data.users[14][itemCtr] == true){
iconArray[iconCtr] = itemCtr;
setNextIconMC(itemCtr,iconCtr);
iconCtr++;
if(iconCtr==0){
iconMC0._visible = false;
else iconMC0._visible = true;
loadImage();
so.flush();
stop();

hey there yenniie - each time you update the array you must
also call 'flush' to update the SharedObject. also please use the
'attach code' button to post code, as you can see what happened in
your post with the ' i ' value. So assuming I'm interpreting the
the missing characters correctly the method should be:

Similar Messages

  • Does anyone have problems with iTunes movie rentals freezing in the middle of the movie?

    Does anyone have problems with iTunes movie rentals freezing in the middle of the movie, requiring a force quit, which causes your rental to disappear? This has happened multiple times to me recently. Last time Apple didn't refund my money after reporting the problem. I have been using iTunes for many years but am about to give up.

    Correction: I was refunded for the previous movie freeze.

  • I have a problem with my 4s camera which has come up recently. Everytime I take a picture and look it up via the 'Photos' app, it shows as blank. But when I click on edit on the blank picture, it comes up and I am able to save it back on my photo album.

    I have a problem with my 4s camera which has come up recently. Everytime I take a picture and look it up via the 'Photos' app, it shows as blank. But when I click on edit on the blank picture, it comes up and I am able to save it back on my photo album as a proper image. Besides, I have also experiences the camera working a bit wiered (slow and often blanks out the moment I am ready to take a photo). Any help on this pls?

    Hi Noob Søren
    There are a few things that are confusing in your question.
    As far as I know, you dont have to install Time Machine on this OS as it is already installed for you. You only need to connect a hard drive to your computer via firewire or usb, click on the Time Machine icon, Open Time Machine Preference in the drop down menu and select a disk: your connected hard drive.
    You can of course reformat this connected device, partition it into a few volumes to organise data if you so wish.
    I find it strange that your mac's hard drive is divided into two volumes... perhaps this was created through bootcamp?
    You can access the configuration of your hd through Applications/Utilities/Disk Utilities.
    Clicking on one of the icons on the right hand panel will bring the details of the contents of your hardDrive and volumes. From there you can decide to erase a partition, reformat etc....
    If your hd contains more than one volume, and one of them is empty, you could decide to remove it. Back up all your important data before doing so.
    Hope this helps
    WN

  • Hi, I have problem with importing MOV files from SJCAM 4000. MOV files are in supported formats for Adobe Premiere Elements 11. But if I'm importing MOV file, only audio part is imported, video part is not imported. How can I solve this problem?

    Hi, I have problem with importing MOV files from SJCAM 4000. MOV files are in supported formats for Adobe Premiere Elements 11. But if I'm importing MOV file, only audio part is imported, video part is not imported. How can I solve this problem?

    haben
    From looking at the specifications of your camera (SJCam 4000), we know already what video compression your camera is using. It is H.264.
    A H.264.mov file should be supported by Premiere Elements 11. On what computer operating system is your Premiere Elements 11 running?
    Do you have the latest version of QuickTime installed on your computer? And, are you running QuickTime and Premiere Elements 11 from a
    User Account with administrative privileges? Please go to Premiere Elements 11 Publish+Share/Computer/QuickTime to confirm that you find
    presets there for the QuickTime choice there.
    What are the properties of these H.264.mov files - is it 1080p30 (1920 x 1080p30)  or something else? Do you know if this camera is recording with a variable or
    a constant frame rate?
    Please review and consider and then we will decide what next.
    Thank you.
    ATR

  • Problems with goods movements cancelling network confirmations

    Hello experts,
    I'm having some problems with goods movement when cancelling network confirmations.
    I assign a component for a operation in the project builder (CJ20N). Then when I execute a confirmation for that operation in CN25 everything works correctly, I can assign the time for the confirmation and SAP automatically carries the component assigned to the operation. Once I have done the confirmation the goods movements and the hours have a correct account assignment.
    The problem is that if I cancel this confirmation, the hours are correctly cancelled but the component is still there. If I try to cancel the goods movement with MIGO it is no possible because the system says that must be cancelled with the corresponding transaction (CN29) but, as I have said, the system does not cancel it.
    On the other hand, If the goods movement goes to COGI transaction and then I post-process the error, If later I cancel the confirmation, everything works correctly.
    Does anybody know why this could happen?
    Thanks and regards
    Laura

    Hi
    I think this question was raised earlier also. The best way is to allot a fixed time slot for your users so as to avoid clash. I suppose i explained that the master data of any material is stored at one place only and if you schedule a background job for this then all your good movement transaction will be in que and performed in orderly manner.
    If automatic posting is not possible then use the time slot method.
    Krishna

  • HT203200 Is there a problem with redeeming movies from itunes?  I purchased some movies with digital copies.  But I can not download, due to Code redemption being temporary unavailable for the past 2 days.

    Is there a problem with redeeming movies from itunes.  I purchased some movies with digital copies.  But i can not download movies, due to code redemption being temporary unavailable.

    Hi there Cedric!
    I have an article here for you that I believe will help you out with this issue by reporting it to iTunes. That article can be found right here:
    How to report an issue with your iTunes Store, App Store, Mac App Store, or iBookstore purchase
    http://support.apple.com/kb/HT1933
    Thanks for being a part of the Apple Support Communities!
    Regards,
    Braden

  • Can u plz tell me I hav problem with I phone 4 which I can hear their call but they can't hear my voice

    Can u plz tell me I hav problem with I phone 4 which I can hear their call but they can't hear my voice

    Get help with hardware features on your iPhone, iPad, and iPod touch - Apple Support

  • I have problem with the security question which i forgot the answer how can i change it as i already have apple id and password

    I have problem with the security question which i forgot the answer how can i change it as i already have apple id and password

    You may reset the password on your account by opening https://iforgot.apple.com/ in Safari and entering your Apple ID (your email address, which the moderators should have removed earlier).
    You won't be able to set the password to your email address, or a recently-used password (if I remember correctly).
    Once you change your password, you should update your password on your iOS device in Settings > iTunes & App Store, then tapping the "Apple ID: <username>" cell at the top to re-enter your password.  (Your iOS device may prompt you for the new password before getting to Settings as well.)
    Hope that helps.  If you have a different issue, please post a follow-up message.

  • Problem with Organising Movies

    I have a problem with organising my movies.
    At present a series of iTunes moves over the years has left me with a whole mess of duplicate and triplicate movies that are difficult to reference.
    So I popped the hood on iTunes and got to work.
    So far I have:
    *Renamed the movies to relavent titles.
    *Sorted them all into folders and organised the folder structure the way music is stored.
    *Deleted duplicates and triplicates (and even more copies in some cases).
    *I did this first in an old back up.
    *Then in live iTunes
    *Found multiple folders with the movies.
    *One located Music>iTunes>Media>Movies
    *The other located Music>iTunes>Movies (found lower down in the file structure)
    Doing this made no difference to the way the movies were being displayed in iTunes.
    This means iTunes is getting the info on what to show on the screen from something or somewhere else?
    How can I get iTunes to show the movies on screen as they are arranged in the folders or as iTunes organises the music?
    Is it something to with the "iTunes Music Library.xml" or  "iTunes Library.itl" file?
    (Apologies for a lack of technical terms)
    Hope this makes enough sense
    Also I have spent months of going down rabbit holes (including the Apple iTunes support guides) searching this topic and have resorted to asking.
    Below is an screenshot example of what I still see in iTunes

    iTunes stores media information in two places.  The primary one is in data "tags" stored in the media file itself.  When you add a media item to iTunes, iTunes gets this information and stores it in its own database too.  When you play a track iTunes quickly checks if its data still matches the item's information and if it does not it will update its information.  If you edit the track information through getting information on the track in iTunes both sets of data should be updated, including that in the files.
    The above should provide most of your answers.  Some quick notes:
    iTunes ignores any folder structure you make.  It ignores any changes to the file names.  Well I say ignore, because it does ignore it as far as labeling the tracks.  It does not ignore it in terms of being able to find the track.  When you add an item to iTunes, iTunes puts the file in a location and makes a note of that location in its database. When you try to play the item, iTunes looks for the file in the location in its database.  Often if you move files around in Finder, or rename them in Finder, this will cause iTunes to lose track of where the file is located and you end up with a broken link " ! ".  Hopefully your library isn't a mess right now.
    As for your last questions, this is a mixture of old and new storage convention.  Read links below.  Get summary info on a track in iTunes and see which copy iTunes is actually referencing.
    What are the iTunes library files? - http://support.apple.com/kb/HT1660
    More on iTunes library files and what they do - http://en.wikipedia.org/wiki/ITunes#Media_management
    What are all those iTunes files? - http://www.macworld.com/article/139974/2009/04/itunes_files.html
    Where are my iTunes files located? - http://support.apple.com/kb/ht1391
    iTunes 9 [and later]: Understanding iTunes Media Organization - http://support.apple.com/kb/ht3847 - plus supplemental information about organizing to new structure https://discussions.apple.com/message/26404702#26404702
    Image of folder structure and explanation of different iTunes versions (turingtest2 post) - https://discussions.apple.com/docs/DOC-7392 and making an iTunes library portable.
    Note: Use the camera icon in the forum editor window to attach images to posts.

  • Problem with imported movies from Sony Cyber Shot

    Hello all, I have an unusal problem.
    My mate has got a brand new sony cybershot camera which does movies.
    These movies import into iPhoto no problem with sound.
    However if I then use that clip in iMovie there is no sound, it does not matter how I try to import. I have tried importing direct from the sony card, from the import menu and from dragging. Still no dice.
    What should be the next step?
    Its iMovie HD and 10.4.4

    Hi Gary
    get for 20$ the Apple mpeg2 plugin
    and for free the tool Streamclip
    http://danslagle.com/mac/iMovie/tips_tricks/6010.shtml
    http://danslagle.com/mac/iMovie/tips_tricks/6018.shtml

  • Problem with the mov file of Nikon D5200

    Hello everyone :
    I just got some mov files form my friends' Nikon D5200.
    At first I was glad that it was MOV file and I don't have to convert them,
    but then I found out that when play those video in Final Cut Pro X, the image is choppy and broken.
    I snapshot two picture for example:
    I then play those video on different software, Like Adobe Premiere, Quicktime Player, Mplayer X....etc. And it was fine.
    and I also try to convert those video into another format with FCPX or Compressor, but it still looks choopy.
    So, is there anybody can help me with this? Or should I call out to apple company for help?
    Here's other details of those videos and my computer :
    imac 27" late 2012
    Nvidia GTX 680MX
    OSX 10.8.3
    Those Vidoes are 1080P 59.94P MOV files

    Hello:
    My fianl Cut Pro Version is the latest 10.0.8.
    I was using custom setting, and the setting is base on video itself. (1080P, 54.94 Frame Rate)
    And now, here comes a new discover:
    When I let FCPX determine the project setting base on the first clip, it didn't change anything, and still remain the FPS to 29.97i, like the picture below:
    But the truth is, those media are shot in Frame Rate 59.94, and Premiere will change the frame rate to 54.94 automatically, like the picture below:
    But in the premiere, although the graphic is fine, but the speed of playback is very lag.
    So i was wondering if it is the file's problem or not. But the QT can play it well, so I just don't know what is wrong....
    PS : I was wondering, what is the "first clip" mean? first clip which drags on the timeline? (Like Premiere), or first clips which import to the relative event?
    Thank you for you time!
    Russ H wrote:
    Like most DSLR's the Nikon compresses video to h.264 and there is no reason why FCP should create artifacts from those clips. If the play OK in QT and Pr, then it's not a file problem.
    What version of FCP are you using? Did you let FCP determine the project settings based on the first clip, or did you have custom settings?
    Russ

  • Premiere Pro CC Problem With PNG MOV Quicktime Format

    A While Back, i posted a problem with Premiere Pro CC that it would not open MOV with a PNG Type Format. the Error was always "There is No video or Audio Stream".
    Frustrated, i reverted back to Premiere Pro CS6 in which the files opened fine. i had Forgotten an effect i used in PRO CC so went pack in and surprisingly the files opened. I finished my Project and moved on until Last night, when editing, the same thing happened in Premiere Pro CC, it wouldnt impoort the PNG Format MOV files i have for traqnsitions (Rampant Media Color transistions) Curious, i again opened PPRO CS6, and low and Behold, when i re-opened PPRO CC, the files were read properly.
    So there appears to be some form of Bug in PPRO CC on a windows 7 64 bit Ultimate? i can reproduce this over and over againj. i am just throwing this out there incase this happens to anyone else. hope this helps, i hope Adobe Premiere Pro CC Engineers see this and can fix this bug. thanks, have a happy too da looo, i shall blow you a fanfare!

    Please submit a bug report, complete with a sample file, or at least attach a sample clip here.
    https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

  • Keeping "state" with many movie clips

    In one frame (Frame A), I've dynamically attached many movie
    clips for a tile-based game. This happens in the init function of
    that frame. If I move to another frame (Frame B) temporarily (to
    display something else), it looks like I need to remove or unload
    all of the movie clips so that they don't show up on Frame B. Is
    that the only way to not have them show? The problem is that when I
    return to Frame A, I would like it to have the same state
    (positions of objects, etc.) as when I left it. What is the best
    way to accomplish this?
    As an alternative, I suppose I could draw something on top of
    the screen (higher z order) and mask what is below and then remove
    what was draw on top when I'm finished with it. I would prefer to
    figure out a way to accomplish it the first way, though, because I
    can use this for other things as well.
    Does anyone have any advice on this?
    Thanks!

    I understand that you can remove one parent instead of many
    children in this way, which is good from an efficiency standpoint.
    Beyond that, I was ideally looking for a way to basically "freeze"
    the action on Frame A and return to it. I assume that, even with a
    parent-child scenario, I would still need to loop through all of
    the children and save their states (because just checking the
    parent attributes isn't going to get at this information). I was
    just asking if there was any easier way. It would be nice to be
    able to go to another frame - maybe on another level - and then
    come back to Frame A and pick up where I left off - just hopeful
    thinking, I guess.

  • Reinstalling iTunes, problem with duplicates

    I have an iMac 2GHZ running OS X v10.5.7 which is having multiple longstanding problems with freezing/errors and no significant problems show up after running disc utilities (repairing permissions etc..) or Tech Tool. Also my itunes music folder is full of duplicates that don't show up on my i tunes duplicate or "Dupin" duplicates list. iTunes library shows 43 GB space used and iTunes Music folder shows 95 GB space used.
    I would like to start from scratch, reformat my hard drive and reinstall iTunes to see if it solves most of the problems. I am using Time Machine for backup but also can make a bootable clone with Super Duper. I wonder if it would be better to restore my iTunes from an iPod since none of the duplicates exist there.
    Suggestions?
    Thanks,
    B

    a lot of people are having similar problems
    a temporary solution i discovered is desribed on this thread
    http://discussions.apple.com/thread.jspa?threadID=658807&tstart=15

  • Opacity problems with exported movie

    Hi all
    I'm having an issue with Motion 5. My project is 3046x1080 @ 30fps with a transparent canvas as a background and I have my timeline with about 5 clips all placed in seperate layers. All I'm trying to do is fade from one clip to the next so I first tried the 'Fade in/out' behaviour on each clip at 30 (I'm working at 30fps so this is 1 second?) and nothing appeared to happen on the canvas.  It was only once I had the fade in time up to 100 when I started to see any fading on the canvas.  I tried an export to quicktime as a test, but all the clips that had a fade in didn't fade in at all the just cut.  So, I then went in and set all the fades manually - adjusting the opacity with keyframes only to have the same result as before.
    The exported movie does retain the transparent background however - Motion just seems to be ignoring the opacity levels I've set.  The only alternative I have found is to copy all my content across to my other machine and use Motion 4 - but that cripples that machine, certainly at this resolution I"m working at! Fortunately the clip I'm working on is only 30 seconds long....
    Anyone got any ideas? I've searched the board but haven't found anything...
    Many thanks

    Thanks for the reply!  I had checked to make sure everything was lined up but I double checked and indeed the fade in/out behaviour were indeed lined up to the clip.  The export was also set to Colour + Alpha.
    Upon further testing, as I don't really want to endure working at this resolution in Motion4, I've found my error - I didn't have the premultiplied Alpha enabled - I seem to remember I had a problem with that in the past hence turning it off.
    So that appears to have solved my problem.....

Maybe you are looking for

  • L&F Project

    Dear All I'm suing L&F on my form for about 15 buttons. and I'm using set custom property to set icons for these buttons, but when i start the form, it stops responding before showing any details. and some times just part of the form then stop respon

  • Cannot open CS2 Layers in CS5

    Hi - I have a psd made using CS2. I can only see a single layer, and I have verified that the file opens correctly in CS2. How can I open the layers in CS5?

  • Can you switch of the proposition of values in a table control ?

    Hi, i have a table control .  I can fill in 1 column with data .  When i use the program he always open a dropdown (or something like that) with the values i used before.  This is very annoying in my transaction because it are numbers i have to edit

  • Problem with Select tag in iPad Safari

    The <select> tag which provides a drop-down list is giving me problems. I when I change the value, sometimes I get all sorts of spurious characters after the field and sometimes I get a truncated value. I need to put a span tag in front of it to get

  • Exception ( in Reporting Agent ) background job runs indefinitely

    Hi I created an Exception setting under reporting agent (to send out a mail in the SAP Office inbox, on a specific exception) and assigned it under a scheduling package. I have assigned a proper query variant to the exception setting also. When I exe