Search Results

Search found 6 results on 1 pages for 'willycornbread'.

Page 1/1 | 1 

  • Is there a more efficient AS3 way to compare 2 arrays for adds, removes & updates?

    - by WillyCornbread
    Hi all - I'm wondering if there is a better way to approach this than my current solution... I have a list of items, I then retrieve another list of items. I need to compare the two lists and come up with a list of items that are existing (for update), a list that are not existing in the new list (for removal) and a list of items that are not existing in the old list (for adding). Here is what I'm doing now - basically creating a lookup object for testing if an item exists. Thanks for any tips. for each (itm in _oldItems) { _oldLookup[itm.itemNumber] = itm; } // Loop through items and check if they already exist in the 'old' list for each (itm in _items) { // If an item exists in the old list - push it for update if (_oldLookup[itm.itemNumber]) { _itemsToUpdate.push(itm); } else // otherwise push it into the items to add { _itemsToAdd.push(itm); } // remove it from the lookup list - this will leave only // items for removal remaining in the lookup delete _oldLookup[itm.itemNumber]; } // The items remaining in the lookup object have neither been added or updated - // so they must be for removal - add to list for removal for each (itm in _oldLookup) { _itemsToRemove.push(itm); }

    Read the article

  • How can I modify my code to line through the bezier control points?

    - by WillyCornbread
    HI all - I am using anchor points and control points to create a shape using curveTo. It's all working fine, but I cannot figure out how to get my lines to go through the center of the control points (blue dots) when the line is not straight. Here is my code for drawing the shape: // clear old line and draw new / begin fill var g:Graphics = graphics; g.clear(); g.lineStyle(2, 0, 1); g.beginFill(0x0099FF,.1); //move to starting anchor point var startX:Number = anchorPoints[0].x; var startY:Number = anchorPoints[0].y; g.moveTo(startX, startY); // Connect the dots var numAnchors:Number = anchorPoints.length; for (var i:Number=1; i<numAnchors; i++) { // curve to next anchor through control g.curveTo(controlPoints[i].x,controlPoints[i].y, anchorPoints[i].x, anchorPoints[i].y); } // Close the loop g.curveTo(controlPoints[0].x,controlPoints[0].y,startX,startY); And the shape I'm drawing for reference: How can I modify my code so that the lines go directly through the blue control points? Thanks in advance! b

    Read the article

  • Whats a valid strategy for a secure image upload from a flash client?

    - by WillyCornbread
    Hi all - I'm creating a flash application that will post images to a url for saving to disk/display later. I was wondering what are some suggested strategies for making this secure enough so that the upload is verified as coming from the application and not just some random form post. Is it reliable enough to check referring location realizing that I don't need bulletproof security, or perhaps setting authentication headers is a better strategy even though it seems unreliable from what I have read. Thanks for any advice - b

    Read the article

  • Flash CS5 screwed up all my textfields - how can I correct this?

    - by WillyCornbread
    Hi - I have an Actionscript project that I was building using Flash CS4. I embedded a font using the follow: [Embed(source="/bin/assets/fonts/MyriadPro-Regular.otf", fontWeight="normal", fontFamily="Myriad Pro")] Then throughout my application in my TextFields I would set embedFonts to true antialiastype to advanced and set the thickness property of the text field. And setting the font-family from a stylesheet. This was all working exactly as I expected it would with no issues whatsoever and months of development. I just upgraded to CS5 and published and none of my text is rendered at all. I was able to resolve this by removing the embedFonts = true from the textfields, but this leaves me with no control over the thickness at all. I searched everywhere, does anyone know what the proper way to do this in CS5 is now? I've tried embedding my font directly within the CS5 IDE but still no thickness control. Thanks in advance for any help - I've got tons of textfields throughout my app that are all ganked right now. Thanks Adobe. b

    Read the article

  • How can I run a function anytime anything is animated with jQuery?

    - by WillyCornbread
    Hi - I have some jQuery animations in my code to slide divs up and down in response to some mouse clicks and other logic. This is all working just peachy, however in IE 6 some of the smaller icon images on the page don't slide along with the rest of the div for some strange reason. They kind of stay put then flicker into the new position and I've chalked this up to an IE6 'feature'. Considering that I have to support IE6, I wanted to just hide the icons anytime an animation started, and show them again when the queue was empty. I couldn't find a reference to any kind of events or hooks into the queue itself and I'd rather not add the hide code, then the show code to every animation as a callback. Thanks if you can help- b

    Read the article

1