If the buttons, or other UI elements, in your SWF file seem to not work only after being built with SWF Studio, the most likely cause is because you've made your application draggable. Not to worry, there's an easy way to make your application draggable and keep everything working.

When you set your application to be draggable, the entire window is draggable. When you click a button on your application the initial click is caught by your application because it thinks you are now trying to drag the window. When you move your mouse or click a second time, the application knows you are not trying to drag the window, and the button is activated because the mouse event is passed through to your SWF file.

Here are three possible solutions to the problem:

1. Use Win.setSmartDrag to enable the smart drag feature

Enable the checkbox called "Make the application draggable" in the Application tab of SWF Studio, and add ssCore.Win.setSmartDrag({flag:true}); to your movie. That tells your application that the window is only draggable when the cursor is the default (arrow) pointer. So when the cursor becomes a hand, as it hovers over a button, the window will not be draggable.

2. Use Win.startDrag

Clear the checkbox called "Make the application draggable" on the Application Tab and create a movieclip (we'll call it dragHandle_mc) where you want the user to be able to drag your window. Then add the following code:

dragHandle_mc.onPress = function()
{
    ssCore.Win.startDrag();
}

3. Use the SWF Studio _draggable property

Clear the checkbox called "Make the application draggable" in the Application tab of SWF Studio, create a movieclip (we'll call it dragHandle_mc) where you want the user to be able to drag your window, and add the following code:

dragHandle_mc._draggable = true;