XM Magdalena 3D print, GGeorgy (3D)
LC #42 Pipers Alley

View Full Version : 3d effect/type of viewing

01-18-2004, 01:12 PM
Let me preface this post by saying that I have flash4 and do not use it 'cause my graphic interests are elsewhere...
with that said, here is what I am hoping someone can help me with. I would like to use flash as a type of 3d viewer. What I am looking to do is render a sequence of images (kind of like VR) 30 or so, import them into flash, and be able to export the scene and have the user be able to use their mouse to control viewing the images (either left or right "rotational view") to simulate a 3d viewer. HERE (http://www.rallyaustralia.com/one/index.asp#) is a link to an example of what I am looking to do. You must click on 3D WRC Cars to see exactly to output ( I did PM the artist but never received a response). I admit to being a complete idiot to flash and am just looking for someone have pity and to point me in the right direction and help me with what I assume is a rather easy process. Ultimately, I am looking to avoid spending some serious $$$ on Quest3d. I know the workflow and output would be much better with this but in all honesty, I like the rendered output from my app (LW7.5) and would really like to showcase my work in this fashion. Again I am using Flash4. Thank you for any help.


Ian Jones
01-20-2004, 02:14 AM
It all depends on the movements required. It's easy if you just have say several rings of camera viewpoints. To go right and left is easy, if you go up or down you simply goto the next ring of camera points up or down.

Describe to us exactly what your camera needs to be able to do.

01-20-2004, 11:19 AM
Thanks for the response. I'm not sure I explained myself correctly. I don't have any problem with setting up the cameras in my 3d app and generating a sequence of images... it's when I load the 30 images in Flash, I need to create some kind of action for the mouse so I can export it as a flash movie but you the user, have control of rotating the sequence of images either left or right (just like on the WRC link).

Loading in the sequence and having frames 1 through 30 with the images is no problem. If I test the movie, I get an extremely fast rotation because it's only 30 frames looped. What I want is for the viewer to control movement. I don't need a full-blown VR, just to rotate it on 1 axis.

I'm sure it is a simple task for day in day out users, but as I am still transitioning from traditional art to CG, it's the technical stuff that gets me. Thanks again.


01-24-2004, 02:58 AM
I know exactly what you are talking about and what you want to do. Easiest way to do it is to have a set of invisible buttons (30 of them) covering your flash "stage". Each invisible button would tell a movie clip that has your 30 images which frame to go to. So if you are rolling over the very last invisible button on the left it would show frame 1, and if you moved to the button on the far right it would tell the movieclip to show frame 30. Its actually fairly simple to do. If you need help, I'll put an example together on monday if you can remind me (PM me). I did exactly this a couple years ago with one of my cars but I no longer have that file on my computer.

01-24-2004, 11:06 AM
VWTornado. Hey thanks. that does seem like it will work. If I understand you correctly, there would be 30 buttons that as a whole, cover the entire image from left to right, each directing to the next frame, so that when you move your mouse over the image, it will go to the next frame, right? The only problem I see is the rotation would be limited to 1 direction correct? because you can't have a button assigned to 2 different frames (which would give rotate left and rotate right). But, with that said, I could just as easily accept rotation in 1 direction. Very doable. I did get some help from Nathaniel Bell done in MX (here ( ) but alas, can't justify the upgrade since I have'nt worked in flash since 2000. I would be very grateful to see an example so I'll pm you monday. Thanks again.


Ian Jones
01-24-2004, 03:06 PM
Flash 4... hmmm. I can't remember what its limitations were, but I'll take a look and see what I can do. Btw, you will be able to rotate either direction with VWTornado's method, simply by moving the mouse let or right over the image. I have another method though, which would basically just be a left and right button below the image, which when you roll over say the right one it just advances to the next frame, then the next, then the next etc... at a controlled rate. Move your mouse to the left button and it simply goes backwards in the timeline frame by frame. Very easy to do.

There is another way...where will you be using this flash? in a webpage? because it is possible I could just make a FlashMX movie that dynamically loads any 30 images you render, and uses them for the spin around. Problem is that this way is not as clean and not a 'single package' like a properly published *.swf

01-24-2004, 09:52 PM
yeah the simplest way to do it would be to create two buttons with the action script setup on previous frame for one and next frame for the other.
anothyer way to do it would be to get the position of the mouse and play the flash the movie as well. it mean if the mouse is on the 50% left of the movie, it's going reward and the other 50% is going the other way, of course.
You can find this movie on any flash website and modify it pretty easly for what you wanna do.

btw ... I'm not sure you can do that with flash 4. You'll see.

Good luck !

01-25-2004, 04:12 AM
Ian Jones

Thanks for your suggestions. I'm gonna' give both of them a shot and see what I can work out. I really like the idea of just "splitting" the image(s) with 2 invisible buttons, one for the right and one for the left motion. I am assuming that with this method, I will need to create 2 buttons (with the respective action) for each frame so I can assign each 2 buttons per frame their own individual frames to go to. I hope that I made some sense?

...where will you be using this flash? in a webpage?

I do intend for this to be on a non-flash web page and to be viewed as like a "stand-alone" on any PC. I'd be willing to try your MX solution to see how it goes. Thanks for the offer.

Thanks again for all your ideas and suggestions. I will try to keep my progress up to date to let you know how I am making out.


01-25-2004, 10:38 AM
if you're using Lightwave, you can export your object to a .w3d file (showkwave). and using it in Director. It would be a real 3d opengl "movie" for the web.

01-25-2004, 01:47 PM
francoistarlier- I have looked into that but I did not want to buy Director just for this reason. I'm just trying to get some mileage out of what I have. Worst case scenario for me is that I go ahead and get Quest3d (directx) and get a whole lot more out of it (at least in terms of what I would like to do with it) than I would with Director. The macromedia stuff is cool, but it never really caught-on with me. Thanks again.


Ian Jones
01-26-2004, 04:01 AM
Hi again,

I have made a Flash document for you, I'm not sure if it's compatible with Flash 4... I could only export it as low as version 5. I have emailed you with a link to the file. I have to do it this way because my website isn't working and I have placed it onto one of my clients servers temporarily (Kind of naughty, I know!).

If it opens in version 4, all you need to do is open it up and replace the existing example images I have put there. If you change the number of rendered 3D angles you need to adjust the 'Controller' layer so that it stretches exactly the same length in the timeline.

There's one other thing you need to adjust, there's a layer called 'Set Width' which you need to adjust the actionscript if you change the size of your 3D image. I currently set it for a 320 by 240 image. Simply change the value in the variable 'imagewidth' to the width of your movie. There's a description of what this variable does just above it.

There's an invisible movie clip on the 'Controller' layer which contains the code that runs everything. Take a look if you want, I have placed this movie clip in the top left corner, it will not be visible in the end product.

Everything else runs automatically, simply move your mouse to either half of the image and it will run forwards or backwards. Increase the movie framerate and number of frames if you want a smoother rotation.

01-26-2004, 05:36 AM
Ian Jones, any way I could get a link to this file? I don't know how to make the image rotate the way you are describing. I use Flash MX 2003 so I know it will open for me. Thanks.

The reason I told them to do it the way I did is its really easy to setup, even for a beginner in Flash. :) The only pain in my method is having to make 30 buttons to do it.

01-26-2004, 09:45 AM
Ian Jones - Thanks for your efforts. I'll give it a shot and let you know how it worked. Just got to re-render a test sequence. Accidently deleted them.


1 hour later...

Ian Jones - I downloaded the file you made up. Flash4 won't open it up. I tried a few different ways to bring it in and ultimately it crashed flash. One would think that with an upgraded version, it would be compatible with older versions but I guess thats not the case with flash. Oh well... I want to thank you for giving it a go. I'm still not giving up at this point. I've got some more things to try out. I'll keep chuggin' along with all your suggestions.


Ian Jones
01-26-2004, 11:41 AM
Hey, I'll get you up and running in version 4. The code should be simple to copy paste over and the process is fairly simple so I'll write up a mini tute as soon as I get some time. I can't imagine any problems with my Actionscript from version 5 compatibility to version 4... I don't think I have used anything crazy.

I'll get back to you later.

VWTornado: I have emailed you the link. Go ahead a d-load it. It's compatibile with flash 5 and MX...haven't tested it in 2004 (don't have that yet).

Also on a side note, your method with 30 buttons while simple, is also quite a painful and laborious to do. What you could do is track the mouse across the screen and divide it into 30 sections, when the mouse is in a particular 1/30th of the movie then an equivalent frame is displayed. Once you see how my file qorks you can see that a similar method can be adapted. I may have a go at it just for comparisons sake. Time dependant of course. :)

01-26-2004, 03:28 PM
Originally posted by Ian Jones
VWTornado: Also on a side note, your method with 30 buttons while simple, is also quite a painful and laborious to do. What you could do is track the mouse across the screen and divide it into 30 sections, when the mouse is in a particular 1/30th of the movie then an equivalent frame is displayed. Once you see how my file qorks you can see that a similar method can be adapted. I may have a go at it just for comparisons sake. Time dependant of course. :)

Yeah, i knew my way was a bit tedious but worked better than nothing. :)

Ian Jones
01-28-2004, 03:16 AM
Ok, I have improved my movie to also let you stop the model rotating if you hold the mouse in the middle, so you can stop and view a particular angle for detail. I have made this little area in the middle adjustable, so that you can set the width of it.

