For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 6 replies, 2 voices, and was last updated 13 years, 8 months ago by
support-octavio.
-
AuthorPosts
-
NigelShawMemberHi,
i have a javascript folder set that i am including into my application. How can i retain the tree? for example-
Here is the folder tree
the folder called FullScreenMusic needs to remain like this. When i add references into the app for script, it changes to this-
<script type="text/javascript" src="jquery.min.js"></script> <script type="text/javascript" src="ttwFullScreenMusic.js"></script> <script type="text/javascript" src="soundmanager2.js"></script>when i need it to be like this-
<script type="text/javascript" src="jquery.min.js"></script> <script type="text/javascript" src="FullScreenMusic/ttwFullScreenMusic.js"></script> <script type="text/javascript" src="FullScreenMusic/Scripts/src/soundmanager2.js"></script>i have placed the whole FullScreenMusic folder into the root of the appication but it makes no difference. Because of this change, my SWF file cannot be referenced so it goes blank
thanks
Attachments:
You must be logged in to view attached files.November 23, 2012 at 5:54 pm #332620
support-octavioMemberHi Nigel,
What I would do is include these external js file using code in runtime:
phoneui.documentReadyHandler = function() { $("head").append($("<script type="text/javascript" src="FullScreenMusic/ttwFullScreenMusic.js"></script>")); }Hope this is helpful for you.
November 23, 2012 at 6:23 pm #332621
NigelShawMemberHi
thanks for that. I placed the code in the custom.js then opened it in DW but it shows an error on that specific line. I have attached my whole custom file for reference?
thanks
/** * Notification that the UI is about to transition to a new page. * Perform custom prepage-transition logic here. * @param {String} currentPageId * @param {String} targetPageId * @returns {boolean} true to continue transtion; false to halt transition */ phoneui.prePageTransition = function(currentPageId,targetPageId) { // add custom pre-transition code here // return false to terminate transition return true; } /** * Notification that the UI has transition to a new page. * * @param {String} newPageId */ phoneui.postPageTransition = function(newPageId) { } /** * Notification that device orientation has changed. * * @param {String} newOrientation */ phoneui.postOrientationChange = function(newOrientation) { } /** * Called when document is loaded. */ phoneui.documentReadyHandler = function() { $("head").append($("<script type="text/javascript" src="fullScreenMusic/soundmanager2/script/soundmanager2.js"></script>")); $("head").append($("<script type="text/javascript" src="FullScreenMusic/ttwFullScreenMusic.js"></script>")); } /** * These are soundManager settings. There * is no need to change them unless you have * read the soundManager documentation * **/ soundManager.flashVersion = 9; soundManager.useHighPerformance = true; soundManager.wmode = 'transparent'; soundManager.useFastPolling = true; soundManager.url = 'fullScreenMusic/soundmanager2/swf/'; soundManager.debugMode = false; /** * Fullscreen music initialization * Always make sure this call is wrapped in * soundManager.onload to ensure all dependencies are loaded * */ soundManager.onload = function() { $('.playlist').ttwFullScreenMusic({style:'fullscreen'}); } }November 23, 2012 at 6:40 pm #332622
NigelShawMemberHi
i changed this
$("head").append($("<script type="text/javascript" src="fullScreenMusic/soundmanager2/script/soundmanager2.js"></script>")); $("head").append($("<script type="text/javascript" src="FullScreenMusic/ttwFullScreenMusic.js"></script>"));to this (removing the””)
$("head").append($(<script type="text/javascript" src="fullScreenMusic/soundmanager2/script/soundmanager2.js"></script>)); $("head").append($(<script type="text/javascript" src="FullScreenMusic/ttwFullScreenMusic.js"></script>));and the error disappeared however, it doesn’t update in the compile
thanks
November 23, 2012 at 6:56 pm #332623
support-octavioMemberHi Nigel,
Apologies I goofed up.
Please use:
$(“head”).append(‘<script type=”text/javascript” src=”FullScreenMusic/ttwFullScreenMusic.js”></script>’);
November 25, 2012 at 2:30 pm #332655
NigelShawMemberHi Octavio
sorry, it still doesnt work for me. O have placed this code into the custom.js file but when i compile it and view the source code, it does not change the script type path to what i need 🙁
could you please check my js file above to see if there seem to be any errors?
thanks
Nigel
November 28, 2012 at 10:04 am #332813
support-octavioMemberHi Nigel,
As you posted another thread with info that you already built your app, I guess that you resolved this problem, am I right? Let me know if you’re still having this problem.
-
AuthorPosts
