Embed multiple SWF within an external swf using flash CS3

Using Pano2VR/Object2VR SWF files with your own Flash projects
Post Reply
sam1486
Posts: 2
Joined: Tue Jun 21, 2011 7:57 pm

Hi all, new guy to the forum, but not so much to AS3

I am using the trial version of Pano2VR (until I am sure that it will do what I would like it to do) with Flash CS3 (AS 3)
running Vista Ultimate 32

What I am attempting to do is have a swf with a map and buttons that when you click one of the buttons it loads the pano that I have created using the the loader() class the example can be found here http://www.professionalbeachbum.co.uk/V ... ainer.html

as you can see from this - when you click on the "hot spots" on the map the animation comes in just fine and even the skin is loading ok, but the pano is just not showing up - I have seen from thorough seaching of the forum that there have been 2 other instances of this problem, but neither have had any responses so I am hoping by putting all of my source up here that someone will be able to lend a hand

I have spent the whole day looking at global settings and allowing network access, but have not been able to find the right combination and wondered that if even this was that problem

I am having a thought in the back of my mind about the correct referencing for the JS file when I load the external SWF (from Pano2vr)

anyway here is the AS

Code: Select all

import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.transitions.TweenEvent;



var myLoader:Loader = new Loader();
var panoContainer:Array = new Array();
myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,addSWF);
function addSWF(myevent:Event) {
	addChild(myLoader);
	var mycontent:MovieClip=myevent.target.content;
	
	mycontent.x=320;
	mycontent.y=60;
}

panoFrame.alpha = 0 
HS1.addEventListener(MouseEvent.CLICK , playClicked);
function playClicked(event:MouseEvent):void {

	myLoader.load(new URLRequest("Beach/Beachsharpened_out.swf"));
	var frameIn:Tween = new Tween(panoFrame, "alpha", Strong.easeIn,0,1,1,true)
}

HS2.addEventListener(MouseEvent.CLICK,playClicked2)
function playClicked2(event:MouseEvent):void{
	myLoader.load(new URLRequest("Dive Base/dive base_out.swf"))
	var frameIn:Tween = new Tween(panoFrame, "alpha", Strong.easeIn,0,1,1,true)
}

HS3.addEventListener(MouseEvent.CLICK,playClicked3)
function playClicked3(event:MouseEvent):void{
	myLoader.load(new URLRequest("Kids Club/Kids Club_out.swf"))
	var frameIn:Tween = new Tween(panoFrame, "alpha", Strong.easeIn,0,1,1,true)


}
I should add here that when I preview it in CS3 in the SWF mode it works perfectly, but previewing in html it doesn't

thoughts and comments greatly appreciated as have hit a wall and having to occupy my time with thoughts of menu bars, sub navigation and such like........... if you need any more info please ask..

Sam
sam1486
Posts: 2
Joined: Tue Jun 21, 2011 7:57 pm

Hmmmmm I see that a lot of other people are having the same sort of issue..........

I have solved it - but not by any mastery of the AS language it seems that there was a conflict with my version of flash CS3 - not saying that this is all the same problem!

Anyway I have changed to CS4 and bammm! there they were all of my panos and I was able to select them using the buttons I created, loading the SWF's externally into my flash movie - popped it into Expression web and up on the web and all working fine

I know that this is not really a solution, but seeing as noone seems to have an idea it was my last resort and am glad to finally have it work

you can see it if you like http://www.professionalbeachbum.co.uk/V ... lTour.html

if I can help anyone with a project similer to mine let me know and I will try

Good luck
Post Reply