Drag 'n' Drop Environment Help

Hello kirupaForum,

I am messing around with Flash and trying to make a ‘Drag ‘n’ Drop’ environment that is realistic and am using the ‘Desktop’ example from: http://www.friendsofed.com/downloads/1590595327/Appendix.zip as a guide to create what I want.

I have added new images to the ‘item’ folder in the library and updated the DeskTop.as file to recognise the new image and display it. This method doesn’t seem to be working becuase no new items are being displayed in the execute .swf file.

Example copy and paste code I am working with:

	newBitmap = BitmapData.loadBitmap("newitem")
	newItem_mc = this._deskContents_mc.attachMovie("DragEnabledDynamicDropShadowMovieClip", "newitem_mc", this._deskContents_mc.getNextHighestDepth());
	newItemHolder_mc = newItem_mc.createEmptyMovieClip("holder_mc", newItem_mc.getNextHighestDepth());
	newItemHolder_mc.attachBitmap(newBitmap, 1);
	newItemHolder_mc._x = -newBitmap.width / 2;
	newItemHolder_mc._y = -newBitmap.height / 2;
	newItem_mc._x = 300 + Math.floor(Math.random() * 300);
	newItem_mc._y = 200 + Math.floor(Math.random() * 300);
	newItem_mc._rotation = Math.floor(Math.random() * 180) - 90;
	newItem_mc.lightSource = lightSource;
	newItem_mc.update();

Any help would be great so I can make my own environment based on the style being used in book’s example.

Also is there a way of attaching the DynamicDropShadowMovieClip.as, DragEnabledDynamicDropShadowMovieClip.as and DeskTop.as files code in the .fla timeline only? I want to execute the environment as one .swf that accessible and workable with out the extra .as files. I just want to merge everything as one and be workable.

Also what would be the best ‘exit’ method for this small application or when its embedded as part of some more range of applications when executed? Would adding a button with exit command be good? How could I create this?

Thanks,