Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

change button action on flash skin template

New Here ,
Aug 15, 2014 Aug 15, 2014

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!

TOPICS
ActionScript
417
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 15, 2014 Aug 15, 2014

Do you mean this?

button.addEventListener(MouseEvent.CLICK, button_function);

function button_function(event:MouseEvent):void

{


     video.stop();


     this.gotoAndStop(DesiredFrame:int);

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 15, 2014 Aug 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!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 16, 2014 Aug 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 16, 2014 Aug 16, 2014

It's named "SkinOverPlayStopSeekCaptionVol.swf".

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 16, 2014 Aug 16, 2014

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 16, 2014 Aug 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 16, 2014 Aug 16, 2014
LATEST

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

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines