x


Reusing exe javascripts for web build

I have game object which loads textures from external directory. Code part looks like this:

import System.IO;

private var stillsPathsLeft : String[] = Directory.GetFiles("C:/MyApp/stills/Left/","*.jpg"); private var urlLeft = "file://"+stillsPathsLeft[initImage]; private var stillsPathsReset = stillsPathsLeft.Length-1; private var initImage: int = 0; var leftGo: GameObject;

For standalone exe it works fine. When I build web version of the application it's not loading images. Do I need to rewrite javascript specifically for web use or is there some built in way to reuse/convert the existing one?

more ▼

asked Apr 29, 2013 at 11:43 AM

Kristians Mednis gravatar image

Kristians Mednis
0 1

Learn to format your code properly. See the tutorial video.

Apr 29, 2013 at 11:43 AM Graham Dunnett ♦♦
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

The webplayer has zero (none, nada) access to the file system of the PC where it is running.

more ▼

answered Apr 29, 2013 at 11:44 AM

Graham Dunnett gravatar image

Graham Dunnett ♦♦
21.4k 30 41 118

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x5869

asked: Apr 29, 2013 at 11:43 AM

Seen: 214 times

Last Updated: Apr 29, 2013 at 11:44 AM