I am trying to create a simple AS3 script which can generate multiple paragraphs, with one word which is constantly changing. In the code you can fill in as many values in the array (let’s use fruits as an example) and it would print out a custom paragraph for each array.
The desired result (if we had 3 fruits in the array) would be:
I love fruits! My favourite are Apples! Apples are very tasty! That is why I love Apples the most!
I love fruits! My favourite are Oranges! Oranges are very tasty! That is why I love Oranges the most!
I love fruits! My favourite are Bananas! Bananas are very tasty! That is why I love Bananas the most!
It would be great if proper formatting was also kept, but that is not necessary.
Function that takes an array of words:
Called as: