fortetie
01-26-2006, 01:04 AM
hello,
I want to make my own button which has the same behaviour as the basebutton but I want its resource placed not at the classroot view but somewhere inside my class.
I do that:
<class name="buttontest"
extends="basebutton" maxframes="4">
<attribute name="resource_ext" type="string"/>
<view x="100" width="200" height="200"
bgcolor="yellow" name="contentview">
<view x="30" y="30" name="referenceView"
resource="${classroot.resource_ext}">
<attribute name="frame"
value="${classroot.frame}"/>
</view>
</view>
</class>
<resource name="previousPage_rsc">
<!-- first frame MUST be the mouseup state of the button -->
<frame src="resources/Player1/previous_up.swf"/>
<!-- second frame MUST be the mouseover state of the button -->
<frame src="resources/Player1/previous_over.swf"/>
<!-- third frame MUST be the mousedown state of the button -->
<frame src="resources/Player1/previous_down.swf"/>
<!-- la quatrième frame est l'état disabled -->
<frame src="resources/Player1/previous_dsb.swf"/>
</resource>
<buttontest resource_ext="previousPage_rsc"/>
My resource is correctly placed in the referenceView view but the classroot.frame is modified only if the classroot view has a itsself a resource with 4 frames...
I try the reference attribute too but I can't make my button properly worked.
What's wrong (shall I bind the frame attribute of my referenceView to an other classroot attribute)? Has anyone an exemple that works?
Thanks,
Etienne
I want to make my own button which has the same behaviour as the basebutton but I want its resource placed not at the classroot view but somewhere inside my class.
I do that:
<class name="buttontest"
extends="basebutton" maxframes="4">
<attribute name="resource_ext" type="string"/>
<view x="100" width="200" height="200"
bgcolor="yellow" name="contentview">
<view x="30" y="30" name="referenceView"
resource="${classroot.resource_ext}">
<attribute name="frame"
value="${classroot.frame}"/>
</view>
</view>
</class>
<resource name="previousPage_rsc">
<!-- first frame MUST be the mouseup state of the button -->
<frame src="resources/Player1/previous_up.swf"/>
<!-- second frame MUST be the mouseover state of the button -->
<frame src="resources/Player1/previous_over.swf"/>
<!-- third frame MUST be the mousedown state of the button -->
<frame src="resources/Player1/previous_down.swf"/>
<!-- la quatrième frame est l'état disabled -->
<frame src="resources/Player1/previous_dsb.swf"/>
</resource>
<buttontest resource_ext="previousPage_rsc"/>
My resource is correctly placed in the referenceView view but the classroot.frame is modified only if the classroot view has a itsself a resource with 4 frames...
I try the reference attribute too but I can't make my button properly worked.
What's wrong (shall I bind the frame attribute of my referenceView to an other classroot attribute)? Has anyone an exemple that works?
Thanks,
Etienne