PDA

View Full Version : Current selection cannot have actions applied to it



krunt
08-02-2006, 07:31 PM
Hey, I just got this template for my site, and I want to be able to link the buttons to my pages. Everytime I click on the "Hit" frame it say's "Current selection cannot have actions applied to it". Its plain text, I cant figure out whats wrong, And I have searched but nothing helped.

Im using Macromedia Flash professional 8 if it helps.

NTD
08-03-2006, 05:47 PM
Hi,

The "Hit" state of a buttons timeline is only used to signify the graphical space the button will use. Flash has two options for codeing style. Frame code and object code. Object code goes directly onto the object, in this case, your button. Select the button(single click), open the actions panel and you will see the name of the object you have selected at the top of the panel. Object code looks like...

on(release){
//do something;
}

Frame code is placed on the first frame of the main timeline and establishes it's actions through the instance names of objects. If you give your button an instance name, you can use frame code ...

myButton.onRelease=function(){
//do something;
}

The advantage of frame code can be seen when editing or modifying a project. Centralized code is much easier to deal with than having to select multiple objects to see the code they contain.

hope it helps
NTD