Loading sounds into global and accessing

You must Login before you can answer or comment on any questions.

I am trying to load sounds via the app.js page and I am not able to access them within other pages. When I try, I get the following error: [ERROR] While executing Timer, received script error. 'Can't find variable: player1 (unknown file)'

How can i accomplish this? I can load on each individual page but this slows down each page and that is the reason I only want to load once on application startup.

1 Answer

Hi,

You are getting this problem because you are not passing player1 refrence to new window which you are going to open. To get rid of this problem pass player1 refrence to next window.

— answered 10 months ago by Moiz Chhatriwala
answer permalink
1 Comment
  • Use this way to pass Objects

    var window= Titanium.UI.createWindow({

    url : 'newwindow.js,
    param: player1
    

    });

      // new window.js

    var player1= Ti.UI.currentWindow.param;

    — commented 10 months ago by Moiz Chhatriwala

Your Answer

Think you can help? Login to answer this question!