[Sugar-devel] EaselJS+PreloadJS and XHR

laurent bernabe laurent.bernabe at gmail.com
Mon Jan 27 12:32:56 EST 2014


Thank you for your answer.

In fact, I develop the activity and preview it from inside Brackets IDE.
Previews are shown inside a Chrome browser.
So, when previewing from Brackets IDE, we can say that I am viewing it
locally, in a browser, though it uses a kind of server (adress is for
example : http://127.0.0.1:39643/index.html).

But I've also tested under osbuild (with run option), but the image does
not appear neither.

For the links, I am using relative paths.
The repository LearnChess
(LearnChess<https://git.sugarlabs.org/learnchess/learnchess_web/commits/master>)
is up to date : I haven't done any change locally since.

Regards.


2014-01-27 Manuel Quiñones <manuq at laptop.org>

> 2014-01-27 laurent bernabe <laurent.bernabe at gmail.com>:
> > Hello everyone,
> >
> > I am using EaselJS and PreloadJS in one of my web activities
> (LearnChess) in
> > order to manage pictures inside a canvas. But I don't manage to show png
> > files.
>
> How are you trying?
>
> > According to this post : createjs_forum it can't be done locally without
> > launching a server like lampp, because CreateJS libraries rely on XHR.
> >
> > So does this mean that CreateJS is not well suited for Sugar ?
>
> No.  Sugar serves the files correctly.  Chances are:
>
> 1. you are trying your activity locally, directly in a browser from
> file://...index.html
> 2. you have added links to file://.../image.png
>
> If 1. run your activity from Sugar, or use a local server like "python
> -m SimpleHTTPServer"
> If 2. use relative paths to link your images
>
> --
> .. manuq ..
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20140127/0f39e37e/attachment.html>


More information about the Sugar-devel mailing list