How to Use Drag AP Elements
Sep 16, 2010
Normally, code to make content that you can drag is complex; Dreamweaver CS5, however, makes it as easy as following a few short steps!How to Drag AP Divs
The first step is creating an AP Div, as I talked about in my previous blog post. Once they are created it is time to make them dragable.
- Select the <body> tag in the Status Bar.
- Right-click and select Collapse Full Tag.
- Highlight the line that contains your body div.
- In the Behaviors section of the Tag Inspector, click on Drag AP Element.
- The following dialog box will appear. Select the name of the layer that you want to be dragable.
Here’s the Advanced Tab.
Here are additional options you can set for your AP Div:
- Movement: unconstrained or constrained – If you would like to limit the area in which a layer may be dragged, choose constrained. Once constrained is selected you may enter the coordinates of a box in which you will limit movement.
- Drop Target – If the layer is to be dragged to a certain place on the page (as it might in a puzzle) you might want to identify that spot as a Drop Target.
- Snap Target – If the user drops the layer within X number of pixels of the drop target, it will snap to the target
- Drag Handle – If you would like to identify a specific section of the layer to be the handle, it can be set here
And that’s all there is to it!
To hear about the latest Adobe news, blogs, and training, subscribe to our newsletter. Click here to subscribe.
If you’re interesting in learning more about advanced Dreamweaver CS5 topics in general, take a look at my Advanced Dreamweaver CS5 class.