Skip to main content
Gebesus
Participant
October 20, 2018
Question

Is there a way to have a symbol inside a symbol with drag and drop properties?

  • October 20, 2018
  • 1 reply
  • 318 views

I will explain the best i can since i'm new to this.

So, let's say i got a movieclip called *bananaClip*, Inside it's housing a room with some items and other goodies, let's say one of the items is called "bed".
When you load the swf file it shows everything nested inside of the movieClip.
I need to have one or multiple of those items with the drag and drop properties.
The only issue is, since the item "bed" is inside the movieClip, i can not get around applying the code snippets for drag and drop to it.

Yes, i can do that outside in the main timeline with no other movieClips nesting items but that's not what i'm trying to do since the project i'm working on needs to have every "frame/level" converted into a movieClip so it can be controled from the main timeline.


I tried having the drag and drop outside of the movieClip but since the project has scrolling capabilities, when the player moves, the item stays in the center of the frame.
This is how the project looks (it's messy i know :V )


The red box is the drag and drop item, wich is inside one of the levels

Idk if that makes much sense but i'm looking foward to any ideas on how to achieve this .
Thanks!

This topic has been closed for replies.

1 reply

Community Expert
October 20, 2018

Yes, you would have to just name both symbols you are trying to drag n drop. Then call on those symbols by their instance name in order.

I am assuming you are doing this is AS3?

Post your code here so we can look at what you are doing and we can help you better.

Gebesus
GebesusAuthor
Participant
October 21, 2018

Hi there nickg28​ thanks for your reply!
Yes i am using as3! What i've decided to do is just open a blank/new file using flash and try to figure out how to implement this function.
As far as what i got so far for the code is just the snippet. I can share the fla files here
https://drive.google.com/open?id=1M66mhf7gsfySMoPsuEKBTdRtEd65N-LG

it's just the basic snippet.
Inside there is a symbol housing the "level" where there will be a room and items + drag and drop items.

Main timeline

inside the level symbol

again, thanks for responding, it's my first time dealing with any scripts so i'm kinda lost
Much love your way!