Help for some improvements

  • hello guys,

    I'm trying to add some graphic/interface improvements to my videoplayer. Now the videoplayer is builded (starting from the example file) as a plugin: a button calls the video like in the cat-short examples. I would like:
    - to add a shadow or a mask effect
    - to add a tween or a fadein/fadeout effect when the video appears/disappears
    - plus, I would like that, when I call the video, the auto pano rotation stops and restart when I close the video.

    Some suggestion?

    I'm just a photographer, absolute beginners in AS and xml, and not very fluent in english. So, please, be patient... *rolleyes*

  • Hi flat_eric,

    Here a code that use an effect attribute to add a shadow to the video plugin , a button that open/play and close/stop the video plugin, and a button that tween the alpha to hide/show the video plugin:

    Hope this help... welcome *wink* ...

    SAlut.

  • Thank for your time and your help, I really appreciate it.
    Now, I have developed a little test in the "real world" based on your suggestion, but I have some troubles, and some others little "requests" as well....

    Here is the link to the test:

    http://www.maxfranceschini.it/uganda/test/test.html

    - I don't find the way to work with the tween effect correctly: it works only the second time I click the play button, and doesn't work when I close the video.
    - Is it possible to stop the autorotation of the pano when the video is playing?
    - Is it possible to stop the 3D sound in the background when the video is playing? (and as above, restore it when I close the video)
    - If I add an image to the button, text disappear *angry* (like you can see in the test ). How to fix it?

    Finally, is it possible to make the pano darker the when the video is playing? (like the lightbox effect, I mean)

    This is the code:

    <plugin name="videospot"
    url="plugins/videoplayer.swf"
    videourl="video/suorfernanda_intervista.flv"
    preload="true"
    visible="false"
    distorted="true"
    width="640"
    height="360"
    effect="glow(0x000000,0.7,120,2)"
    align="center"
    loop="false"
    pausedonstart="true"
    directionalsound="true"
    range="110"
    volume="0.7"
    onhover="if(ispaused, showtext(click to play, videohoverstyle), showtext(click to pause, videohoverstyle));"
    onclick="togglepause();"
    />

    <plugin name="tab_1" url="plugins/textfield.swf"
    width="54" height="38" align="top left" x="30" y="30"
    selectable="false"
    visible="true" enabled="true" handcursor="true" capture="true" children="true"
    css="p{color:#000000; font-family:Arial; font-weight:bold; font-size:14; margin-left:5; margin-right:5; text-align:center; }"
    backgroundcolor="0xFFFFFF" roundedge="5" shadow="1" borderwidth="0" glow="4" glowcolor="0xFFFFFF"
    html="[p]Open[br]video[/p]"
    onclick_A="plugin[videospot].stop();set(plugin[videospot].visible,false);tween(plugin[videospot].alpha,0);set(html,[p]Open[br]video[/p]);set(onclick,onclick_B());"
    onclick_B="plugin[videospot].play();set(plugin[videospot].visible,true);tween(plugin[videospot].alpha,1);set(html,[p]Close[br]video[/p]);set(onclick,onclick_A());"
    onclick="onclick_B();"
    />

    <plugin name="videospot2"
    url="plugins/videoplayer.swf"
    videourl="video/suorfernanda_intervista.flv"
    preload="true"
    visible="false"
    distorted="true"
    effect="glow(0x000000,0.7,120,2)"
    align="center"
    loop="false"
    pausedonstart="true"
    directionalsound="true"
    range="110"
    volume="0.7"
    onhover="if(ispaused, showtext(click to play, videohoverstyle), showtext(click to pause, videohoverstyle));"
    onclick="togglepause();"
    />

    <plugin name="tab_2" url="plugins/textfield.swf"
    width="260" height="155" align="top left" x="20" y="120"
    selectable="false"
    visible="true" enabled="true" handcursor="true" capture="true" children="true"
    css="p{color:#000000; font-family:Arial; font-weight:bold; font-size:14; margin-left:5; margin-right:5; text-align:center; }"
    backgroundcolor="0xFFFFFF" roundedge="5" shadow="1" borderwidth="0" glow="4" glowcolor="0xFFFFFF" url="img/suorfernanda_button.png"
    html="[p]Open[br]video[/p]"
    onclick_A="plugin[videospot].stop();set(plugin[videospot].visible,false);tween(plugin[videospot].alpha,0);set(html,[p]Open[br]video[/p]);set(onclick,onclick_B());"
    onclick_B="plugin[videospot].play();set(plugin[videospot].visible,true);tween(plugin[videospot].alpha,1);set(html,[p]Close[br]video[/p]);set(onclick,onclick_A());"
    onclick="onclick_B();"

    />


    thanks in advance

  • Hi,
    *thumbup*
    Try this on the onclick_A: tween(plugin[videospot].alpha,0,,,WAIT);

    Code
    onclick_A="plugin[videospot].stop();tween(plugin[videospot].alpha,0,,,WAIT);action(nomask);set(plugin[videospot].visible,false);resumesound(s1);set(autorotate.enabled,true);set(html,[p]Open[br]video[/p]);set(onclick,onclick_B());"


    Also, you have 2 video player of the same in your code .... Erase the plugin videospot2....

    SAlut.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!