Import Pano2VR swf into another swf

Using Pano2VR/Object2VR SWF files with your own Flash projects
Post Reply
darkhorse
Posts: 3
Joined: Thu Oct 21, 2010 4:24 pm

I am creating a CD-ROM projector file from Flash. How do I import the pano so that it doesn't end up right at the front of all my layers? I have a title bar and bottom bar in my swf and when I use the import code supplied here http://gardengnomesoftware.com/forum/vi ... .php?t=788 it does import but it right on top of everything else. is there away i can assign it to the bottom layer of my file?

I'm using AS2 and i'm exporting my pano as Flash 8.

Any help would be appreciated. Cheers
Sebastian
Posts: 209
Joined: Sun Jul 13, 2008 9:08 am
Contact:

You could create empty movie clip using AS MovieClip.createEmptyMovieClip, or create actual movie clip on stage, then load that SWF into that clip. By using AS to create clip holder, you can control the clip's depth, while creating a clip holder on stage, you can use layers to control its depth. If the clip holder is on middle layer, whatever is beneath it, will appear beneath, and whatever is above the clip holder layer, will appear above it upon publish.
darkhorse
Posts: 3
Joined: Thu Oct 21, 2010 4:24 pm

Thanks for your reply Sebastian. can you provide the code for me to do this. I have tried myself but everything i try seems to result in the pano being in front of everything. I need the loader movie clip to be a specific size, is there a way to specify this as part of the code? Cheers
Noisy
Posts: 35
Joined: Wed Apr 04, 2007 12:49 am
Location: Scotland

Hi darkHorse

I'm assuming your title bars etc are created at author time and so already on the stage when you create the vr?

The problem with this is that movieClips created at runtime are held on a seperate stack from those created at author time.

The easiest way round this (if you arn't too comfy with code ) is to create an empty movieclip in your library and then stick it on a layer below your menus etc. give it an instance name and then attach the vr to that rather than to _root.
Sebastian
Posts: 209
Joined: Sun Jul 13, 2008 9:08 am
Contact:

Easiest way to achieve that, as said by darkHorse.

Open your Flash file, hit CTRL+F8 to crate new movie clip. This will create an empty clip. Open library CTRL+L and drag that clip on desired Layer on stage. Select that newly made clip and hit CTRL+F3 to open the property panel, and there ,under INSTANCE NAME, key in some name, let's call it "holder".
The last thing you need is select the frame on which the "holder" is and hit F8 to open action editor, then type AS1 or AS2 syntax, both supported.

loadMovie("panorama.swf", "holder");
or
holder.loadMovie("panorama.swf");

regards
Seba
darkhorse
Posts: 3
Joined: Thu Oct 21, 2010 4:24 pm

thanks very much for all the replys. i got it working! cheers!
MARX
Posts: 2
Joined: Tue Nov 09, 2010 11:26 am

Wouldn't a UI loader work too? You can have complete flash websites inside another flash website, as long as it fits size wise!
stickmancan
Posts: 2
Joined: Thu Jan 27, 2011 10:13 am

For some reason when attempt to use...

test2.loadMovie("ind_com_lgrey_360.swf");

...the swf does not Pano2VR generated swf does not load in. But if I change the target to another swf created in flash it does work. Is there something in publishing settings or anywhere that I need to address in order for Pano2VR swfs to load into my swf?

Thanks,

Jim
Sebastian
Posts: 209
Joined: Sun Jul 13, 2008 9:08 am
Contact:

Hi Jim

Keep in mind, you can load older version file to newer version files but not the other way around. AS1 or AS2 can't load file written in AS3, but AS3 can load any AS3 or older file. Perhaps that's the issue.

Another problem could be that none Pano2VR file has some movie clips and action script in it, which prevents it from running. I don't want to over complicate that for you, but in short, Flash runs multiple timelines hierarchy. The main timeline and movie clips. Some of the actions are confined (hard coded) to specific time line (_root) and once the file is loaded into another file, the entire structure changes and all the references loose their respective targets.

Simple example, you have movie clip test2 in which you load ind_com_Igrey_360.swf. In that swf file you have an action like _root.someMC.play(); The moment you load that SWF into test2 , the clip reference changes to _root.test2.someMC. Hence properties, variables and other actions will immediately malfunction, unable to find their targets. There are way to make that flexible so content works regardless where it is loaded, but that's in the hands of the author or application which generates the other swf file for you.

I hope I didn't over complicated things with my answer. I try to explain the dynamics so you at least know what to look for if you have access to source files to alter them accordingly.

regards
Sebastian
Post Reply