Ask a Question related to Macromedia Director 3D, Design and Development.
-
Pelleyoo #1
help me with repeat while
Hi!
Shouldn't this work;
repeat while J < 4
t[J] = member("w3d").newTexture("B[J]",#fromCastMember,member("B[J]"))
end repeat
it doesn't
thx
Pelleyoo Guest
-
repeat
I used to play certain games on Shockwave but now when I want to play them it says that I need a media player or a shockwave player. I click to... -
background-repeat: repeat-x in HTML? Please help!
I want to have a "centered page" look full screen...I have made them using layers and CSS but if I need it to work in most browsers how do I do the... -
Repeat Header??
Hi, Can I repeat the datagrid header every X rows??? Regards Eval -
repeat while...
I'm having difficulty with a repeat loop in some movie controls. When I press the rewind button and the movieTime reaches 0, it goes back to the... -
help with 'repeat'- if I need to(?)
Hi, I am using buddy api to get a list of pc drives: set dl = baDiskList(), then I want to see which of the drives is a cd-rom. If I look at the dl... -
tedalde2 #2
Re: help me with repeat while
you'd need to type your string (assuming B[J] is a string...) and increment
your J:
repeat while J < 4
t[J] =
member("w3d").newTexture(string(B[J]),#fromCastMember,member(string(B[J])))
J = J + 1
end repeat
tedalde2 Guest
-
extol #3
Re: help me with repeat while
tedalde2's got it. By puting "B[J]", your making it look for a member named
"B[J]" and make a texture from it called "B[J]". You want it to look for the
actual contents of B[J]....So don't use the quotes.
Also, you can replace your first line with:
repeat with J = 1 to 4
Then you don't have to increment J, it will do it automatically
extol Guest
-
T?rd #4
Re: help me with repeat while
I'm the same person as Pelleyoo, I'm kinda' scytzofrien.
What I want to do is to add a new texture with the name "B1" from the
castmember "B1" and then automaticly create a texture with the name "B2" from
the castmember "B2". and then the same from "B3" and "B4".
What you guys suggested didn't work for this.
Do you have another suggestion for this.
thanks!
T?rd Guest
-
necromanthus #5
Re: help me with repeat while
[q]Originally posted by: T?rd
I'm the same person as Pelleyoo, I'm kinda' scytzofrien.[/q]
Ha ha ha. This was good one !
p.s.
t = []
repeat with j = 1 to 4
t[j] = member("w3d_name").newTexture("B"&j, #fromCastMember, member("B"&j))
end repeat
necromanthus Guest
-
Pelleyoo #6
Re: help me with repeat while
Now im Pelleyoo again. Thank god for that.
Im sorry I have to tell you, nectromantus, that it didn't work. A new texture
aint created..for some reason, B1 becomes an floating number, and the debugger
just says "Void". :/ whats wrong? Do I have to convert it to a string or
something?
Thanks on beforehaqnd
Pelleyoo Guest
-
necromanthus #7
Re: help me with repeat while
[q]Originally posted by: Pelleyoo
Im sorry I have to tell you, nectromantus, that it didn't work. A new texture
aint created..for some reason, B1 becomes an floating number, and the debugger
just says "Void". :/ whats wrong? Do I have to convert it to a string or
something?[/q]
It works fine for me.
You have to launch it on beginSprite(me).
p.s.
Who is nectromantus ?
ha ha ha
necromanthus Guest
-
Pelleyoo #8
Re: help me with repeat while
We did that. Please help, something is cp as we say in sweden...
Pelleyoo Guest
-
necromanthus #9
Re: help me with repeat while
[q]Originally posted by: Pelleyoo
We did that. Please help, something is cp as we say in sweden...[/q]
on beginSprite(me)
t = []
repeat with j = 1 to 4
t[j] = member("w3d_name").newTexture("B"&j, #fromCastMember, member("B"&j))
end repeat
end
Put the above piece of LINGO in a frame script.
That frame must contain the W3D member (as sprite).
And finally, I hope you're a Director MX2004 user ...
necromanthus Guest
-
Pelleyoo #10
Re: help me with repeat while
YES thats exactly what we did. Only sausages can talk, In a world were animals are running anarchy. Peace.
Pelleyoo Guest
-
necromanthus #11
Re: help me with repeat while
[q]Originally posted by: Pelleyoo
YES thats exactly what we did. Only sausages can talk, In a world were animals
are running anarchy. Peace.[/q]
I can't figure out what are you doing wrong there ...
If that place is damned or in case of paranormal activities, you have to work
hard:
global t1,t2,t3,t4
on beginSprite(me)
t1 = member("w3d_name").newTexture("B1", #fromCastMember, member("B1"))
t2 = member("w3d_name").newTexture("B2", #fromCastMember, member("B2"))
t3 = member("w3d_name").newTexture("B3", #fromCastMember, member("B3"))
t4 = member("w3d_name").newTexture("B4", #fromCastMember, member("B4"))
end
I'm going now.
You may rest in peace because for you repeat doesn't exist.
necromanthus Guest
-
-
extol #13
Re: help me with repeat while
Hejsan, Pellyoo. Vilken version om Direktor har du?
extol Guest
-
Pelleyoo #14
Re: help me with repeat while
Director MX 2004 s?klart.
Ass? jag blir s? frustrerad..n?t ?r helt klart mel med necromathus f?rslag.
Det skapas liksom ingen ny textur som heter B1, det enda som h?nder ?r att T1
till T4 blir variablar och B1 till B4 blir variablar, och det st?r bara "void"
p? dom i debuggern. B1 till B4 ska ju inte bli variablar, s? n?t m?ste va fel.
Om du l?ser det h?r, s? kan ja lova dig att du r?ddar min och t?rds kommande
vecka =) Vi har projektarbete i skolan nu och ska va klara med det h?r spelet
p? fredag. Alla smidiga l?sningar beh?vs om vi ska klara det...
Pelleyoo Guest
-
Roofy #15
Re: help me with repeat while
Pelleyoo,
I did not understand your last post considering that I only know english, but
did you resolve this problem yet? If not, then the reason why the code that was
given to you from the other members is becuase part of the reason is from this
line....
repeat with j = 1 to 4
when you do this, the varible j is an integer and not a string, and you cannot
mix integers with a string. Therefore, when you call this...
t[j] = member("w3d_name").newTexture("B"&j, #fromCastMember, member("B"&j))
... you are not getting the correct string because you are mixing a string
with an integer varible j. To properly do this, you need to temporarlly convert
j into a string like so....
on beginSprite
t = []
repeat with j = 1 to 4
t[j] = member("w3d_name").newTexture("B"&string(j), #fromCastMember,
member("B"&string(j)))
end repeat
end beginSprite
... however, I am suppried you did not get a script error when you did it the
way the others told you to do it, or did you get a script error?
Roofy Guest
-
necromanthus #16
Re: help me with repeat while
[q]Originally posted by: Roofy
when you do this, the varible j is an integer and not a string, and you cannot
mix integers with a string. Therefore, when you call this...
t[j] = member("w3d_name").newTexture("B"&j, #fromCastMember, member("B"&j))
... you are not getting the correct string because you are mixing a string
with an integer varible j. [/q]
False !
("B"&j) is always a string !
It doesn't matter if b is an integer or a string.
It's a matter of LINGO parser ...
necromanthus Guest
-
necromanthus #17
Re: help me with repeat while
If Pelleyoo owns Director MX2004, i think his problem is bad names
related.
So ... replace the above script with this one:
on beginSprite(me)
t = []
repeat with j = 1 to 4
t[j] = member("w3d_name").newTexture("tx"&j, #fromCastMember, member("B"&j))
end repeat
end
This method is used in [url]http://necromanthus.com/Games/ShockWave/warcraft.html[/url]
and [url]http://necromanthus.com/Games/ShockWave/quake3.html[/url] ...
necromanthus Guest
-
extol #18
Re: help me with repeat while
Roofy - that makes sense. I know with Actionscript you can put "B" + j and
it will automatically convert J to a string. So I had just assumed that Lingo
did the conversion with "B" & j.
Necromanthus, are you sure you don't have to use String(j)? Because I can't
see any other reason that the code you supplied wouldn't work for Pelleyoo.
extol Guest
-
T?rd #19
Re: help me with repeat while
Hi!
Now I'm T?rd again!
I think we finally found the error in the script.
When we add the overlay, we use this code:
sprite(5).camera.addOverlay(t1, point(220, 220), 0)
But when we create the list it doesn't create the variabels t1, t2 etc.?
What is it we should write instead of "t1" ?
This wouldn't be to hard, right?
T?rd Guest
-
T?rd #20
Re: help me with repeat while
Guys. I wanna thank you with all my heart. it works.
You saved my week
T?rd Guest



Reply With Quote

