That did work for me, it makes sense now, the table M was declared as local in the first place.... dur haha, and im adding values to the already local table.
Do you know if it is possible to insert a display object from 1 file into a display group that i have created in my Mechanic file?
Seems like it probly isnt possible, i was trying to use the following with no luck:
Yes, I think that should work. You need to display the group though. I think you are adding the image fine, but the group is not showing up.
In your second file, you should do something like this:
1
2
| localGroup:insert(mechanic.currentPane)
mechanic.currentPane:insert( image_1 ) |
Awesome that did the trick, thank you so much for your time. Now to venture onward with this project!!
Good luck with your project!
Accessing external modules
Thanks Jonathan and justimag.in.board
Got everything working, after changing Director to director. Also I am using ui.lua 1.5 Edited by William Flagello.
Here's a little snippet that might help someone:
I am in a module through director change screen called level1. I then draw/set up the graphics from another module called myMoozi (local myMoozi = require("myMoozi")) (This is how you bring in other modules, it doesn't change screen, but allows you to use anything from this external module)
I am now able to add a listener to an object (linee) in the master set/draw module (myMoozi)
Cool!
1
2
3
4
5
| level1M.testPrint = function()
print "Testing 1 2 3 4 "
end
myMoozi.linee:addEventListener( "tap", level1M.testPrint) |
views:1952 update:2011/10/4 8:06:35