Notifications
Clear all

[Closed] Flash 3d Viewer (using maxscript rendering)

ok thx. sry but i forgot what i did differently. also ok when i viewed the .swf file it showed nothing. why is tht?

1 Reply
(@pjanssen)
Joined: 11 months ago

Posts: 0

I can’t really tell without some more details. Does the .f3dv show anything when you open it in the flash player?

One thing I see that isn’t correct is that you’ve got </body> and </html> twice. I’m not sure if that’s causing the problem though. Try this:

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
 <title>Flash 3d Viewer
 
 <style type="text/css">
 	#container {
 		position: absolute;
 		top:50\%;
 		left:50\%;
 		margin: %CONTAINERMARGINTOP%px 0 0 %CONTAINERMARGINLEFT%px;
 		width:%WIDTH%px;
 		height:%HEIGHT%px;
 	}
 </style>
 
 </head>
 
 <body>
 <div id="container">
 	<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="%WIDTH%" height="%HEIGHT%" id="f3dV" align="middle">
 		<param name="allowScriptAccess" value="sameDomain" />
 		<param name="movie" value="%VIEWERFILE%" />
 		<param name="quality" value="high" />
 		<param name="bgcolor" value="#ffffff" />
 		<embed src="%VIEWERFILE%" quality="high" bgcolor="#ffffff" width="%WIDTH%" height="%HEIGHT%" name="f3dV" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
 	</object>
 </div>
 
 </body>
 </html>

You’ll have to replaced all %WIDTH%, %HEIGHT% and %VIEWERFILE% with the values that apply to your viewer.

Does anyone know how to get the file to work on a website. It works fine on my desktop but when I uploaded the file to mysite it doesn’t appear.

Here is the source code, which I borowed from someones site

<html xmlns=“ http://www.w3.org/1999/xhtml ” xml:lang=“en” lang=“en”>
<head>
<meta http-equiv=“Content-Type” content=“text/html; charset=iso-8859-4” />
<title>mobla</title>
</head>
<body bgcolor=”#ffffff“>
<!–url’s used in the movie–>
<!–text used in the movie–>
<!– saved from url=(0013)about:internet –>
<object classid=“clsid:d27cdb6e-ae6d-11cf-96b8-444553540000” codebase=“ http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0 ” width=“350” height=“384” id=“mobla” align=“middle”>
<param name=“allowScriptAccess” value=“sameDomain” />
<param name=“movie” value=“t_v.swf” /><param name=“quality” value=“high” /><param name=“bgcolor” value=”#ffffff” /><embed src=“t_v.swf
” quality=“high” bgcolor=”#ffffff” width=“350” height=“384” name=“Clickme” align=“middle” allowScriptAccess=“sameDomain” type=“application/x-shockwave-flash” pluginspage=“ http://www.macromedia.com/go/getflashplayer ” />
</object>
</body>
</html>

</body>
</html>

Hey I tried it but it still doesn’t work. I know the code is working because I loaded the second swf with all the frames. Its only the file which loads all the frames and lets you rotate around which doesn’t load. You can view the site if you like www.chrishatfielddesign.com
Im assuming this is how it works because it generates two files.

P.S. Thanks for the help man. Noticed you’ve been really helping people.

Hey,

again I’m not sure if this is causing the problem, but you’ve missed %WIDTH% and %HEIGHT% in the object and embed tag. Oh and I see that I’ve messed up the css style a bit too, so replace this:


 top:50\%;
 left:50\%;
 margin: %CONTAINERMARGINTOP%px 0 0 %CONTAINERMARGINLEFT%px;

by:


 top:50%;
  left:50%;
  margin: -300px 0 0 -400px;

And perhaps an obvious question, but is the .f3dv file in the same folder as the .swf ?

Im seriously about to cry. I’ve tested everything and it wont load. I loaded Pjanssen’s swf files from his site and they work fine. My files work locally but not when loaded to server. If any one can please help feel free. If i cant get it working probably have to switch to Quicktime VR
www.chrishatfielddesign.com

Ok, I figured out the problem. When I render out the Fsdv file to my local space it writes this in the actionscript

var f3dvFile = “C:\Documents and Settings\Chris H\Desktop\Heady.swf”;
f3dv.loadf3dv(f3dvFile);

The problem is when I upload the files to my server it still looks to retrieve the f3dv file from that location.

I used Sothink SWF Decompiler an created a fla file an edited the action script. The problem now is editing the script messes with the rotating of the images. Images rotate widly without prompt from the user.

Is there a way any way I can fix this via the interface in max

Hmm that’s an odd bug that I haven’t seen before. I’ll have to look into where it actually occurs (i.e. in the maxscript part or in the compiler). To do this I’d have to find a day on which I can just focus on doing all the bugfixing for this project, and I’m not sure when this will be exactly. I hope that it will be soon though.

For a quick-fix, you’re saying that editing the f3dvFile variable in flash messes up the frame order?

ps. Sorry for the fact that I haven’t been able to help you on msn, been a bit occupied.

No problem man. I figured you were busy

For a quick-fix, you’re saying that editing the f3dvFile variable in flash messes up the frame order?

Yes. When I export the swf to fla via the decompiler some of the code doesn’t transfer over the only action script the transfers over is what I posted above.

I think I have to go in manually and replace the missing action script on each sprite.

P.S. I’m a bit of a novice

What you could do is download the source (see opening post) and use the viewer fla from that one. Then you can create a viewer swf for each f3dv you make without too much fuss.
I’m not sure how you plan to use it online, but you can actually use one viewer swf for multiple f3dv’s. In the fla you’d just have to remove the first line [i]


var f3dvFile = "%F3DVFILE%";

[/i]Then in your html you pass the variable containing the file you want to load to the viewer:


<PARAM NAME=movie VALUE= "viewer.swf?f3dvFile=yourF3dVFileHere">
<EMBED src="viewer.swf?f3dvFile=yourF3dVFileHere"

This is not the whole part of the html code ofcourse, just the part where the difference is from the normal embed.

Good luck!

Ok I think im brain dead. I tried but no success. Here is my code

<body>
<div id=“container”>
<object classid=“clsid:d27cdb6e-ae6d-11cf-96b8-444553540000” codebase=“ http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0 ” width=“400” height=“300” id=“f3dV” align=“middle”>
<param name=“allowScriptAccess” value=“sameDomain” />

    &lt;param NAME=movie VALUE= "f3dv_stripped.swf?f3dvFile=bumblebee2test.f3dv"&gt;
    &lt;param name="quality" value="high" /&gt;
    &lt;param name="bgcolor" value="#ffffff" /&gt;
    &lt;emed src="f3dv_stripped.swf?f3dvFile=bumblebee2test.f3dv" quality="high" bgcolor="#ffffff" width="400" height="300" name="f3dV" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /&gt;
&lt;/object&gt;

</div>

Page 11 / 16