none
how to acess the image files stored in the http://smallbasic/drop RRS feed

  • Question

  • How can i acess the files stored in the drop file in smallbasic.com?

    The programs that use these don't work on my computer?

    Thank you

    Loira_maluka_

     

    Monday, April 4, 2011 9:27 PM

Answers

  • I imported the ASTEROIDS game and it worked fine, so the images are good.  I guess that it is possible that some security feature is preventing you downloading or using the images with SmallBasic.

    1] What happens if you just hit the link to some specific images, for example those listed by Rushworks above?

    2] Can you run any other SmallBasic program with resources/images loaded from the net?  Just try the following to test:

    url = Flickr.GetRandomPicture("nasa")
    TextWindow.WriteLine("URL : "+url)
    img = ImageList.LoadImage(url)
    TextWindow.WriteLine("IMG : "+img)
    GraphicsWindow.DrawResizedImage(img,0,0,GraphicsWindow.Width,GraphicsWindow.Height)

    OR

    player = Shapes.AddImage("http://smallbasic.com/drop/Asteroids_Ship.png")
    Shapes.Move(player,100,100)

    If 1 fails, then I would look at antivirus or firewall, bearing in mind most people don't have this problem so it is something fairly specific to your setup.  This certainly shouln't be a windows firewall with default settings problem.

    If only 2 fails, then it may be temp directory or other privilidges, pehaps try uninstall and reinstall.  If it is your home PC this should be enough, if it is school or other PC, then perhaps there are other security features - these could be anything so you would have to check with the administrator.

    • Proposed as answer by Rushworks Monday, April 11, 2011 12:18 AM
    • Marked as answer by litdevModerator Saturday, April 16, 2011 4:53 PM
    Sunday, April 10, 2011 4:16 PM
    Moderator

All replies

  • Hi Loira_maluka,

    http://smallbasic/drop doesn't exist or cannot be accessed when loaded into my browser.  Where was this address suggested and what is supposed to be there?  More details on what you are trying to do, which programs are you trying to use with this address etc.

    Monday, April 4, 2011 9:36 PM
    Moderator
  • Yes, there is no such thing as that URL, but to load any images from any URL, then use:

    image = ImageList.LoadImage(Filepath or URL of image)

    This will allow you to store images in the "ImageList" To then use this image, then use

    Shapes.AddImage(image)


    ~~AirWaves!!~~
    Tuesday, April 5, 2011 2:57 AM
  • Yes, there is no such thing as that URL, but to load any images from any URL, then use:

    image = ImageList.LoadImage(Filepath or URL of image)

    This will allow you to store images in the "ImageList" To then use this image, then use

    Shapes.AddImage(image)


    ~~AirWaves!!~~

    AirWaves,

    Why would you use ImageList.LoadImage() then use Shapes.AddImage() surely you can just use Shapes.AddImage() to load your image for use?

    Tuesday, April 5, 2011 3:06 AM
  • The ImageList.LoadImage() function can be used multiple times without slowing your program, if you are getting the image from a webpage.

    So the imagelist stores the image for use later, and you can add it to your graphicswindow multiple times without needing to send a request for the image of the webpage, making it faster because you only need to get it once.

    Sure its ok to use Shapes.AddImage(), but its best only when you need an image once.


    ~~AirWaves!!~~
    Tuesday, April 5, 2011 3:21 AM
  • Hi Loira_maluka,

    http://smallbasic/drop doesn't exist or cannot be accessed when loaded into my browser.  Where was this address suggested and what is supposed to be there?  More details on what you are trying to do, which programs are you trying to use with this address etc.


    This is where Vijaye "drops" images and other resources for his "Sample of the Week" Blog
    You have to know the direct url to access the files - here are a few...

    bigRock = ImageList.LoadImage("http://smallbasic.com/drop/Asteroids_BigRock.png")
    medRock = ImageList.LoadImage("http://smallbasic.com/drop/Asteroids_MediumRock.png")
    smlRock = ImageList.LoadImage("http://smallbasic.com/drop/Asteroids_SmallRock.png")
    background = ImageList.LoadImage("http://smallbasic.com/drop/Asteroids_Sky.png")

    http://smallbasic.com/drop/stargates/stargates_shipright_small.png

    http://smallbasic.com/drop/gorilla/gorillavictory.bmp

    • Proposed as answer by AirWaves Wednesday, April 6, 2011 2:51 AM
    • Unproposed as answer by Rushworks Monday, April 11, 2011 12:18 AM
    Tuesday, April 5, 2011 7:51 PM
  • Thank you for the answer, but my problem is that when I try to load the asteroids program (or any other with commands like those) they don't start?? Would it have anything to do with the Macaffe antivirus or the firewall??

     


    jcfm
    Sunday, April 10, 2011 2:10 PM
  • I imported the ASTEROIDS game and it worked fine, so the images are good.  I guess that it is possible that some security feature is preventing you downloading or using the images with SmallBasic.

    1] What happens if you just hit the link to some specific images, for example those listed by Rushworks above?

    2] Can you run any other SmallBasic program with resources/images loaded from the net?  Just try the following to test:

    url = Flickr.GetRandomPicture("nasa")
    TextWindow.WriteLine("URL : "+url)
    img = ImageList.LoadImage(url)
    TextWindow.WriteLine("IMG : "+img)
    GraphicsWindow.DrawResizedImage(img,0,0,GraphicsWindow.Width,GraphicsWindow.Height)

    OR

    player = Shapes.AddImage("http://smallbasic.com/drop/Asteroids_Ship.png")
    Shapes.Move(player,100,100)

    If 1 fails, then I would look at antivirus or firewall, bearing in mind most people don't have this problem so it is something fairly specific to your setup.  This certainly shouln't be a windows firewall with default settings problem.

    If only 2 fails, then it may be temp directory or other privilidges, pehaps try uninstall and reinstall.  If it is your home PC this should be enough, if it is school or other PC, then perhaps there are other security features - these could be anything so you would have to check with the administrator.

    • Proposed as answer by Rushworks Monday, April 11, 2011 12:18 AM
    • Marked as answer by litdevModerator Saturday, April 16, 2011 4:53 PM
    Sunday, April 10, 2011 4:16 PM
    Moderator