Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

drag and drop bug in flash cs4

New Here ,
Aug 05, 2013 Aug 05, 2013

Hi i have a little problem in flash cs4 , there are two items with drag and drop event...

code for box1_mc;

on (press) {

            this.startDrag();

}

on (release) {

            this.stopDrag();

            this._x = orig_x;

            this._y = orig_y;

if (eval(this._droptarget) == _level0.box2_mc) {

            this._visible=false;

            }

these codes working for but if i drag and drop my item to stage(!)

thats alwayz invisible, i mean i drag and drop my item to stage or another one , thats alwayz being invisible but i would invisible only if i drop it box2_mc

is that a bug or my fault can you explain me (sorry for english)

TOPICS
ActionScript
662
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 05, 2013 Aug 05, 2013

As long as you have the ending " } " that is not shown, there is nothing wrong with that code and it works fine when I test it.  If there is a bug, it might be in your file, but it is not a bug of Flash.  Use the trace() function to see the status of things... see if they agree with what you expect.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 05, 2013 Aug 05, 2013

you are right i have tried now and its worked fine idk but on my projects if i click the items its being invisible.Thanks researching my fail..but hard to find it

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 05, 2013 Aug 05, 2013
LATEST

i found something my movieclips on different layers (for example box1mc on rooms layer other items in objects layer)Action script searchs my item in current layer , it being invisible coz its not on same layer , its on different layer.If i put my items same layer its working fine.Omg how to fix it i dont know

(if acs cant find my item in same layer , onrelease codes working automaticaly and dont see drag drop)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines