Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Flex > Flex 2, 3 & 4

Reply
 
Thread Tools Rate Thread Display Modes
Old 07-25-2008, 03:10 PM   #1
bcedergren
Registered User
 
Join Date: Apr 2008
Posts: 23
Default Click Event Error

When I click on an swf I get this error. Error #1069: Property click not found on mx.controls.Button and there is no default value. I never got this before and today it just started happening, without the button changing. The function of the button still works, I just get the error.
bcedergren is offline   Reply With Quote
Old 07-25-2008, 03:12 PM   #2
senocular
six eyes
 
senocular's Avatar
 
Join Date: Jan 2003
Location: San Francisco, CA (USA)
Posts: 7,875
Send a message via ICQ to senocular Send a message via AIM to senocular Send a message via MSN to senocular Send a message via Yahoo to senocular
Default

as the error indicates, it looks like you're trying to use the click property off a button instance. Look for where you see 'click' in your code and make sure it's used correctly. Usually the error will give you a hit to where this is occuring to if not explicitly give you the exact location)
__________________
(6)
senocular is offline   Reply With Quote
Old 07-25-2008, 03:21 PM   #3
bcedergren
Registered User
 
Join Date: Apr 2008
Posts: 23
Default

Here is my code, it looks like I am using it correctly.

click="clickHandler(event)"

[Bindable]
public var loadNumber:String;
private function clickHandler(event:MouseEvent):void
{
loadNumber = event.currentTarget.name;
var eventObj:RecommendEvent = new RecommendEvent(loadNumber, "recommendSelected");
dispatchEvent(eventObj);

parentApplication.currentState = 'ballistics';
}
bcedergren is offline   Reply With Quote
Old 07-25-2008, 03:52 PM   #4
senocular
six eyes
 
senocular's Avatar
 
Join Date: Jan 2003
Location: San Francisco, CA (USA)
Posts: 7,875
Send a message via ICQ to senocular Send a message via AIM to senocular Send a message via MSN to senocular Send a message via Yahoo to senocular
Default

click="clickHandler(event)" seems misplaced. Where is that in context?
__________________
(6)
senocular is offline   Reply With Quote
Old 07-25-2008, 04:03 PM   #5
bcedergren
Registered User
 
Join Date: Apr 2008
Posts: 23
Default

<mx:SWFLoader id="boxOneButtonSWF" source="assets/swf/ballistics-button.swf" name="{select_recommendations.lastResult.Load[0].LoadNumber}" x="16" y="380" click="clickHandler(event)" buttonMode="true" visible="false"/>
bcedergren is offline   Reply With Quote
Old 07-25-2008, 04:23 PM   #6
senocular
six eyes
 
senocular's Avatar
 
Join Date: Jan 2003
Location: San Francisco, CA (USA)
Posts: 7,875
Send a message via ICQ to senocular Send a message via AIM to senocular Send a message via MSN to senocular Send a message via Yahoo to senocular
Default

I don't see anything there; maybe the error is somewhere else in your code
__________________
(6)
senocular is offline   Reply With Quote
Old 07-25-2008, 04:29 PM   #7
bcedergren
Registered User
 
Join Date: Apr 2008
Posts: 23
Default

I found where the error was coming from.

In the Application I had this code:
<mx:SetProperty target="{resetButton}" name="visible" value="true"/>-->
<mx:SetProperty target="{resetButton}" name="click" value="resetAppBallistics()"/>

Apparently click is not a valid name property for the button.
bcedergren 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
2 event listeners on one object - Error jpaper ActionScript 3.0 2 05-02-2008 04:53 PM
Facing Problem in CLICK event of PANEL Pratap Flex 2, 3 & 4 3 03-19-2008 06:40 AM
click event on loader component jlackyashdya Components 1 12-30-2007 04:21 AM
Event triggered by MC mouse click problem bunsco ActionScript 2.0 12 10-22-2006 08:53 PM
error with event dispatcher MrDonut ActionScript 2.0 3 05-17-2005 05:48 PM


All times are GMT. The time now is 08:25 AM.

///
Follow actionscriptorg on Twitter

 


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