Ok here goes... open up Flash 4. You'll need to improvise a little bit because I can't remember exactly how to use flash 4 (eg. applying actions is a little different.

Create 3 layers.

1. This layer is your images layer. Import your first frame of your rendered images, Flash will ask you if this image is part of a sequence then it will automatically place them in the timeline for you.

2. This layer has the code. Create a blank movieclip, goto insert>symbol and select the movieclip option, drag and drop this new movieclip from the library window onto the stage. You can place it anywhere you want because it is invisible to the end user, just make sure you drag it onto the code layer. With the movieclip instance selected, edit its actions and paste in this code:

onClipEvent (load) {

onClipEvent (enterFrame) {
if (_xmouse<x-_root.stopwidth or _xmouse>x+_root.stopwidth) {
if (_xmouse<x) {
if (_root._currentframe<2) {
} else {
} else {
if (_root._currentframe>lastFrame-1) {
} else {
} else {

3. Layer 3 is just for setting and adjusting variables. In the timeline apply an action to frame one. Paste the following code into the actions:

/* The variable 'imagewidth' (see below) should be set to the width of the movie
in pixels. It is then used to divide the image into two halves of mouse control,
left and right half. The variable 'stopwidth' is used to adjust the size of the
area in the middle of the movie which makes the image stop spinning. This value
is in pixels and measures from either side of the middle, eg. 15 left and 15 right.
All the other code is automatic and will adjust if you decide to use more or less
rendered 3D angles. */


I've added comments into that code to help you understand what to edit.

That's all, I hope it works. Let me know if I've missed anything or you need further clarification.

Ian Jones
01-28-2004, 03:33 AM

I stupidly forgot to mention a couple of things.

Here is a link to an example in action, so you can see how it should work: www.users.tpg.com.au/adsl7k7r/spin3d.html

Make sure that the code layer, shown below as 'Controller' is exactly the same length in the timeline as the images layer.


That should be everything.

01-28-2004, 09:01 AM
Ian - Thanks again. Well I did everything as you said and even tried some improvising but with no luck. I think I've hit everything pertaining to the action/command editor that would allow me to type in this code but with no luck. All I kept getting upon exporting the movie and playing it was all the frames zipping by. My time line looked as yours did in the pic with the exception of the "squares" on the last frames of layer 2 and 3. I did not have those but had the two circles (layer3) on both layers upon editing. I don't have anything that would provide those squares in the layers that I am aware of. I'm thinkin' I did or did'nt do something but the way you've streamlined the process, theres not much I could miss. Could it be something different between 4 and 5 or is it me? I think its me but...any thoughts?


Ian Jones
01-29-2004, 03:00 AM
Hmm.. I'm not sure what it is. I'l install Flash 4, I got it lying around somewhere.

Ian Jones
01-29-2004, 03:09 AM
Not sure if I've still got it... can't find it. Flash has really made some leaps and bounds since version 4, but I really don't remember how to do it in 4 anymore. Maybe someone else can help.

01-29-2004, 11:02 AM
Ian- Don't worry about it(lookin' & loadin'). You've already done more than enough to help me with a solution and I am not through yet. I'll keep chuggin' along and try to get back into Flash to a degree and see whats going on and keep messing with the code. Again, I'm not ruling-out "operator error" at this point. I'm sure it's a small oversight on my behalf. I'll keep the tread informed of any positive developments. Thanks for your efforts.


02-15-2004, 04:49 PM
Is there any way you can achieve this in Flash MX 2004? I'm using that at work, and thought I might be able to "dazzle-up" some of our military work as most of it is vector-rendered flat work, kind of boring.

02-15-2004, 04:50 PM
apex, we may very well know each other since i lived in center city for three years. got any updates on this project?

Ian Jones
02-16-2004, 12:11 AM
peachstapler: My method above and the code works for MX 2004.

02-16-2004, 06:46 AM
peachstapler- No, haven't had a chance to really dig into it. I keep getting distracted with other little projects to do for work. I'm still not giving up though... and plan to continue to find a workaround for this using what everyone has provided me with in terms of opinions and info. Just have to focus, sit down and beat the crap out of flash4 'til I get it.
As for philly, don't actually live in the city and work in allentown in a non-cg/art related job on 3rd shift... but I'm workin' on it.


02-16-2004, 10:26 PM
Ok apex,
To relax a bit from my actual work and maybe help you at the same time I made this short tutorial. I made it in MX but I published as Flash Player 4 and it works.

To make it less complicated, this example only runs one way.

So make a MC and put there your car images along the frames, lets say 10. Put a stop(); action on first frame and a gotoAndPlay(1); on the last.

Place this MC in the main timeline and name the instance anim.

Make a new MC with 3 frames. On the first put a stop(); on the second put this:
tellTarget ("/anim") {

On the third put a gotoAndPlay(2)
Place this MC inside the main Timeline and name the instance fwr.

Make a button, a visible one in this case, with an arrow pointing right.

Write this action in it:
on (rollOver) {
tellTarget ("/fwr") {
on (rollOut) {
tellTarget ("/fwr") {

Now test your movie!

I think Im not missing anything but if I am let me know.
I Hope it works!!!
I also hope my English is ok for you.

If you want to increase or reduce the speed of the animation you can change the frames per second rate.

Good Luck!

02-17-2004, 10:51 AM
demarts - Thanks for the tutorial. I will give it a go this weekend. I am a little swamped with other projects. I'l let you know how it worked out. Thanks again.


02-18-2004, 11:38 AM
Hello again apex,

Considering youre using Flash 4 you will probably have to make some changes in the way you write actionscrip.


Instead of:

on (rollOver) {
tellTarget ("/fwr") {


On (rollOver)
Begin Tell Target ("/fwr")
Go to and Play(2)
End Tell Target
End On

Take a look at your flash help for more reference.

CGTalk Moderation
01-17-2006, 05:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.