[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 198
  • Last Modified:

How can I make several dynamically generated movieclips on my map drag along with my map movieclip in Flash?

I am using Flash CS3 but I need to publish this for use with Flash 7 player. I am creating a map that shows several city points (which are movieclips). These movieclips are dynamically placed on the map using "attachMovie" with the points being extracted from an xml file. Is it possible to make dynamically generated mc's draggable? I need them to move along with the map when the map is dragged over the screen. The map is directly on the timeline and is not attached by code, but I could do that if it would help. The city points must remain dynamic.

I am sure I'm not the first person to do this, but I cannot find any information on it. Can someone please point me in the right direction?
0
usqt82
Asked:
usqt82
1 Solution
 
Antonio EstradaTech Leader / Senior Web DeveloperCommented:
Yes, it's possible. But with regards to your scenario, I infer that you can drag the map around. If so, you need to select your map and give it an instance name (on the properties panel), name it "myMap" for now.

Your attachMovie code would change a bit to something like this:

myMap.attachMovie("Point",instancename,myMap.getNextHighestDepth());

With this, the points will become children of the map and if you drag the map around, the points will move accordingly.

Good Luck
-V
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now