dcsimg
A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: drag and drop not working from a loadmovie

  1. #1
    Junior Member
    Join Date
    Apr 2004
    Posts
    23

    drag and drop not working from a loadmovie

    I spent the past two days trying to get this to work. I created a drag and drop .swf that works fine on its own, but when trying to call it into the main swf movie, the interaction doesn't work. here is the code i'm using for the drag n drop feature:

    on (press) {
    startDrag(this, true);
    this.swapDepths(100);
    }
    on (release) {
    stopDrag();
    if (this._droptarget == "/trigger") {
    setProperty(this, _x, 230);
    setProperty(this, _y, 470);
    tellTarget ("/status") {
    gotoAndPlay("6");
    }
    } else {
    setProperty(this, _x, 602);
    setProperty(this, _y, 246);

    }
    }

    But now when I call it into another movie, the functionality doesn't work. the main thing that does not work is the tellTarget("/status") {gotoAndPlay("6"); which means that the drag works, but the response doesn't. I have also tried placing the keyframes directly into the main movie rather then doing a loadmovie, and it does the same thing. It is almost as if it is conflicting with something in the main movie or main movie timeline, which I am pretty sure there isn't anything radical in it that would conflict.

  2. #2
    Senior Member
    Join Date
    Dec 2002
    Posts
    175
    hi,

    I got a similiar problem with mine. http://www.flashkit.com/board/showth...hreadid=544576
    Let me know something if you get any further. I'll do the same.

    Grtz,
    Spirit Wolf

  3. #3
    Junior Member
    Join Date
    Apr 2004
    Posts
    23
    Here is a link to the swf that works on it's own http://www.gwana.net/testfla/drag8.swf

    and then this is the link of where its supposed to work and it doesn't:

    http://www.gwana.net/testfla/slide4_test.swf

    not sure what's going on?

  4. #4
    Senior Member
    Join Date
    Dec 2002
    Posts
    175
    If you are only using it that way, then you can put another layer on top of the layer in which you load that swf. On that new layer, make a new target area, the same size and location as the one in de loaded movieclip. Be sure to give it the same instance name as your target in de loaded swf. Then it works. But it only works if you just want to drag it to there, if you are planning to give it some more functions, then it's not recommended. It's more a side-solution.

    Grtz,
    Spirit Wolf

  5. #5
    Junior Member
    Join Date
    Apr 2004
    Posts
    23
    that worked to a point. the problem is that i am working on a project that loads a movie into a movie into a movie and so on. so it worked in the slide4_test.swf, but when loaded into the main movie it didn't work. I have alot going on. I have an index.swf that loads which is the main movie, then within the index.swf, i have it loading slides*.swf into the index.swf. then with in the slides, they load they're own .swf's. you know, just the normal, crazy hierarchy.

  6. #6
    Junior Member
    Join Date
    Apr 2004
    Posts
    23
    I got the issue resolved.

    if (this._droptarget == "_level3.trigger")

    should be

    if (this._droptarget == "_level3/trigger")

    it's as simple as a / instead of a .

  7. #7
    Senior Member
    Join Date
    Dec 2002
    Posts
    175
    hi,

    can you maybe post your fla or so??? I see what you mean, but since that I'm working a little different, maybe it's easier to know what you are talking about if I can see it in your fla. Do you maybe load your movie's with loadMovieNum("blabla",3); or sommeting??? And where are those if's located at??? at the buttons or in the main movie or where??

    Thnx
    Spirit Wolf

  8. #8
    Senior Member
    Join Date
    Dec 2002
    Posts
    175
    hei,

    it worked with me too. But apparantly only when you use levels. Shame, I had my movieclip first come faded in... . Well, gotta do it like that then.

    How did you figure it out actually???

    Grtz,
    Spirit Wolf

  9. #9
    Junior Member
    Join Date
    Apr 2004
    Posts
    23
    You'll laugh, i figured it out by paying $200 to Macromedia support, then waited for them to fiure it out which took about a day. The support guy said that this one was actually a challenge for him.

    You can download all of the .fla files related to the project at http://www.gwana.net/testfla/

    you may have to make the edit to drag8.fla though, it needs the change made to it.

    You can also go to http://www.gwana.net/clients/merck/index2.htm to see actually what the final product is. Still working on it so not everything works on it yet.

  10. #10
    Senior Member
    Join Date
    Dec 2002
    Posts
    175
    damn, you paid that much for it??? djeez, I hope that that is a subscribtion for a couple of years.

    Nice website btw, cool with the music.

    Grtz,
    Spirit Wolf

  11. #11
    Junior Member
    Join Date
    Apr 2004
    Posts
    23
    No, it was the price for per incident.

    If you want a years service it's like $800 for 5 incidents to $3000 for unlimited incidents for the year.

    Never had to use it before, because I usually find my answers here or in books. But this one was a hard one. I had posted on about 4 other forums and got pretty much the same answers, which none worked.

    As for the piece I'm working on, it's going to be an autorun CD-rom for the client. Lots of fun.

  12. #12
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    It did work if you had a hidden false droptarget in the drag8 or any other movie, and that was easily done with a simple symbol copy and pasted in place, a 10 seconds operation.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center