ranma's Recent Forum Activity

  • I think Adobe actually own Phonegap.

    another reason to concentrate on it instead of appmobi :)

    and true, on appmobi I got sound to work, but still would prefer phonegap.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • also add

    html,body {margin:0;padding:0;border:0}
    

    default margins / padding are set to be > 0 by default by the browser that's why it's off i think.

  • and then there's this:

    stefankendall.com/2011/12/29/using-appmobi-stop-immediately

    also I remember Ashley's struggles with them

    and second also, major company like Adobe uses phonegap

    so in conclusion, I'd prefer phonegap export to be the final and working over appmobi as I like to listen to people smarter than me :)

  • try

    body {
        background-image: url('iPhone.gif');
        background-repeat: no-repeat;
        background-attachment: fixed;
        background-position: center center
    }
    

    or simply try a shorthand

    body {background: url(iPhone.gif) center center no-repeat}
    
  • How do I make sound to work in phonegap. I read somewhere that since some version of C2 audio object uses phonegap's audio for playback, but I can't get any sound to play after export. Is there something extra I must do? Thanks in advance.

  • No, not yet - right now a plugin's the best way to do it, but I was hoping to add a feature to the Browser object in future to do this.

    pardon for digging this up, but I was searching for this and it turns out you can actually use the browser object:

    Go To Url action:

    "javascript:alert('hello world');void(0);"

  • What model phone did you try on and what version of Android? The phone might have an accelerometer but not expose it though the browser.

    nexus one, android 2.3.6

    the browser I can understand, but as a native phonegap app, it should work as intended.

  • I tried this on android, which HAS the accelerometer, but didn't work. Am I doing something wrong or is it a bug? Done with phonegap export.

    CAPX: dl.dropbox.com/u/59009902/motiontest.capx

    APK: dl.dropbox.com/u/59009902/Newproject-debug.apk

  • when renaming animation and pressing enter the one that I as renaming stays at "Animation2" and the first one is renamed to what I intended to rename Animation2 to. hard to describe, but i bet it happens to everyone who creates sprites with lots of animations.

  • ranma: dld again the previous capx.

    I cheated using opacity.

    It is a good question though, using the visible property with a conditionnal operator.

    I'm not sure it can be done. If it can, I'd love to know how to.

    For that one though, there's a trick/workaround to use a temp variable.

    The code you first gave would look like :

    on touch end
    -- object is visible?
    -- tVar = 0
    ++++ make object invisible
    ++++ tVar = 1
    -- object is invisible?
    -- tvar = 0
    ++++ make object visible
    ++++ tVar = 1
    

    This stops the "looping" effect.

    great, here's the exact code that worked, has to be inside a group as local variables can only be applied inside groups:

    -----------------
    group: clicking
    -----------------
    local number clickloop = 0
    
    on touch end: clickloop = 0
    -- object is visible?
    -- clickloop == 0?
    ++++ make object invisible
    ++++ set clickloop = 1
    -- object is NOT visible?
    -- clickloop == 0?
    ++++ make object visible
    ++++ set clickloop = 1
    

    hope it helps someone, thanks Kyatric

  • ranma: capx

    ?: is a conditional operator, which allows you to test conditions in expressions.

    i know, but how do you use it with visibility and others. thanks for the response, but this does not apply, or at least i don't know how to use this operator with "make visible / invisible". also I need to retain this event structure, as this is a simplified version of my real problem.

  • quick question, I have a button that toggles visibility of an object, in events:

    on touch end

    -- object is visible?

    ++++ make object invisible

    -- object is invisible?

    ++++ make object visible

    this of course loops itself through fully, because the object will be hidden by the first subevent and shown by second one. how to avoid this so it kinda breaks after making it invisible?

ranma's avatar

ranma

Member since 20 Feb, 2008

None one is following ranma yet!

Connect with ranma

Trophy Case

  • 16-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Email Verified

Progress

19/44
How to earn trophies