Forums  

Go Back   Forums > Talk > General FPP Discussion

Reply
 
Thread Tools Display Modes
  #1  
Old 01-05-2007, 10:32 AM
geoffreymorelle geoffreymorelle is offline
Junior Member
 
Join Date: Jan 2007
Location: Lille, France
Posts: 20
Downloads: 0
Uploads: 0
Default Flash button not work

Hello i have test to create a flash button to switch in fullscreen mode.

My button is a basic flash animation with 4 states, and no script.

My hotspot code is this

Code:
<?xml version="1.0" ?> 
<hotspots >
<spot id="spot_1" static="1" url="bouton-in.swf" align="lb" staticAlign="lb" staticX="15" staticY="-15" onClick="fullscreen:index.html"/>
</hotspots>
The button is normaly active, but the script not work.

but if a change the button by a simple png file, it's work fine.

do you have an exemple of *.fla file ?


Thanks for your help

-Geo
Reply With Quote
  #2  
Old 01-05-2007, 11:42 AM
geoffreymorelle geoffreymorelle is offline
Junior Member
 
Join Date: Jan 2007
Location: Lille, France
Posts: 20
Downloads: 0
Uploads: 0
Default

I have make another test

the this is the code of the spots.xml
Code:
<?xml version="1.0" ?> 
<hotspots controller="hotspots_lc">
<spot id="spot_1" static="1" url="bouton-in.swf" align="lb" staticAlign="lb" staticX="15" staticY="-15"/>
</hotspots>
ans this is the code of my actions script
Code:
// Use the same name in spots.xml: <hotspots controller="hotspots_lc"> 
// Better use different controller names for different panoramas
var controllerName = "hotspots_lc";

// Master slot name:
var masterSlot:String;

// Slave slot name:
var slaveSlot:String;

// Begin of connection code (better use it as is).
var dumpSlot = controllerName+"_dump_"+random(1000000);
var _lc = new LocalConnection();
_lc.allowDomain = function () {
return true; // allow all connections
}
_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);
// end of connecion code

var panoName:String; // current pano name
var panoBusy:Boolean; // true if panorama is loading or a transition effect is in process
var iid:Number; // interval id

// start watching parameters "panoName" and "panoBusy":
function startWatch () {
iid = setInterval(this, "sendQuery", 500);
}

// send query:
function sendQuery () {
// 3rd argument is array of askable parameters, 4th and 5th are connection name and function to callback
_lc.send(masterSlot, "getParams", ["panoName","panoBusy"], slaveSlot, "callback");
}

// listener function:
_lc.callback = function(values) {
panoName = values[0];
panoBusy = values[1];
};

btnin._visible=false;
btnout.onRelease = function() {
	
	this._visible = false;
	btnin._visible=true;
	_lc.send(masterSlot, "fullscreen", ["-"]);
};
btnin.onRelease = function() {
	
	this._visible = false;
	btnout._visible=true;
	_lc.send(masterSlot, "fullscreen", ["-"]);
};
It's not work Too

thanks for your help

-Geo
Reply With Quote
  #3  
Old 01-05-2007, 12:54 PM
Denis Denis is offline
Site admin
 
Join Date: Nov 2006
Posts: 355
Downloads: 0
Uploads: 0
Default

To make the script work with buttons you should compile this button as AS3 application (use free Flash 9 alpha, for example) http://labs.adobe.com/technologies/flash9as3preview/
I told in Hotspots Review if button is AS1-AS2 application, it blocks all mouse events for the Hotspot renderer.
Second example works ok for me (buttons are changing, functions are calling) except fullscreen mode; Flash Player security prevents the mode switching possible because the time lag between a mouse click and the fullscreen command, you need to call the fullscreen command directly (using Hotspots events) to avoid this bug.
Reply With Quote
  #4  
Old 01-15-2007, 06:02 PM
geoffreymorelle geoffreymorelle is offline
Junior Member
 
Join Date: Jan 2007
Location: Lille, France
Posts: 20
Downloads: 0
Uploads: 0
Default Movie in Movie

Hello,
If i create a simple button to toggle fullscreen mode in AS3
This button is a movie in panorama flash player,

i think i dont want to use Local Connection.
but my question is simple what is the function to be call for send command to switch panorama in fullscreen ?


thanks
Reply With Quote
  #5  
Old 01-16-2007, 08:03 AM
suastegui suastegui is offline
Member
 
Join Date: Dec 2006
Posts: 59
Downloads: 0
Uploads: 0
Default Re: Movie in Movie

Quote:
Originally Posted by geoffreymorelle
Hello,
If i create a simple button to toggle fullscreen mode in AS3
This button is a movie in panorama flash player,

i think i dont want to use Local Connection.
but my question is simple what is the function to be call for send command to switch panorama in fullscreen ?


thanks
Go here: http://www.adobe.com/devnet/flashpla...reen_mode.html
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 06:04 PM.


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