Skip to main content
Participating Frequently
August 5, 2010
Question

AS2 code for button to make media display component fullscreen

  • August 5, 2010
  • 1 reply
  • 1954 views

Hi,

I am using a media display component to display a short FLV cartoon.  I have given the component the instance name "fcEp01" and am successfully controlling its play, rewind and pause functions using buttons using "on (release) {_root.fcEp01.Play();}" and so on.

I want to have an additional button that will allow the viewer to toggle the component to fullscreen (and back).  I am using AS2 in Flash CS3.

I realise that it may be necessary to use a movie clip instead of a regular button, but the tutes I've looked at haven't worked.

Any advice gratefully received.

Thanks.

Daftoons

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
August 5, 2010

you'll need to

1.  resize your component to the stage's size,

2.  change the stage's displayState property to fullScreen and

3.  make sure your publish settings allow fullscreen.

DaftoonsAuthor
Participating Frequently
August 6, 2010

Hi kglad,

I can't resize the component to the full stage size as it is just one of many things on the stage.  It occupies the top left-hand quarter of the stage (roughly) with other un-related navigation buttons and text boxes around it. (see picture).

I don't need the skin to grow, just the component that holds the FLV.  Is there a simple bit of code I might add to the "bigger" button to achieve this?

Thanks.

kglad
Community Expert
Community Expert
August 6, 2010

why can't you resize your component when going fullscreen?