I am creating small books for mobile, Android and IOS but I want to bookmark for readers to continue reading later,
anyone have an example or something that can help me?
Thanks, I await your response.
Minibook with bookmark
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 32
- Joined: Mon Nov 26, 2012 6:07 pm
Re: Minibook with bookmark
Hi,
Make a button that stores the current position in the text (this could be a particular line number in the text or a card ID, depending on how you have set up your app) in a file (e.g. specialFolderPath("documents") & "/bookmarks.dat").
When the app opens, display all bookmarks in a field and let the user click or tap on that field to choose a bookmark.
Mark
Make a button that stores the current position in the text (this could be a particular line number in the text or a card ID, depending on how you have set up your app) in a file (e.g. specialFolderPath("documents") & "/bookmarks.dat").
When the app opens, display all bookmarks in a field and let the user click or tap on that field to choose a bookmark.
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
- VIP Livecode Opensource Backer
- Posts: 32
- Joined: Mon Nov 26, 2012 6:07 pm
a bettrt way,,, Re: Minibook with bookmark
Thanks for your answer,
I am a beginner, I hope you have some example that can help me, I would greatly appreciate it.
As I'm doing, is I put text fragments in different stacks and to move between them using buttons,
tell me if you have a better way to make a little book for Android and iPhone and also able to use bookmarks.
I have a project of short stories with my daughter and I want to see it come true.
a hug.
I am a beginner, I hope you have some example that can help me, I would greatly appreciate it.
As I'm doing, is I put text fragments in different stacks and to move between them using buttons,
tell me if you have a better way to make a little book for Android and iPhone and also able to use bookmarks.
I have a project of short stories with my daughter and I want to see it come true.
a hug.
Re: Minibook with bookmark
Hi,
First of all, if you're going to make a relatively simple e-book, i.e. something that isn't an adventure game and doesn't have many interactive features, Apple isn't going to accept it. Apple will tell you to use iBooks Author and to submit your work as an e-book rather than an app. AFAIK there are no such restrictions for the Android market.
You could keep a list of bookmarks like this:
Now you only need to figure out how to show all bookmarks in a list and make this list respond to mouseUp messages. Hint: you need to set the itemDel to numToChar(14) to be able to retrieve item 2 of the selectedText of a list field.
Kind regards,
Mark
First of all, if you're going to make a relatively simple e-book, i.e. something that isn't an adventure game and doesn't have many interactive features, Apple isn't going to accept it. Apple will tell you to use iBooks Author and to submit your work as an e-book rather than an app. AFAIK there are no such restrictions for the Android market.
You could keep a list of bookmarks like this:
Code: Select all
on mouseUp
ask "Enter a description for this bookmark..."
if it is not empty then
put it & numToChar(14) & the id of this cd into myBookmark
set the cBookmarks of this stack to the cBookmarks of this stack & cr & myBookmark
put the cBookmarks of this stack into url ("binfile:" & specialfolderpath("documents") & "/bookmarks.dat")
end if
end mouseUp
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode