Forums  

Go Back   Forums > Talk > General FPP Discussion

Reply
 
Thread Tools Display Modes
  #11  
Old 11-01-2007, 09:42 AM
marktold marktold is offline
Junior Member
 
Join Date: Oct 2007
Posts: 18
Downloads: 0
Uploads: 0
Default

@zleifr

Thanks for your help. I am getting closer to an "ugly" but working example with an external navigation.swf loaded as a plugin.

On thing my debugger tells me that it wants to establish a new connection and fails du too an already open connection.

I guess at some point I have to either close the connection or stop the timer. But I guess I will figure that part out.

All of a suddon my fullscreen just shows black and no image. You fix one thing and break another :-)

Thanks again for your help getting startet.

Regards Markus
Reply With Quote
  #12  
Old 11-24-2007, 10:46 PM
steve steve is offline
Junior Member
 
Join Date: Mar 2007
Location: germany
Posts: 14
Downloads: 2
Uploads: 0
Thumbs up

This tutorial really helped me as a newbie to AS3...Thanks a lot for sharing your code, Jason.


The only thing I had to change was the loadpano command in the transfer function, else my map.swf file didn`t load new panos:

HIS CODE:
function transfer (e:Event) {
if (masterSlot != null) {
_lc.send(masterSlot, "execute", "loadPano(piazza,,none)");
}
}

HAS TO BE:
function transfer (e:Event) {
if (masterSlot != null) {
_lc.send(masterSlot, "execute", "loadPano(?panoName=piazza,,none)");
}
}


The next step: with that tutorial how can I read out wich panoName is loaded? I know there are some threads in the forum but new to AS3 it is just an impossible mission for me...Some code snippets like in this tutorial would be excellent...

Many thanks to Jason

Steve
Reply With Quote
  #13  
Old 11-25-2007, 12:29 AM
zleifr's Avatar
zleifr zleifr is offline
Senior Member
 
Join Date: May 2007
Posts: 609
Downloads: 0
Uploads: 0
Default

This will let you read the panoName:

_lc.send(masterSlot, "getParams", ["pano.panoName"], slaveSlot, "callback");

That is assuming you are using the AS3 controller as the basis for you code. In fact, if you are messing around with actionscript, take a look at the controller code, you will find it very helpful. That line is very slightly modified from controller....
__________________
Zephyr Renner - AdvancedVirtualTours.com - zleifr @t yahoo

Improving the panoramic one mighty fine plug-in at a time: http://www.flashpanos.com
Reply With Quote
  #14  
Old 11-26-2007, 04:57 PM
steve steve is offline
Junior Member
 
Join Date: Mar 2007
Location: germany
Posts: 14
Downloads: 2
Uploads: 0
Default

Thanks to zleifr(one mor time, your`re really very active at this forum and your tips helped me a lot, MY MASTER...)

I tried/worked already with this line, but my map does`t show my current point of view. Here`s what I have:

A external .swf map with three buttons(at the end there will be much more...), named with button_01, button_02...
I can walk from one point to another by clicking on the buttons in my map, based on the tutorial...So far so good.
One keyframe in my fla, here is the relevant code snippets:


var panoName:String; // current pano name
var panoBusy:Boolean; // true if panorama is loading or a transition effect is in process
var timer:Timer; // timer

// start watching parameters "panoName" and "panoBusy":
function startWatch () {
timer = new Timer(500);
timer.addEventListener(TimerEvent.TIMER, sendQuery);
timer.start();
}
// send query:
function sendQuery (event:Event) {
// 3rd argument is array of askable parameters, 4th and 5th are connection name to callback
_lc.send(masterSlot, "getParams", ["pano.panoName","pano2.panoName"], slaveSlot, "callback");
}


Now I want to show the current spot highlighted and the others not:



addEventListener(Event.ENTER_FRAME, onEnterFrame);

function onEnterFrame(event:Event):void
{
if (panoName == "my_pano_01")
{
button_01.alpha = 1;
button_01.alpha = 0.3;
button_01.alpha = 0.3;
}
}

What`s wrong with my code? Any help would be wonderful...
I have looked many hours to the controller code, but didn`t figure it out...

Steve
Reply With Quote
  #15  
Old 11-26-2007, 05:19 PM
zleifr's Avatar
zleifr zleifr is offline
Senior Member
 
Join Date: May 2007
Posts: 609
Downloads: 0
Uploads: 0
Default

I can't begin to tell you how many hours I've stared at the controller code before I got it. The problem with your code is that it still has no idea what panoName is. You have to define panoName in the callback function, which is what fpp calls to respond to your _lc.send(...) statement:

function callback(values) {
// store panoName
panoName = values[1] != null ? values[1] : values[0];
if (panoName == "my_pano_01") {
button_01.alpha = 1;
button_01.alpha = 0.3;
button_01.alpha = 0.3;
}

};
__________________
Zephyr Renner - AdvancedVirtualTours.com - zleifr @t yahoo

Improving the panoramic one mighty fine plug-in at a time: http://www.flashpanos.com
Reply With Quote
  #16  
Old 11-26-2007, 05:52 PM
steve steve is offline
Junior Member
 
Join Date: Mar 2007
Location: germany
Posts: 14
Downloads: 2
Uploads: 0
Smile To My Master...

jepp,jepp,jepp...dancing on my computer...it`s working...CHIEF ZLEIFR...YOU MADE IT...

One point to mention is that if you have stored your panos in a extra folder(panoName=panos/panorama_01) you have also to write the path as a part of the panoName...

Thanks Zleifr for helping and spending time...you get 5 stars from me...Smile
Reply With Quote
  #17  
Old 03-13-2008, 09:23 PM
Dewdan's Avatar
Dewdan Dewdan is offline
Member
 
Join Date: Feb 2008
Posts: 47
Downloads: 0
Uploads: 0
Default This dumb pupil don't get it!

I have follow the entire tutorial, just changes the button names.
In AS3 with flash CS3
Nothing happens, added the <global controller="lc_test"> which I forgot at first.
Nothing happens, renamed the buttons as in the code,
Nothing happens.
Stared at the controler_as3 code
Nothing happens..
Going to sleep ...
Probably tomorrow it will happen
Reply With Quote
  #18  
Old 03-14-2008, 05:29 AM
Joro Joro is offline
Member
 
Join Date: Jan 2008
Posts: 50
Downloads: 0
Uploads: 0
Default

try putting <global LocalconnectionID="lc_test" />
Reply With Quote
  #19  
Old 03-14-2008, 09:18 AM
Dewdan's Avatar
Dewdan Dewdan is offline
Member
 
Join Date: Feb 2008
Posts: 47
Downloads: 0
Uploads: 0
Default

I tried it and nothing happens, and correct me if I'm wrong but LocalConnectionID="lc_test" is for earlier versions of Flash and not compatible with AS3.
I will start allover again, because I have probably forgotten the bloody coma, you know that little think "," that makes us go crazy for days and makes everything go wrong!
Wish me luck.

Last edited by Dewdan; 03-14-2008 at 09:31 AM.
Reply With Quote
  #20  
Old 03-14-2008, 08:17 PM
Dewdan's Avatar
Dewdan Dewdan is offline
Member
 
Join Date: Feb 2008
Posts: 47
Downloads: 0
Uploads: 0
Default missing function :-)

I got it finally working
I was missing the . function callback(values) {}

I am starting to love this pano business!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 10:49 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.