Page 1 of 1

Arguments for BlendActions

Posted: Wed Aug 26, 2015 1:15 am
by mkelley
While I was able to use BlendActions just fine in AS 9 obviously a lot has changed and this now does NOT work (in 11 but I'm guessing it also won't work in 10):

local percentMorph = ((holder - 50) * 2)/100
local stringHolder = LM.String:new_local()
stringHolder:Set('Expression')
layer:BlendActions(moho.frame,true,1,stringHolder, {percentMorph})

Keeps telling me I am supplying a string for the fifth argument instead of a table. (Note: I tried it without the curly brackets just in case but it USED to work with them and now doesn't work either way). So obviously things have changed and before I bother Mike (again -- sigh) can anyone here give me a clue?

Re: Arguments for BlendActions

Posted: Wed Aug 26, 2015 12:46 pm
by mkelley
Ah, nevermind. With the help of Wes and Paul on our own forum, I got it figured out:

local stringHolder = LM.String:new_local()
stringHolder:Set('Expression')
local percentMorph = {}
local names = {}
names[1] = stringHolder
percentMorph[1] = ((holder - 50) * 2)/100
layer:BlendActions(moho.frame,true,1,names, percentMorph)

Most likely due to loose typing no longer being available in this version of Lua (this old man left programming back when that practice was the norm -- things were SO much easier then :>)