WA4 - some ideas

Join us! Share tips and solutions with WebAnimator users around the world.
Post Reply
Julian
Posts: 5

WA4 - some ideas

Post by Julian »

Since I just started WA4 I have just a few simple suggestions for things to change/add:

1) Auto naming

When I create a line of text and name it "Line_1" I copy it and paste it to duplicate it. The pasted copies get a generated name which then looks like "Line_1_1". Please improve the algorithm to automatically generate the next objetc number by checking if the last characters of the previous objects name contain a number and if so, increment it by one, e.g. "Line_1" -> "Line_2".

2) Duplicate Items (with selectable direction to duplicate)

This is related to (1) - I miss a function to duplicate items which are then automatically aligned - preferably to the top/bottom.

3) Text variables

Especially to make it easier to change texts in banners later, i.e. to localize them I would need text variables. Currently, I have created a temporary fix by utilizing a customized HTML object with a JavaScript function that updates the objects at the start. However, this approach means that I am missing out on the true text object features. I would like to use text variables, such as %VAR1% which should be replaced at preview/production time from a provided list of texts. It would be nice if this list would also allow line breaks and some text styles (bold, italic, underline)

4) When I copy & paste elements they are always pasted on top of the list. This means in the timeline the order is reversed, with the last item being on top. Although I understand why this is so, it would sometimes make sense to arrange the item under the currently selected item. So text lines will not be reversed in their order.

Thanks, Julian

User avatar
Oskar007
Posts: 295
Contact:

Post by Oskar007 »

Hi Julian,

glad you like the program, yes a lot has been changed and improved.

1) Auto naming
That would be handy, but when you copy an object it is a copy of the original for the program and not a new object in the real sense, it only becomes one if it gets its own animation for example.

2) Duplicate elements (with selectable direction for duplication)
Can you explain what you mean by this?

3) Text variables
Can you give me an example?

4. can I understand.

Thanks
Oskar007

Julian
Posts: 5

Post by Julian »

Hi Oskar,

Thanks for the reply.

(2) Duplicates: in graphic programs it is oftrn possible to click on an element and select "duplicate". This will create a copy of the object. But it also makes sense to add some inteligence to that function: (a) Add/subtract the height to the Y coordinate (b) set the name of the object, ie. Line_1, Line_2 etc. The ideas is that the created objects are already aligned in a certain way. (Affinity Designer would do this by applying the last transformation command when you press CTRL+J which makes it really easy to create objects like a sunflower)

(3) Text Variables - I mean a possibility to use a placeholder in text objects (akn mailmerge). When a project is exported to HTML that placeholder should be replaced with the actual text. The list with actual texts should be best stored in an external file, possible in CSV or XML format, so it can be easily localized.

I found a way to do that with some JavaScript code, but that required a custom HTML object.

If somebody is interested in this technique, this is the JavaScript code I am using:

Code: Select all

function sceneEventHandler_Start(doc, e) 
{
     if(glvarLanguage=='DE')
     {
		document.getElementById('a1').innerHTML = 'Deutscher Text;
      }
      else
       {  
		document.getElementById('a1').innerHTML = 'English Text';
	}
}; 
Instead of text objects I am using user defined objects, i.e.

Code: Select all

<div class="alines" id="a1">TEXT WILL BE REPLACED</div>
By creating a CSS for .alines I can define its text attributes.

Code: Select all

.alines { font-size:22pt; text-align:center; color:black; }
This makes it possible to create only one WA4 project, but use it for different languages. It is only required to set a global variable before the script is loaded:
var glvarLanguage = 'DE';

BTW: The JavaScript code ends up in the main JS function created by WA4 which can be easily edited in Notepad++. To avoid using a global variable, you can duplicate the JS file and modify it for each language. This way, you can use a different copy of the file for each language while maintaining all other resources.

Regards,

Julian

User avatar
Oskar007
Posts: 295
Contact:

Post by Oskar007 »

Hello Julian,
thank you for the detailed explanation. The developers can take the idea and see if it can be implemented in WA?
The Java code is very interesting, thank you for making it available here.

Thanks
Oskar007

Post Reply