O'Reilly logo

LiveCode Mobile Development Beginner's Guide by Colin Holgate

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – setting up the Media card scripts

Copy the functions you proved to work in the test stack script, and paste them into WebScraper stack script. Then…

  1. Go to the Media card. As with the Links card we're not going to add any controls to the card, we'll do that with script. So, edit the card script.
  2. Here is the Media card's init function, and needed global variables:
    global gPageHTML,gMediaList on init if the platform is "iphone" or the platform is "android" then put getMedia(gPageHTML) into gMediaList if the number of lines in gMediaList = 0 then answer "There is no media in this page!" else set the itemdelimiter to "/" put empty into tMediaNames repeat with a = 1 to the number of lines in gMediaList put the last item of line a of gMediaList ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required