You'll probably get a more useful answer if you include your code.
In theory, yes, this should be entirely possible.
--Phil.