tween action support individual radius values for each edge?
i try,but it did not work
Zitattween(layer[text].roundedge,'20 10 0 20');
tween action support individual radius values for each edge?
i try,but it did not work
Zitattween(layer[text].roundedge,'20 10 0 20');
I doubt that would work.
I think you can do this using an asyncloop loop and txtadd to create your values manually.
Hi,
the tween action itself can basically only tween numbers, not texts that contains several numbers, but you could use a special action that 'parses' the roundedge parameter into separate values and then tweens them and rebuilds the roundedge parameter each time using the update callback of the tween action.
Here helper actions for this case (they work only when using all 4 roundedge parameters):
<action name="parse_roundedge">
indexoftxt(sp1, '%1', ' ');
add(sp1,1);
indexoftxt(sp2, '%1', ' ', get(sp1));
add(sp2,1);
indexoftxt(sp3, '%1', ' ', get(sp2));
add(sp3,1);
sub(len1, sp1, 1);
sub(len2, sp2, sp1);
sub(len3, sp3, sp2);
subtxt(e1, '%1', 0, get(len1));
subtxt(e2, '%1', get(sp1), get(len2));
subtxt(e3, '%1', get(sp2), get(len3));
subtxt(e4, '%1', get(sp3), 20);
</action>
<action name="tween_roundedge">
parse_roundedge(%2);
txtadd(target, get(e1),'|',get(e2),'|',get(e3),'|',get(e4));
parse_roundedge(get(%1));
tween(e1|e2|e3|e4, get(target), %3, %4, %5, txtadd(%1, get(e1),' ',get(e2),' ',get(e3),' ',get(e4)) );
</action>
Alles anzeigen
and here an usage example (could be used for the textfield roundedge or container bgroundedge setting):
bgroundedge="50 50 50 50"
onover="tween_roundedge(bgroundedge, 0 200 0 200, 0.5, linear);"
onout="tween_roundedge(bgroundedge, 50 50 50 50, 0.5, linear);"
Best regards,
Klaus
thanks you!klaus!very useful!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!