web page in scrolling text field
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
web page in scrolling text field
I am creating an Android app.
I have created an AB button using Mobgui, and a scrolling text field (using the standard Livecode tools).
I would like button B, when touched, to load web page in the narrow scrolling field. This web page will contain two vertical columns of icons linked to apps for purchase in the Play store. I would like to do it this way so that I can add more apps as I release them to the webpage, rather than have to add in app purchases to the app itself, requiring an update of the app to do so.
What is the best way to tackle this - (I am a 100% newbie!) - I am not sure where I would find an example of such a script. If anyone could point me in the right direction that would be wonderful.
Many thanks,
Prue.
I have created an AB button using Mobgui, and a scrolling text field (using the standard Livecode tools).
I would like button B, when touched, to load web page in the narrow scrolling field. This web page will contain two vertical columns of icons linked to apps for purchase in the Play store. I would like to do it this way so that I can add more apps as I release them to the webpage, rather than have to add in app purchases to the app itself, requiring an update of the app to do so.
What is the best way to tackle this - (I am a 100% newbie!) - I am not sure where I would find an example of such a script. If anyone could point me in the right direction that would be wonderful.
Many thanks,
Prue.
Re: web page in scrolling text field
Further than this, is it even possible to embed a webpage into a scrolling text field, or do I need to use another type of object?
Button A, when pressed, will take the user to a menu contained within a scrolling text field. If a web page cannot be embedded in a scrolling text field, then do I use another type of object and somehow hide it with button A's scrolling field, assuming I can in fact do this all on one card (or do I have to create a new card entirely???)
Button A, when pressed, will take the user to a menu contained within a scrolling text field. If a web page cannot be embedded in a scrolling text field, then do I use another type of object and somehow hide it with button A's scrolling field, assuming I can in fact do this all on one card (or do I have to create a new card entirely???)
Re: web page in scrolling text field
Hi Prue,
Not really clear on this but why don't you use a browser?
mobileControlCreate "browser"
Simon
Not really clear on this but why don't you use a browser?
mobileControlCreate "browser"
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: web page in scrolling text field
Please excuse my lack of knowledge / correct terminology. I want a "frame" on the left of the stack. When button A is touched, a menu will open in the frame. When button B is touched, a web page containing my other apps will load in the frame. So the AB button will toggle back and forth between the menu and the "other apps" within the vertical frame on the left of the stack.
Re: web page in scrolling text field
Is this an html menu?A is touched, a menu will open in the frame.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: web page in scrolling text field
Hi Simon,
No I am attempting to use this code within the app for a video menu:
http://lessons.runrev.com/m/754/l/6316- ... files-menu
In the same "frame" I would like to be able to toggle back and forth between this video list/menu and another "menu" which has my other apps in it (this is the one that I want to be able to control from the back end of a website so that I can add to / delete apps without resubmitting to Play.
No I am attempting to use this code within the app for a video menu:
http://lessons.runrev.com/m/754/l/6316- ... files-menu
In the same "frame" I would like to be able to toggle back and forth between this video list/menu and another "menu" which has my other apps in it (this is the one that I want to be able to control from the back end of a website so that I can add to / delete apps without resubmitting to Play.
Re: web page in scrolling text field
Hi Prue,
You can try
but I find that it doesn't render well if the page is complex.
That lesson is pretty advanced for a beginner (but glad you didn't choose Data Grids as they are difficult), do you have it working on desktop?
Simon
You can try
Code: Select all
put url "http://mysite.com/app.html into tHtml --whatever your site is
set the htmlText of field "myField" to tHtml
That lesson is pretty advanced for a beginner (but glad you didn't choose Data Grids as they are difficult), do you have it working on desktop?
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: web page in scrolling text field
Thanks Simon. I'll see if I can get that to work. No I do not have it working on desktop yet. I have literally put the script into the card script and left as is for now. Everything I attempt at the moment I simply cannot get to work! I'm struggling, to say the least. 

Re: web page in scrolling text field
Hi Prue,
I just took a closer look at that lesson and boy is it the long way around.
I'll just talk about Android/iOS for now
So, you just include your video's in the Copy Files tab of the standalone builder (If you don't know where that is just say.. really easy).
I'm going to stop there because i think you mentioned elsewhere that these are Vimeo linked video's? Not local video's?
But from there (if local) you just use as Klaus said use "launch document". Or in the context of clicking a name in the field "launch document the selectedText of field "myVideoFileNames" " ( you set the defaultFolder above so it already knows where to look).
Simon
I just took a closer look at that lesson and boy is it the long way around.
I'll just talk about Android/iOS for now
So, you just include your video's in the Copy Files tab of the standalone builder (If you don't know where that is just say.. really easy).
Code: Select all
set the defaultFolder to specialFolderPath ("engine") -- that is where your video files will show up after the above and you build for mobile
put the files into field "myVideoFileNames"
But from there (if local) you just use as Klaus said use "launch document". Or in the context of clicking a name in the field "launch document the selectedText of field "myVideoFileNames" " ( you set the defaultFolder above so it already knows where to look).
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: web page in scrolling text field
I see I made a mistake, below is the simplified working mobile version;
There are scripts in 3 different controls, take a look.
Simon
Tested on my Kindle Fire.There are scripts in 3 different controls, take a look.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: web page in scrolling text field
Hi Simon,
See attached file for the layout/function.
Yes the videos will be streamed from Vimeo. I haven't tackled that yet, although another forum member said he has his working in the following manner:
"Anyway - it's more complex to describe what to do here in words than it is to do. It's essentially quite simple. You need to look at the examples of how to show web content in Livecode and be comfortable with that."
...For mobile... "Then you need to look at the embed code for the Vimeo bits you want to display - it comes wrapped in an iframe tag. This iframe bit is what you drop into the body of a blank HTML template you have stored as text fields in Livecode. Then you write this HTML file out locally, load it into your web viewer in Livecode, and there it is. The Vimeo should start playing full screen on any mobile device. Beware - I did this almost 2 years ago - things may have moved on since then."
Like I said, I haven't attempted this yet. I don't yet know anything about HTML templates, writing HTML files out locally, or anything! I'm completely green
I saved the zip file you posted to a folder on my computer, then created a standalone application. When I launch it using "Test Target" on my android, I am able to select the Doggy.mp4 file in the menu and choose to complete action by selecting video player, but I get the message "Cannot play video, sorry this video cannot be played". I also am wanting to have the video play within an object which will take up part of the screen in the app - see the attachment - I want the video to take up the rectangle named "object B".
Prue.
See attached file for the layout/function.
Yes the videos will be streamed from Vimeo. I haven't tackled that yet, although another forum member said he has his working in the following manner:
"Anyway - it's more complex to describe what to do here in words than it is to do. It's essentially quite simple. You need to look at the examples of how to show web content in Livecode and be comfortable with that."
...For mobile... "Then you need to look at the embed code for the Vimeo bits you want to display - it comes wrapped in an iframe tag. This iframe bit is what you drop into the body of a blank HTML template you have stored as text fields in Livecode. Then you write this HTML file out locally, load it into your web viewer in Livecode, and there it is. The Vimeo should start playing full screen on any mobile device. Beware - I did this almost 2 years ago - things may have moved on since then."
Like I said, I haven't attempted this yet. I don't yet know anything about HTML templates, writing HTML files out locally, or anything! I'm completely green

I saved the zip file you posted to a folder on my computer, then created a standalone application. When I launch it using "Test Target" on my android, I am able to select the Doggy.mp4 file in the menu and choose to complete action by selecting video player, but I get the message "Cannot play video, sorry this video cannot be played". I also am wanting to have the video play within an object which will take up part of the screen in the app - see the attachment - I want the video to take up the rectangle named "object B".
Prue.
Re: web page in scrolling text field
Just a quick reply,
Sorry the video wouldn't play, I didn't check on the emulator, will do soon.
But in the standalone setting > Copy Files tab you should see Doggy.mp4... Add your pdf files there and they will show up in the field. Now once again I'm not sure the emulator has a pdf reader, but the launching is the same and it will work on a device that has a pdf reader.
Oh I have a plan... just copy a .jpg image, that should work.
Simon
Sorry the video wouldn't play, I didn't check on the emulator, will do soon.
But in the standalone setting > Copy Files tab you should see Doggy.mp4... Add your pdf files there and they will show up in the field. Now once again I'm not sure the emulator has a pdf reader, but the launching is the same and it will work on a device that has a pdf reader.
Oh I have a plan... just copy a .jpg image, that should work.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: web page in scrolling text field
Ok. So I have copied 3 files in. One is a jpg, one a pdf and one a word doc. Of the 3, only the jpg shows in the test target. But when I select "Photos" as the application to complete the action, it says "Media not found". This files are stored in various locations on my computer.. could this be a problem? Am I meant to save a copy of the files in the same folder as the app is saved, or should Copy Files be enough, in the Standalone Application settings as you mentioned?
Thanks again,
Prue.
Thanks again,
Prue.
Re: web page in scrolling text field
Hi Prue,
OK have tested this on the emulator, the audio plays but not the video for the .mp4, the pdf does not show at all and the jpg does show.
I don't trust the emulator. On a real device with the added application (pdf reader) it all works nicely.
But you say you saw the jpg (?) so st least one thing is correct, the location of the directory (really, it all is there else it wouldn't show up in the field "myVideoFileNames"... Right?).
Are you on Windows or Mac?
Do you have a device to test on?
Simon
EDIT;
There is no native reader on Android for either of those file types.
OK have tested this on the emulator, the audio plays but not the video for the .mp4, the pdf does not show at all and the jpg does show.
I don't trust the emulator. On a real device with the added application (pdf reader) it all works nicely.
But you say you saw the jpg (?) so st least one thing is correct, the location of the directory (really, it all is there else it wouldn't show up in the field "myVideoFileNames"... Right?).
Nope, they all end up in the "engine" folder.This files are stored in various locations on my computer.. could this be a problem?
Are you on Windows or Mac?
Do you have a device to test on?
Simon
EDIT;
...one a pdf and one a word doc...
There is no native reader on Android for either of those file types.
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: web page in scrolling text field
I am testing on an android, not in the emulator.
Yes I can see the names of both the video and the jpg, but can't open either.
Yes I can see the names of both the video and the jpg, but can't open either.