View Full Version : Plugin actionscript 2.0
shurco2
10-31-2008, 08:48 AM
Hi ...
there is a problem
When I plugin inserted in the code
hotspots.execute ( "loadPano (panoName = panos/test0001 & pan = 0 & tilt = 0 & zoom = 0.80 & panoType = cylinder, 500, none)")
that I was not loaded new panorama
help me ...
I am writing to plug actionscript 2.0
________
Honda CB900F (http://www.cyclechaos.com/wiki/Honda_CB900F)
nidrig
10-31-2008, 09:07 AM
Forget my previous post..
You must retrieve your "pano" object.
var pano:Object;
pano= loaderInfo.loader.pano
hotspots.execute("pano.loadPano(PanoName=..");
hope it helped.
shurco2
10-31-2008, 09:39 AM
ok ...
I past next code
var pano:Object;
pano= loaderInfo.loader.pano;
navig.onRelease = function() {
hotspots.execute("pano.loadPano(pano.swf?xml_file=/flash/g.php?id=2_0_0_sm");
};
but not work :(
________
extreme q vaporizer (http://vaporizers.net/extreme-vaporizer)
Trausti Hraunfjord
10-31-2008, 04:56 PM
Will AS2 work for plugins? FPP is made in AS3, and I was under the impression that only AS3 would work properly?
nidrig
10-31-2008, 05:15 PM
Hi Trausti,
Fpp can load as2 or as1 movies as plugin. It's the backward compatibility between as3 and as2/1.
As long as you're using LocalConnection to communicate between the two movies (plugin-as2 and fpp-as3), there's little trouble. The trick is to make the two AVM (ActionScript Virtual Machines) communicate correctly, as the as2 movies use the AVM1 and as3 the AVM2.
I'm tyring to solve shurco2 problem via pm..
cu
Trausti Hraunfjord
10-31-2008, 06:44 PM
Thanks for the clarification nidrig.
shurco2
11-03-2008, 09:00 AM
I used the code that worked in the design <spot /> but does not work as a plugin :(
//var pano:Object;
function startWatch() {
iid = setInterval(this, "sendQuery", 500);
}
function sendQuery() {
_lc.send(masterSlot,"getParams",["pano.panoName", "pano2.panoName"],slaveSlot,"callback");
}
function changed() {
_cb.focus_mc._visible = 0;
_cb.__dropdown._visible = 0;
if (panoBusy) {
return;
}
panoBusy = true;
loadPano(_cb.getSelectedItem().data);
}
function loadPano(name) {
if (masterSlot != null) {
_lc.send(masterSlot,"execute","loadPano(?panoName="+name+",3000,stripes);");
}
}
var controllerName = "lc_test";
var masterSlot;
var slaveSlot;
var dumpSlot = controllerName+"_dump_"+random(1000000);
var _lc = new LocalConnection();
_lc.allowDomain = function() {
return (true);
};
_lc.connect(dumpSlot);
_lc.onStatus = function(info) {
if (info.level == "error") {
trace("No master connection detected.");
_lc.close();
delete _lc;
}
};
_lc.setSlot = function(slot) {
masterSlot = controllerName+"_master_"+slot;
slaveSlot = controllerName+"_slave_"+slot+"_"+random(1000000);
_lc.close();
_lc.connect(slaveSlot);
trace("set slave: "+slaveSlot);
startWatch();
};
_lc.send(controllerName+"_master_0","getSlot",dumpSlot);
var panoName;
var panoBusy;
var iid;
_lc.callback = function(values) {
panoName = values[1] != null ? (values[1]) : (values[0]);
panoBusy = values[1] != null;
if (panoName != _cb.getSelectedItem().data) {
var _loc2 = _cb.length;
for (var _loc1 = 0; _loc1<_loc2; ++_loc1) {
if (_cb.getItemAt(_loc1).data == panoName) {
_cb.setSelectedIndex(_loc1);
}
}
}
};
focusManager.enabled = false;
focusManager = null;
_cb.tabEnabled = false;
_cb._lockroot = true;
_cb.addEventListener("change",changed);
_root.target_mc._visible = false;
_root.target_mc.autoSize = "center";
_root.target_mc.textWidth = autoSize;
_root.target_mc.swapDepths(1000);
navig.fp_mc.floor1.sm1.onRelease = function() {
_lc.send(masterSlot, "execute", "loadPano(?xml_file=/flash/g.php?id=1_0_0_sm);");
};
navig.fp_mc.floor1.sm2.onRelease = function() {
_lc.send(masterSlot,"execute","loadPano(pano.swf?xml_file=/flash/g.php?id=2_0_0_sm);");
};
________
silver surfer vaporizer (http://vaporizer.org/reviews/silver-surfer)
vBulletin® v3.7.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.