home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Practical Internet Web Designer 89
/
PIWD89.iso
/
pc
/
CONTENTS
/
FLASH
/
UTILITIES
/
den
/
Flash5
/
3dengine
/
obj2flash.ms
< prev
next >
Wrap
Text File
|
2003-12-02
|
982b
|
44 lines
-- ›ÍÒÔÓÚ ‚Ó Flash v 1.0
-- (Ò) Den Ivanov | Cleopatra Art Group 2001
-- ›ÍÒÔÓÚËÛÂÚ vertex Ë face ‰Îˇ ‚˚‰ÂÎÂÌÌÓ„Ó Ó·¸ÂÍÚ‡
utility bound "Export to Flash"
(
group "Export to Flash" -- ËÌÚÂÙÂÈÒ
(
edittext fname "File:" fieldwidth: 105 text: "C:\\flashdata.txt"
button do_it "Export Now!"
)
on do_it pressed do
(
clearlistener()
deleteFile fname.text
f = createFile fname.text
o = selection as array
for i = 1 to o.count do
(
converttomesh o[i]
-- ‚ÒÂ„Ó ‚¯ËÌ
format "vtotal=%&" o[i].numverts to: f
-- ‚ÒÂ„Ó ÚÂÛ„ÓθÌËÍÓ‚
format "vfaces=%&" o[i].numfaces to: f
-- ‚˚‚Ó‰ ‚¯ËÌ
for j = 1 to o[i].numverts do
(
v = getvert o[i] j
format "vx%=%&vy%=%&vz%=%&" j v.x j v.y j v.z to: f
)
-- ‚˚‚Ó‰ face
for k = 1 to o[i].numfaces do
(
gf = getface o[i] k
fa = gf.x as integer
fb = gf.y as integer
fc = gf.z as integer
format "fa%=%&fb%=%&fc%=%&" k fa k fb k fc to: f
)
format "end=ok&" to: f
close f
)
)
)