Hi guys.
I am so frustrated now - I’m trying to clean up my code, but I just don’t understand this issue.
I understand that on(release) { becomes ***btn_name.onRelease = function () {
- But there are two things I just don’t manage to convert;
-
How do I move the following from the btn_volumeSlider to the main-timeline?
ActionScript Code:
[LEFT][COLOR=#0000FF]onClipEvent[/COLOR] COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]
[COLOR=#0000FF]_root[/COLOR].[COLOR=#000080]global_sound[/COLOR].[COLOR=#0000FF]setVolume[/COLOR]COLOR=#000000[/COLOR];
[COLOR=#000000]}[/COLOR]
[/LEFT] -
And how do I fix this? I don’t understand what to put in front of the onEnterFrame - I am a bit troubled by these things… I have tried both the button-instance, _root and mc it’s addressing, without any results;
ActionScript Code:
[LEFT]btn_chapters.[COLOR=#0000FF]onRelease[/COLOR] = [COLOR=#000000]function[/COLOR] COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]
[COLOR=#808080]// Works when functionality is triggered from the button, but not from the main-timeline.[/COLOR]
[COLOR=#0000FF]delete[/COLOR] [COLOR=#0000FF]this[/COLOR].[COLOR=#0000FF]onEnterFrame[/COLOR];
[COLOR=#0000FF]gotoAndStop[/COLOR]COLOR=#000000[/COLOR];
[COLOR=#000000]}[/COLOR] [COLOR=#808080]*// end btn_chapters.onRelease() *[/COLOR]
[/LEFT]
Very eager to hearing your suggestions.