2016년 11월 27일 일요일

Game help pls!


So, I'm trying to create a choose your own adventure game and I'm having trouble. What I've been doing is just linking a button to a new screen, but I understand it is bad to have more than 10 screens. Is there anyway I would be able to erase everything on a screen, then replace it with the continuation of the story? P.s. i use images instead of labels

-- 
Use different screens wisely
Before starting to create another screen, first you should think about is it really necessary? See also Building apps with many screens and SteveJG's post about advantages/disadvantagesbecause in only one screen you also can use vertical arrangements to simulate different screens, just set the arrangements to visible = true/false as needed... See also Martyn_HK's example about how to use Tabs in App Inventor and another example from Cyd.
      
The recommended method of switching screens in AppInventor


    and reuse your components
    see this example, which uses one canvas to display several images
    How to Swipe left/right and top/bottom to trigger something


    Taifun

    -- 
    See this doc for how to do it all in one screen 

    ABG

    -- 

    Error with blocks


    Hi, i cant modified the blocks of the Screen1. There's a notification of an error.
    I've tried to créate a new Project but i got the same error. Even if I open an old projecto and I start over again I get the same error.
    I add an screenshot.

    error.jpg 표시 중

    -- 
    If you are using Chrome, try this: https://groups.google.com/forum/#!searchin/mitappinventortest/reset$20chrome%7Csort:relevance/mitappinventortest/Ur14dR3ZO3I/0pm_yOydDwAJ
    If you are using Firefox, empty the cache, or switch to Chrome.
    Cheers, Ghica.

    -- 
    maybe a "hard reset" can help you?

    -- 
    I see from your screen shot that you have two open browser windows pointing to AI2 ?

    AI2 can't handle that.

    -- 
    Extension does this problem


    -- 
    your comment does not help very much in this thread without providing more information..


    -- 

    Timer


    i want to make a level visible to 5:00 to 5:30pm.
    how to?

    --
    use the clock component
    Didn't get the right example.
    Please send me the exact answer if possible.
    Thanks in advance

    -- 
    first learn the basics and then you aso should be able to adjust the provided example to your needs...

    A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook   http://www.appinventor.org/book2 ... the links are at the bottom of the Web page.  The book 'teaches' users how to program with AI2 blocks.
    There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro  and the aia files for the projects in the book are here:  http://www.appinventor.org/bookFiles  
    How to do a lot of basic things with App Inventor are described here:  http://www.appinventor.org/content/howDoYou/eventHandling.

    Also do the tutorials http://appinventor.mit.edu/explore/ai2/tutorials.html to learn the basics of App Inventor, then try something and follow the
     Top 5 Tips: How to learn App Inventor

    You will not find a tutorial, which does exactly what you are looking for. But doing the tutorials (not only reading a little bit) help you to understand, how things are working. This is important and this is the first step to do.


    -- 

    Alert when word appears on the url


    How to find a word on the web and tell the screen

    --

    -- 
    It would be nice if you would give more detail about what you would like to do!
    Cheers, Ghica

    -- 
    Search the text "ENCOBERTO" in the site: if locate, show message: OK

    site :https://www.mar.mil.br/dhn/chm/meteo/prev/santos/santos.htm

    thanks

    -- 

    i think this project will help you.


    -- 
    I am not so sure how the above project will help you.

    But anyway, it is not very difficult. Use the web component http://ai2.appinventor.mit.edu/reference/components/connectivity.html#Web
    and point it to your website. Use the GotText event and search the text using contains text, piece http://appinventor.mit.edu/explore/ai2/support/blocks/text.html#contains
    for the word you need.
    This is called screen scraping. If you search the forum for it, you will find some examples.
    Cheers, Ghica.


    -- 

    Joystick BT


    hey guys,do you mind taking a look at my app? i want to actually send joystick data via bluetooth? what should i do. I attached my aia file below. Please help.


    -- 
    What do you expect as an anwer?
    First of all, you should give some more information about your joystick.
    At first I thought that you wanted to connect a joystick to your phone, but on closer look I think that you want to use your phone as joystick.
    What is it?
    In the latter case, you need to set up your phone as Bt server, not as client. And where do you want to connect it to? A PC? Another phone?
    In the second case look at the BT example of Taifun: https://puravidaapps.com/btchat.php
    Of course it is not your problem, but it shows how to set up the communication.
    Cheers, Ghica.


    btchat.aia

    -- 
    Ghica, thanks a lot for responding.
    I want to use my phone as a joystick. I want to control two servos for pan/tilt of a camera to be exact. As of now, I am stuck at wondering how to send joystick data to actually control 2 servo motors.

    -- 
    so i should set it as a bt server? is that right? I'll post an update. Do you mind helping me out in this one? Thanks a lot

    -- 
    That depends if it is right. But this knowledge will not help you if you do not know what the servo motors expect by way of input. And how they produce output to pan/tilt that camera. Are the servo's attached to an Arduino or comparable board? In that case, you still need to be a BT client, but your implementation is still wrong, because in your app there is no communication that I can find to command those servo's.
    Cheers, Ghica.

    -- 
    yes, the servos are connected to arduino. btw, i am using hc-05 bt module to send data from the smartphone to arduino.

    yes Ghica, in my app there's no communication to command servos, not yet. It is because i do not know what to do. I was only able to move the joystick, that's it. I don't know what command to use or block to initiate to begin bluetooth comms.  I was wondering if you could try to direct me to some useful links or teach me how to do it, Thanks :) 

    -- 
    Here are some useful links:

    http://appinventor.pevest.com/?p=520
    http://www.martyncurrey.com/turning-a-led-on-and-off-with-an-arduino-a-hc-06-and-android/


    Try these. If you have further questions then, report back here.
    Cheers, Ghica.

    -- 

    thanks Ghica, i'll look into these immediately. One last question. Do i need to convert joystick data to ASCII before transmitting it to the arduino? 

    -- 
    That totally depends on the sketch you wrote for the Arduino. This is the difficult trick about BT to Arduino connections that there is too much freedom.
    I find it easiest to send one character strings to the Arduino and have a sketch that understands those. I think there are examples in the tutorials I gave you links to.
    Cheers, Ghica


    --

    thanks a lot for the attention Ghica I will work on these and post updates probably after a week. Really, I appreciate it. 


    -- 

    transfer phone book in mysql DB


    you can take the entire phone book and transfer it to a mysql DB?
    who can tell me which road to take? as an example see and study?

    thank you

    -- 

    Using HTML Anchors with Webviewer


    I know this has been discussed before, but I can't see to find (or understand) a definitive answer, and another thread on it has been closed to comments.

    I have an app where I use webviewer to call a php page on my website. The php page displays a map and other things via php/mysql/html, using data in the db to place map pins.

    I have anchors in the page so clicking on a link in the popup window for each map pin on the map jumps down to the relevant text further down the page.

    Works fine in Chrome etc. Doesn't work at all in webviewer. I can't reload the page as it loses all of the data passed to it to grab things from the mysql db etc.

    Any ideas? Many thanks folks :)

    --
    AI wieview not full browser! You need to use some js library for this.
    I recommend Leaflet JS for this http://leafletjs.com/plugins.html
    Works ok with AI WebView, you can try my app https://play.google.com/store/apps/details?id=est.kussu.meretuul
    (Package name is changed!)


    --

    web viewer doesn´t show any fusion table data


    Hey there,

    i´ve created a fusion table.
    now i want to show it in my app. But nothing happens, even after waiting for minutes.

    for testing i inserted a different url in the web viewer and it works just fine. 
    I´m also able to open the fusion table via the url in my chrome browser. 
    Why is it not appearing in der web viewer component?

    Can anybody please help me?

    Kind regards

    --
    do the Pizza Party tutorial to learn how to work with fusiontables

    -- 
    Ok fine.

    I did the tutorial. 
    It works except for one thing.

    I can add entries to the table via the app. But in the App i can´t see the table. 
    Same problem as in my own app.

    Or is this a problem with the emulator. unfortunately I don´t own an android device and I have to use the emulator

    -- 
    Any other URL works just fine.
    Only the fusion table URLs cause the problems. But I can open them in the chrome browser without problems

    -- 



    --