Skip to main content
Participant
August 15, 2014
Question

change button action on flash skin template

  • August 15, 2014
  • 3 replies
  • 462 views

I hope this is the right sub-forum for this. It seems closest to what I'd like to know. Please let me know if I should ask this somewhere else.

I have a project in CS5.5 where I'm using one of the movie control template skins that came with CS5.5. Works and looks great.

I see (and have done) where I can change how a button looks, its icon, color, position, etc. But I'd like to change what that button does when you click on it.

In my case, instead of a "stop" button I'd like the button to send the user back to a frame where there is a menu of available videos. Right now the user has to wait until the video is done playing before they're sent back to the menu frame. I can't seem to find any scripting where I can change or add this function to the template.

Thanks in advance!

This topic has been closed for replies.

3 replies

megaTiagoNunes_Producs_
Participating Frequently
August 16, 2014

Do you want to create a button or refer the event and function to an existing button?

beiguyAuthor
Participant
August 16, 2014

I'm trying to change the "stop" button to a "menu" button that takes the user back to frame 01 where there's a menu of available videos. Only using one scene. I've able to change the button's icon to a text that says "menu" and make it bigger. Just looking to change it from stopping the video playback to doing a bit of navigation.

megaTiagoNunes_Producs_
Participating Frequently
August 16, 2014

I didn't even know that was possible, but it appears like the AS script is embedded, I do not think it is hidden. I searched in every single class, they're all as default / empty. Also searched in frames within the MCs, and of course, in the main timeline.

However, if you use the script I gave you, it still works as you want it to.

stop_mc.addEventListener(MouseEvent.CLICK, button_function);

function button_function(event:MouseEvent):void

{

     this.gotoAndStop(2); //Change to the menu's frame

}

megaTiagoNunes_Producs_
Participating Frequently
August 16, 2014

What is the name of the template model you're using?

Do not translate it, just tell me the original name in the original language you're using.

beiguyAuthor
Participant
August 16, 2014

It's named "SkinOverPlayStopSeekCaptionVol.swf".

megaTiagoNunes_Producs_
Participating Frequently
August 15, 2014

Do you mean this?

button.addEventListener(MouseEvent.CLICK, button_function);

function button_function(event:MouseEvent):void

{


     video.stop();


     this.gotoAndStop(DesiredFrame:int);

}

beiguyAuthor
Participant
August 15, 2014

Thanks for the response, Tiago.

Yes it would seem that script would do to job. But where does it get entered?

When I look in the cell of the actions for the template I see things like "set up linkages", where a graphic is anchored, height and width, and so on. But where is the script, for example, for telling the play/pause button what to do? Or the volume slider or anything else?

Is it embedded in a way I can't get to it? Thanks again!