Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0

Reply
 
Thread Tools Rate Thread Display Modes
Old 05-04-2008, 05:21 AM   #1
Daniel Sam
Registered User
 
Join Date: May 2008
Posts: 2
Question current selection cannot have actions applied to it

hey guys, need help, im new with flash
I just opened a new actionscript 3.0 file and im trying to apply an action to a button but it wont let me, i,ve tried it in an actionscript 2.0 file and works fine but when i do it on an actionscript 3.0 file i keep getting the"current selection cannot have actions applied to it" message, same thing happens when i try to apply an action to a movieclip.
Any ideas why? Help very much appretiated.
Daniel Sam is offline   Reply With Quote
Old 05-04-2008, 11:56 AM   #2
DiamondDog
Senior Member
 
DiamondDog's Avatar
 
Join Date: Jan 2008
Location: Exeter, UK
Posts: 263
Default

Sounds as though you may have the button (or some other object) selected when you open the Actions window.

De-select the button by clicking on an empty part of the stage, and THEN open the actions window.

Any good?
DiamondDog is offline   Reply With Quote
Old 05-04-2008, 07:26 PM   #3
Cookra
Registered User
 
Join Date: May 2008
Posts: 8
Default Its all changed!

we have all been at this one!

In AS3 you cant apply script to the objects directly...

You have to ref them from the Timeline or via a class, OH NO you say! Welcome to AS3.

it does sound like a nightmare, but the whole application has been rebuilt to enable a stronger OOP approach.

Cookra is offline   Reply With Quote
Old 05-04-2008, 07:31 PM   #4
MSFX
Another World
 
MSFX's Avatar
 
Join Date: Feb 2008
Location: Bristol, United Kingdom
Posts: 485
Default

even in AS2 its wiser to place your code on the timeline rather than on the objects themselves...

so change this:

ActionScript Code:
on(release) {     trace("clicked"); }

to this for AS2:

ActionScript Code:
buttonNameHere.onRelease = function() {     trace("clicked"); }

to this for AS3:

ActionScript Code:
buttonNameHere.addEventListener(MouseEvent.CLICK, clicked); function clicked(e:MouseEvent):void {     trace("clicked"); }
__________________
PLEASE place your code within [code] tags
Stock Flash
MSFX is offline   Reply With Quote
Old 05-04-2008, 08:07 PM   #5
Cookra
Registered User
 
Join Date: May 2008
Posts: 8
Default

Agreed!
Cookra is offline   Reply With Quote
Old 05-05-2008, 08:05 AM   #6
Daniel Sam
Registered User
 
Join Date: May 2008
Posts: 2
Default

thanks a lot guys, that saves me a big headache!!
Daniel Sam is offline   Reply With Quote
Old 05-05-2008, 11:45 AM   #7
MSFX
Another World
 
MSFX's Avatar
 
Join Date: Feb 2008
Location: Bristol, United Kingdom
Posts: 485
Default

welcome It may be worth getting a book or two or jump on to Lynda if your coming to AS3..
__________________
PLEASE place your code within [code] tags
Stock Flash
MSFX is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
"Current selection cannot have actions applied to it" error message jareditor ActionScript 2.0 5 01-05-2010 01:05 PM
Dynamically Creating Thumbnails and attaching actions? komplex Components 3 08-30-2006 09:50 PM
Capturing trace() actions into a variable mikiti ActionScript 2.0 0 01-25-2006 04:42 PM
gotoAndPlay generates "current selection cannot have actions applied to it" gLT4FM ActionScript 2.0 3 06-24-2005 11:52 AM
spontaneous getUrl actions? smallplate ActionScript 1.0 (and below) 2 07-22-2004 10:19 PM


All times are GMT. The time now is 07:12 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.