PDA

View Full Version : [AS3] Is it a bug in flash or a mistake in our coding


yozomedia
12-05-2008, 08:48 AM
We found a problem with the scrollpane component, it's to strange to be true.. we've uploaded it all to http://www.madebyrows.nl/temp/

If you click the third icon from the left (the beanie) you will see the all the beanies in stock! in the scrollpane on the right you will see the details from a chosen beanie. the scrollpane in the rightbottom is the shoppingcart, you can drag thumbs in to the shoppingcart and the shoppingcart will add / count them.

If you drag a thumb and you realease the mouse the scrollpane shoppingcart is suddenly disabled, nothing in the shoppingcart scrollpane works anymore. normally we can drag thumbs from the shoppingcart in to the trashcan. We tested that by making php say that there are allready beanies in the shoppingcart, we can drag those allready imported beanies in to the trascan. But if we drag more thumbs in to the shoppingcart the shoppingcart scrollpane is disabled again..

This is the part as3 thats belongs to the part where you release the mouse while dragging.


try
{
spShoppingCar = getChildByName("spShoppingCar") as ScrollPane;
spShoppingCar.horizontalScrollPolicy = ScrollPolicy.ON;
spShoppingCar.refreshPane();
spShoppingCar.update();
spShoppingCar.mouseEnabled = true;
spShoppingCar.mouseChildren = true;

if( mcDragObject )
{
// Terug naar zen plek laten schieten
var mcShoppingItem:MovieClip = mcDragObject.getChildAt(0) as MovieClip;
var mcContainer:MovieClip = ((getChildByName("thumb_container") as ScrollPane).content as MovieClip);

mcContainer.addChild(mcShoppingItem);

Tweener.addTween( mcShoppingItem, { x:ptDragObject_Start.x, y:ptDragObject_Start.y, transition:"easeIn", time: 0.5} );
}

removeEventListener( MouseEvent.MOUSE_MOVE, muts_Mouse );
removeEventListener( MouseEvent.MOUSE_UP, muts_Mouse );
}
catch( e:Error )
{
}


I hope someone can help..

Sekhar
12-05-2008, 04:12 PM
When you drag a thumbnail over the cart, a blue mask of some kind seems to appear. And once that shows, the cart is getting disabled. You might want to check what this mask is.

Even if you just drag the thumbnail over the cart so this mask shows and then take the thumbnail back (i.e., not release it in the cart), the cart still gets disabled. So, the problem doesn't seem to be with releasing the thumbnail in the cart.