tween plugin blur radius

  • Hi all,
    I feel a bit foolish asking this question, as I'm sure the answer must be very simple, but I have reached the boundries of my limited knowledge and searched the forum to no avail.
    I'm trying to create a very simply action to reveal a logo at the start of a tour. I have blurred the plugin(a .png file) using 'effect="blur(20)" and, as the plugin is revealed, I want the blur to clear.
    Here is the relevant code:
    <action name="startup">
    if(startscene === null, copy(startscene,scene[0].name));
    loadscene(get(startscene), null, MERGE);

    <action name="logo">

    <plugin name="logo" url="plugins/logo.png" align="center" keep="true" alpha="0" scale="0.5" effect="blur(20)" devices="all"

    In my searches around the forum I have seen the line of code tween(plugin[.....].blur,... so I assume the action is possible so, what could be the reason for this not working?

  • Hi,

    only the Flash textfield plugin has a 'blur' setting, the normal plugin elements not, and in HTML5 there is currently no cross-browser possibility for that.

    For clearing the blur, just set the 'effect' attribute back to an empty string ("") or to null.

    A possibility for tweening the blur, would be too tween a custom 'blur' variable and use the 'updatecall' to dynamically reconstruct the 'effect' setting (by using the txtadd() action).

    Here a small example, where the blur will be changed in the mouse over/out events:

    <plugin name="blurtest"
       	onover="tween(blur, 8, 0.5, default, null, txtadd(effect,'blur(',get(blur),')') );"
       	onout="tween(blur, 0, 0.5, default, null, txtadd(effect,'blur(',get(blur),')') );"

    Best regards,

  • Hi Klaus, this is definitely the effect I am looking for but, are you saying that there is no way to put it into an action?
    Ok... for anyone that's interested, I've found a workaround to create the effect I was after.
    Here's the code:

    <action name="startup">
    if(startscene === null, copy(startscene,scene[0].name));
    loadscene(get(startscene), null, MERGE);

    <action name="logo">

    <action name="go">

    <plugin name="logo" url="plugins/logo.png" align="center" keep="true" visible="false" alpha="0" scale="0.5" devices="all" blur="200"
    onloaded="logo();if(isdesktop,mul(scale,1.5)); tween(blur, 0, 3, default, null, txtadd(effect,'blur(',get(blur),')') );"
    onclick="go(); tween(blur,200, 3, default, null, txtadd(effect,'blur(',get(blur),')') );"/>

    And here's what it does:

Participate now!

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