ambiera home ambiera home

Ambiera Forum

Discussions, Help and Support.

Create a new account, Search, or Login:
Name:  Password:    
Ambiera Forum > CopperCube > Programming and Scripting
Querystring and texture loading
Author Text

Registered User
2018-02-07 15:58:53

Hi there,

I'm building a WebGL project in Coppercube and wondered if there is a way to get the Load Texture action to work with querystrings in a URL?

Or any other way of passing in a variable into the URL of the action, so that the textures loaded could be changed depending on parameters rather than static?

Any advice would be highly appreciated!

Thank you


Registered User
2018-02-08 04:44:27

Don't know if it would work or not.... To get the texture by using a url
....not sure..

Registered User
2018-02-10 14:37:51

Passing a URL parameter to a script via Load Texture embedded in the Coppercube WebGL build works fine.

So, for instance, in the Load Texture parameters box, specififying URL to get from as -

- with the grab-texture.asp script redirecting to a .jpg image based on the querystring picks up OK and works great.

But how could you pass a variable to Load Texture script so that id=1 could be any ID specified by a querystring?

It would be great if there was an easy way to do this. :)


Registered User
2018-02-10 17:00:57

You can save variable to a text file...

For example save a variable name "ID" and use add value 1

Then in your code to load a texture from a file ...

Add something like this...

Var id = ccbgetcoppercubevariable("ID")

Var url = here id is our variable

Ccbloadtexturefromfile (url)

This can be the idea to fetch variable to loading the coppercube variable into the code itself...
And then executing it...

Maybe am not explaining it correctly to u... As am not feeling well....

2018-02-10 19:34:42

I have worked with this exact method before andycampbell, it works really well +1

Registered User
2018-02-11 11:13:22

Thank you so much for your responses! I will give this a go.

Create reply:

Posted by: (you are not logged in)

Enter the missing letter in: "I?ternational" (you are not logged in)




Forum Codes

Feature Code
Link [url] [/url]
Bold [b]bold text[/b]
Image [img][/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]



Software: Ambiera Light Forum. © 2008-2018 Nikolaus Gebhardt, Ambiera e.U.