Stuck again » Insurance » Money Forum

Money Forum

Money Forum



ПоискПоиск   Users   Registration   Entrance
Today: 11.06.2025 - 06:11:00
Pages:  1  

Stuck again

Advertising


MessageAuthor

I've been playing around with this little ditty and I'm stuck. My problem is the loop in the @slider section. As written, if I move the slider the value of scale is recalculated. If I click the graphic button the slider moves but scale is not recalculated. If I move the loop to the @block section everything works like I'd expect. What am I missing here? Code:

---------------------
proper propaganda

BlackM

money-user




Statistics:
Messages: 9
Registration: 03.04.2002
23.03.22 - 18:40:42
Message # 1
RE: Stuck again

@slider is not called when you set a slider programmatically, only when the user moves a slider, or when the slider is automated.

---------------------

umnitza

money-user




Statistics:
Messages: 20,119
Registration: 02.26.2001
23.03.22 - 18:51:27
Message # 2
RE: Stuck again

Well that certainly explains it. Not the behavior I expected (obviously) but I suppose there's a reason for it. I guess I need to sit back and ponder my strategy a bit. Thanks for the info.

---------------------
Paul

Hammm3

money-user




Statistics:
Messages: 651
Registration: 05.18.2001
23.03.22 - 19:01:48
Message # 3
RE: Stuck again

I think I have my code sorted out but now I've hit another road block. Is it possible to modify this in some way to allow it to be included with an import statement? Code:

---------------------
19" HRE 543, Remus Exhaust w/Res Delete, GruppeM CAI, M5 Front Bumper, Xenon Angel Eyes

E39540i6

money-user




Statistics:
Messages: 257
Registration: 09.16.2003
23.03.22 - 19:08:10
Message # 4
RE: Stuck again

As far as I know sliders, filenames etc cannot be imported. I tend to try things out as an "in-line" function first to debug them, just like you have done with the switch() function. When all is OK, you can move the functions into an @init section in a jsfx-inc file. I would add variables for the File numbers in the JS FX: BTN_OFF = 0; BTN_ON = 1; BTN_BG = 2; and use them in the code Most of that gfx section can be made into a function - I would probably use the parameters for the file numbers for flexibility. And there are many variables there that can be made local, to hide them from the main code.

---------------------
///Mello Yello

Jason C SBB

money-user




Statistics:
Messages: 714
Registration: 04.13.2003
23.03.22 - 19:18:56
Message # 5
RE: Stuck again

Thanks for the feedback DarkStar. I did as you suggested and changed the graphics section to a function with local variables. When I use this function inline everything works great, however, when I move the function to a jsfx-inc file I get no graphics display. I commented out the local statement in the function to look at the variables and the inline version looks OK but the import version are all 0. I'm guessing but it looks like the function in the jsfx-inc file is unaware of the .png files. I'll mess around with it some more but I think I may just be trying to do something JS isn't built to do. It's a shame though, it seems like it would really make doing graphics a lot cleaner. Anyway, thanks again for your suggestions. If nothing else I got a little bit closer to finally understanding the local vs. instance thing.

---------------------
2001 Saphire Black M Coupe IE Subframe Bushings, UUC TME Reds, Goodridge SS Brake lines, UUC SS Clutch line, Sport Mode, Strong Strut STB, Toyo T1-R (street) 235/255 Toyo RA-1 (track) 255^2 , Eisenman 76mm Sport Exhaust, TCK D/A 450/500#,TCK CP, 3.46

thebionicman

money-user




Statistics:
Messages: 729
Registration: 12.11.2003
23.03.22 - 19:28:17
Message # 6
RE: Stuck again

You have to keep the filename definitions in the main JS FX file, not put them in the jsfx-inc file (No, I don't like it either). I move a lot of gfx handling out into a function library file.

---------------------

mcornwell

money-user




Statistics:
Messages: 147
Registration: 10.22.2002
23.03.22 - 19:35:35
Message # 7
RE: Stuck again

Well this is embarrassing. The two files I was using to test with were in different directories. The import version was unaware of the .png files because I didn't tell it where in the hell they were. Lesson learned.

---------------------
Estoril/Modena '97 M3...sold for the second time. ------------------------------------ You only live once, and I'm running out of time...

Gene V

money-user




Statistics:
Messages: 4,860
Registration: 02.08.2002
23.03.22 - 19:40:25
Message # 8
RE: Stuck again

that's a neat little gui there. :)

---------------------

billycorgan

money-user




Statistics:
Messages: 85
Registration: 01.05.2003
23.03.22 - 19:44:51
Message # 9
RE: Stuck again

I was trying to come up with a more compact way to display multiple on/off switches. Now I can control up to 16 sliders in the vertical space that 2-3 'regular' sliders would take. I didn't really intend to control it with a slider but the fact that it works with one opens a lot of other possibilities. If my Knobman skills didn't suck so bad I'd put numbers on the buttons and maybe some kind of lighting effect.

---------------------

cohiba

money-user




Statistics:
Messages: 108
Registration: 05.03.2002
23.03.22 - 19:54:50
Message # 10
RE: Stuck again
PTLE Mac -> PTLE Windows conversion questions : Previous topic
Pages:  1  

The administrator has prohibited guests from replying to messages! To register, follow the link: register


Participants