Well I have a class like this as an example:
--An External Library --UI.lua
UI = {}
function UI: new()
local Group = display.newGroup;
local inventory_frames = display.newImage("inventorybox.png") ;
Group :insert( inventory_frames) ;
function inventory_framesDown()
local tr_down = transition.to(inventory_frames,{time = 150,alpha = 0, x=0 ,y =8})
end
return Group
end
return UI
Now from my actual scene.lua (using storyboard API) from corona.
1.local ui= require"UI.lua" After that in my create scene function()(The reason I have not put it in a group scene because I want to make it disappear manually)
local UI2 = UI:new()
Then inside my exit scene function.I want to call the function inventory_framesDown() from inside UI:new().
function scene:exitScene(e)
invent = UI:new() inventory_framesDown() --this dose not work
storyboard.purgeScene("scene2");
storyboard.removeAll()
end
So How can I call a global function inside a global function from a external library? Thanks in advance:)