Embed Pano [101]

Hi all!

Patrick suggested posting here, so here I am (jareish on fpp)

I stated a "bug" here http://flashpanoramas.com/forum/showthread.php?t=1550 and patrick said, to fix the problem you have to add this line:

panorama.pano.remove();
panorama.loadPanorama("pano.swf?panoName="+thePanoToLoad);

But where do I put that ;p?

Currently Im building a kind of panorama information portal. where besides a 360 degree image, all kinds of information will be shown. This will be made very adjustable, all things are loaded in flash through embed pano.

ATM It runs on 2 xml files. for fpp and the other containing extra information (text, names of the locations, coordinates of the location on the map etc.) All is generated through xml, so nothing in the library, and as few images as possible. It uses the drawning API of AS3 to create the interface and buttons and textfield etc. And the FPP xml should only be used for hotspots and general stuff, so no buttons.

Alot of it is done, and I'm willing to share. I just need to finish a few things. Things I get stuck at are:
Preloading - preload the xml, map, buttons etc
I like this to fetch an array of images specified, and puts it in the same preloader as FPP. It will first say: Loading interface, and then goes to Loading pano, but only load interface for the first time. Problem lies in fetching the different type of items and unknown amount of it. Someone suggested Google code BulkLoader. I just have to figure out how to use it.

Active states - buttons on the map and navigation should have an active state (and deactivate the rest of the buttons).
Changing FOV on the map.

Tomorrow Ill post some code. That way we can expand it together if you guys would like that. Because its been setup flexible, it would be of benefit to everyone, and maybe stop the flow of questions concerning AS3, embedpano, flash. Perhaps setting up some tutorials. =) All that ofcourse depends on the amino.

Darkgfx wrote: Hi

Darkgfx wrote:

Hi all!

Patrick suggested posting here, so here I am (jareish on fpp)

Hi Darkgfx (Jareish)! Smile

Darkgfx wrote:

I stated a "bug" here http://flashpanoramas.com/forum/showthread.php?t=1550 and patrick said, to fix the problem you have to add this line:

panorama.pano.remove();
panorama.loadPanorama("pano.swf?panoName="+thePanoToLoad);

But where do I put that ;p?

Check the tutorial again... I updated it so that now it:
* Monitors the load progress of panoramas,
* Deactivates (visually) the "view" buttons if a pano is loading,
* Deactivates the FullScreen button if a pano is loading,
* Only loads a new pano (fullscreen or not) if no pano is currently loading

Darkgfx wrote:

Currently Im building a kind of panorama information portal. where besides a 360 degree image, all kinds of information will be shown. This will be made very adjustable, all things are loaded in flash through embed pano.

Sounds great! Just make sure to watch out for the whole qualityMotion/qualityStatic thing; these FPP settings affect Flash's quality setting, which applies to the whole Stage.

Darkgfx wrote:

Problem lies in fetching the different type of items and unknown amount of it. Someone suggested Google code BulkLoader. I just have to figure out how to use it.

Ahh, yes. You might check out the flashpanos.com open source panorama viewer; not as a replacement for FPP (yet! Wink ), but because it does use the BulkLoader. Maybe this will help?

Darkgfx wrote:

Tomorrow Ill post some code. That way we can expand it together if you guys would like that. Because its been setup flexible, it would be of benefit to everyone, and maybe stop the flow of questions concerning AS3, embedpano, flash. Perhaps setting up some tutorials. =) All that ofcourse depends on the amino.

Well, Embed Pano 101 is a good start, I think. Wink Check out the changes I made today, and see how that works for you... But YES, absolutely, code sharing is good and I'd definitely like to see more of what you're working on.

Any time you think you have something that's tutorial worthy, Let me read and comment -- and then I can set you up with permissions to post/edit your own tutorials here!

Cheers!

Patrick

__________________

Patrick Cheatham
FlashPanos.com creator, Panoramic Photographer
Got PanoSalado?

another onload bug

I was mistaken, it isnt the pano that loads double. Its the fact that you have a alpha tween between the pano's. The loadcomplete fires because the pano is loaded, but then it performs a alpha tween between the new and old pano. If you press the button in that tween, it will not remove the old pano, resulting in a pano with half the opacity in the viewer on top the new one (or other way around).

Removing the tween between the pano's is a temporary fix( although I even cant seem to get that to work in AS3 panorama.externals.hotspots.loadPano(["pano.swf?panoName=images/"+thePanoToload], 0, "none" ) doesnt seem to work Help??)

Maybe another timer adding x ms before buttons start to work?

I took a screenshot:

How to create this:
Click button 2, when its almost done loading, 80%+ spammclick on button 3.

In the window of time between the pano 100% being loaded, and the animation between the old and new pano, it will load the thrid pano. the text 100% stays in windows, while a new instance of the percent loaded starts counting.

Error report:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Hotspots/replacePano()
at TransitionEffect/remove()
at TransitionEffect/fadeLoaderAlpha()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()

As3 transistion fix

I found a part of the solution. You have to pass the loadpano query in an array instead of string. iow:

var panoQuery:Array=new Array();
panoQuery.push("panoName=images/"+clickedpano); //the pano to be loaded (you have to define your own)
panoQuery.push("0"); //# ms for the tween
panoQuery.push("none"); //none, stripes, coverDown or fade

panorama.externals.hotspots.loadPano(panoQuery);

Setting the transistion to 0 ms, will only temporary fix the problem. I'm thinking of a way to remove the EventListeners of the buttons after being clicked, and attach them after x ms (so after the transistion between the 2 pano's have passed). I have trouble atm attaching them (because the buttons are created through an array, loaded from a xml file).