DexTer
DexTer

Reputation: 2103

Draggin Dropping of AVM1(ActionScript 1/2) dont work in AVM2(ActionScript 3/Flex)

I have a application developed in ActionScript 2 which has dragging/dropping activity. which works fine. I used following to test dropping

dropObject.hitTest(_root._xmouse, _root._ymouse, true) //if true, drop currently dragging object

Problem occurs when I put this SWF in my Flex application SWFLoader container. dragging dosen't work at all in this case.

any ideas guys?

Upvotes: 0

Views: 248

Answers (2)

DexTer
DexTer

Reputation: 2103

I finally figured out why it was happening(or not happening!)

When we put AVM1 object in AVM2 container, AVM1 coordinate system goes on a toss. TO prevent it, put a dummy sprite on top-left corner in AVM1 and change all logic of drag-drop checking with respect to that object, and not with _root.

This is not the case with others AVM2 modules though. They work fine standalone and within another container.

Upvotes: 0

PatrickS
PatrickS

Reputation: 9572

no interoperability (such as calling methods or using parameters) between the AVM1Movie object and AVM2 objects is allowed.

taken from: http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/

Upvotes: 1

Related Questions