You can use the regex system expressions.
Remove all spaces from string ("\s" matches any whitespace, "g" = global, replaces all occurences):
RegexReplace(TextBox.Text, "\s", "g", "")[/code:2ddr5qdt] Count number of spaces: [code:2ddr5qdt]RegexMatchCount(TextBox.Text, "\s", "g")[/code:2ddr5qdt]
Have you got the color 'Alpha' setting set to 0?
You say your project file has the same info as the xml string in the example. Did you remove the extra quotation marks?
When you load from string the xml is wrapped in double quotes and double quotes inside the xml are escaped with extra double quotes:
"<?xml version=""1.0"" ?> ..."[/code:pwrgjhb8] But in the file you should just have: [code:pwrgjhb8] <?xml version="1.0" ?> ...[/code:pwrgjhb8]
You can use the angle of the wheel to determine which value is at the top.
For a wheel with 4 segments you can take the angle / 90 and round it down to get a value 0, 1, 2, or 3.
floor(angle / 90)[/code:3slveguu] [code:3slveguu]angle 0-90: floor(angle / 90) = 0 angle 90-180: floor(angle / 90) = 1 angle 180-270: floor(angle / 90) = 2 angle 270-360: floor(angle / 90) = 3[/code:3slveguu] If you want the wheel to look like this: [img="https://dl.dropboxusercontent.com/u/8367729/construct/sprites/wheel/wheel_4_segments.png"] Then you need to add 45 degrees to the angle and use modulo 360 to prevent it going above 360. [code:3slveguu]floor(((angle + 45) % 360) / 90)[/code:3slveguu] Generalising that: The value 90 is 360 / number of segments The value 45 is 360 / number of segments / 2 [b]=[/b] 180 / number of segments So the formula for a wheel with any number of segments is: [code:3slveguu]floor(((angle + (180 / numSegments)) % 360) / (360 / numSegments))[/code:3slveguu]
Set the rotate behavior's acceleration to a negative value to make it slow down. And then disable it or set the speed to 0 when the speed is <= 0.
Develop games in your browser. Powerful, performant & highly capable.
Load from WebStorage (on start of layout):
[attachment=0:2bfo3o0x][/attachment:2bfo3o0x]
Save to WebStorage (whenever currentLevel is changed):
[attachment=1:2bfo3o0x][/attachment:2bfo3o0x]
Why do you want to store that variable?
You just need to save the variable to webstorage when it changes and then load it again on start of layout.
But the currentLevel variable in that capx is just used to track the level you're currently playing so that it knows which values to update when you complete the level. It gets set when you click on a level button to start a level. There's no need to save/load it really.
Select the layout in the projects window and then select the event sheet under 'Layout properties'.
I think your main problem is that you haven't set the 'lvl_slct_ly' layout to use the 'lvl_slct_ev' event sheet.
(And then it would be better to use an array instead of havning a global variable for each level. And use multiple instances of one lock sprite instead of duplicating the same sprite many times.)
You're spawning the objects at -256 though, not 0. 774 + 256 isn't a multiple of 9.
The export works correctly with minify off. With minify on I get the same result as you —
http://www.microsoft.com/appliedscience ... ained.aspx
Member since 17 Apr, 2012