Would anyone mind helping with this simple JavaScript please?

Discussion in 'iOS Development' started by Abcmsaj, Mar 7, 2008.

  1. Abcmsaj

    Abcmsaj Retired Moderator

    Joined:
    Jan 26, 2008
    Messages:
    5,501
    Likes Received:
    122
    Device:
    iPhone 6 Plus
    I borrowed this from another application, and I want it to work.
    It's all good, up to the point where i Swipe left to change the image
    (The planned image is some form of gay porn because it's a jokey application to show to a friend) But I can't get the image to appear.

    I get my first image (battery.png) and then when I swipe, I get a fully black screen, which should be filled with a photo.

    here's the code... I'll leave it to you expert developers (who can understand simple Jiggy JavaScript.. unlike me.)



    Thanks.
    battery.png is posted below.
    I won't upload porn... LOL.

    Attached Files:

  2. olicf

    olicf New Member

    Joined:
    Dec 29, 2007
    Messages:
    168
    Likes Received:
    14
    Device:
    iPhone 3G (Black)
    After a quick glance over the code i noticed you have called the view with the image on 'about' but you have told the transiton to go to aboutView - I think this is the problem.

    Edit

    It looks like you are also setting properties for a (black) view that you have not created.

    Try replacing the bottom with this code...


    //About


    var aboutView = new Image( new Image("black.png") );
    aboutView.position = [-35, -60]
    aboutView.setCanHandleSwipes( true )
    mainView.addSubview( aboutView );


    Update 2..

    The funny thing is that after reading your code then re-reading, I have only just realised that its code that I written in my battery app LOL
  3. Abcmsaj

    Abcmsaj Retired Moderator

    Joined:
    Jan 26, 2008
    Messages:
    5,501
    Likes Received:
    122
    Device:
    iPhone 6 Plus

    Rofl.
    Yeah

    Please Register or Log in to view images


    I wish I could do my own... sorry.

    Anyway, I updated it and I've still got nothing...
    Would it help if I sent you the .app pack for you to take a quick look at please?

    Attached Files:

  4. olicf

    olicf New Member

    Joined:
    Dec 29, 2007
    Messages:
    168
    Likes Received:
    14
    Device:
    iPhone 3G (Black)
    LOL it really doesnt matter.
    I dont have my ipod on me at the moment but if you tell me what you want the app to do then i can rewrite the code for you

    Please Register or Log in to view images

  5. Abcmsaj

    Abcmsaj Retired Moderator

    Joined:
    Jan 26, 2008
    Messages:
    5,501
    Likes Received:
    122
    Device:
    iPhone 6 Plus

Share This Page