what's is the way for onhover showtext and make it glow or onhover show glow png.. for ecery button?
Thanx
Tuur
what's is the way for onhover showtext and make it glow or onhover show glow png.. for ecery button?
Thanx
Tuur
Hi,
No find yet !¡
maybe make the button an movie clip?
can't find in flash the behaviour settings when onover or onclick like here.. it's a button in the propperties
made this 2 years ago as2.. mybe that 's th trick?
when i double click on the button in flash.. i see this on over and so settings but not with the new buttonset..
Job1 will you share just the code of your nice navigation thing (PM?)
or at least tell us how you did the onhover text??
thanx
Tuur
oke next question..
ihave the button set working and i quite understand..
but..
when i go fullscreen with the right mouse click the button doesn't change..
??
partial code:
this.btn_enterfs.addEventListener(MouseEvent.CLICK, fullscreen_clicked);
this.btn_enterfs.addEventListener(MouseEvent.MOUSE_OVER, onhover6);
this.btn_enterfs.addEventListener(MouseEvent.MOUSE_OUT, onout6);
function onhover6(ev:MouseEvent):void
{
this.text_enterfs.visible = true;
}
function onout6(ev:MouseEvent):void
{
this.text_enterfs.visible = false;
}
function fullscreen_clicked(mouseevent:MouseEvent):void
{
if (stage.displayState != StageDisplayState.FULL_SCREEN)
{
stage.displayState = StageDisplayState.FULL_SCREEN;
this.btn_enterfs.visible = false;
this.btn_exitfs.visible = true;
}
else
{
stage.displayState = StageDisplayState.NORMAL;
this.btn_enterfs.visible = true;
this.btn_exitfs.visible = false;
}
}
this.btn_exitfs.addEventListener(MouseEvent.CLICK, normal_clicked);
this.btn_exitfs.addEventListener(MouseEvent.MOUSE_OVER, onhover7);
this.btn_exitfs.addEventListener(MouseEvent.MOUSE_OUT, onout7);
function onhover7(ev:MouseEvent):void
{
this.text_exitfs.visible = true;
}
function onout7(ev:MouseEvent):void
{
this.text_exitfs.visible = false;
}
function normal_clicked(mouseevent:MouseEvent):void
{
if (stage.displayState != StageDisplayState.FULL_SCREEN)
{
stage.displayState = StageDisplayState.FULL_SCREEN;
this.btn_exitfs.visible = true;
this.btn_enterfs.visible = false;
}
else
{
stage.displayState = StageDisplayState.NORMAL;
this.btn_exitfs.visible = false;
this.btn_enterfs.visible = true;
}
}
Alles anzeigen
but with the buttons it works oke..
??
thanx
Tuur
Hi,
you should handle the fullscreen related changes in a seperate fullscreen event,
because when you, for example use the a other way then your button to switch to
fullscreen or back, then the buttons will not be updated,
e.g.
stage.addEventListener(FullScreenEvent.FULL_SCREEN, fullscreen_event);
...
function fullscreen_event (event:FullScreenEvent):void
{
if (event.fullScreen == true)
{
// now being in fullscreen mode
this.btn_enterfs.visible = false;
this.btn_exitfs.visible = true;
}
else
{
// back to window mode
this.btn_enterfs.visible = true;
this.btn_exitfs.visible = false;
}
}
Alles anzeigen
best regards,
Klaus
mmmm..
probably i put it in the wrong place..
suggestions??
this.btn_enterfs.addEventListener(MouseEvent.CLICK, fullscreen_clicked);
this.btn_enterfs.addEventListener(MouseEvent.MOUSE_OVER, onhover6);
this.btn_enterfs.addEventListener(MouseEvent.MOUSE_OUT, onout6);
stage.addEventListener(FullScreenEvent.FULL_SCREEN, fullscreen_event);
function onhover6(ev:MouseEvent):void
{
this.text_enterfs.visible = true;
}
function onout6(ev:MouseEvent):void
{
this.text_enterfs.visible = false;
}
function fullscreen_clicked(mouseevent:MouseEvent):void
{
if (stage.displayState != StageDisplayState.FULL_SCREEN)
{
stage.displayState = StageDisplayState.FULL_SCREEN;
this.btn_enterfs.visible = false;
this.btn_exitfs.visible = true;
}
else
{
stage.displayState = StageDisplayState.NORMAL;
this.btn_enterfs.visible = true;
this.btn_exitfs.visible = false;
}
}
function fullscreen_event (event:FullScreenEvent):void
{
if (event.fullScreen == true)
{
// now being in fullscreen mode
this.btn_enterfs.visible = false;
this.btn_exitfs.visible = true;
}
else
{
// back to window mode
this.btn_enterfs.visible = true;
this.btn_exitfs.visible = false;
}
}
this.btn_exitfs.addEventListener(MouseEvent.CLICK, normal_clicked);
this.btn_exitfs.addEventListener(MouseEvent.MOUSE_OVER, onhover7);
this.btn_exitfs.addEventListener(MouseEvent.MOUSE_OUT, onout7);
function onhover7(ev:MouseEvent):void
{
this.text_exitfs.visible = true;
}
function onout7(ev:MouseEvent):void
{
this.text_exitfs.visible = false;
}
function normal_clicked(mouseevent:MouseEvent):void
{
if (stage.displayState != StageDisplayState.FULL_SCREEN)
{
stage.displayState = StageDisplayState.FULL_SCREEN;
this.btn_exitfs.visible = true;
this.btn_enterfs.visible = false;
}
else
{
stage.displayState = StageDisplayState.NORMAL;
this.btn_exitfs.visible = false;
this.btn_enterfs.visible = true;
}
}
i put the new code in red.. but... it's not working..
any help apreciated
Thanx
Tuur
Hi arthur
not working at home
Hi,
maybe the stage object is not ready,
the other button visibility changing code must be removed,
try that code: (watch the stike-out parts):
this.btn_enterfs.addEventListener(MouseEvent.CLICK, fullscreen_clicked);
this.btn_enterfs.addEventListener(MouseEvent.MOUSE_OVER, onhover6);
this.btn_enterfs.addEventListener(MouseEvent.MOUSE_OUT, onout6);stage.addEventListener(FullScreenEvent.FULL_SCREEN, fullscreen_event);
function onhover6(ev:MouseEvent):void
{
this.text_enterfs.visible = true;
}
function onout6(ev:MouseEvent):void
{
this.text_enterfs.visible = false;
}
function fullscreen_clicked(mouseevent:MouseEvent):void
{
if (stage.displayState != StageDisplayState.FULL_SCREEN)
{
stage.displayState = StageDisplayState.FULL_SCREEN;this.btn_enterfs.visible = false;
this.btn_exitfs.visible = true;
}
else
{
stage.displayState = StageDisplayState.NORMAL;this.btn_enterfs.visible = true;
this.btn_exitfs.visible = false;
}
}
function fullscreen_event (event:FullScreenEvent):void
{
if (event.fullScreen == true)
{
// now being in fullscreen mode
this.btn_enterfs.visible = false;
this.btn_exitfs.visible = true;
}
else
{
// back to window mode
this.btn_enterfs.visible = true;
this.btn_exitfs.visible = false;
}
}
this.btn_exitfs.addEventListener(MouseEvent.CLICK, normal_clicked);
this.btn_exitfs.addEventListener(MouseEvent.MOUSE_OVER, onhover7);
this.btn_exitfs.addEventListener(MouseEvent.MOUSE_OUT, onout7);
function onhover7(ev:MouseEvent):void
{
this.text_exitfs.visible = true;
}
function onout7(ev:MouseEvent):void
{
this.text_exitfs.visible = false;
}
function normal_clicked(mouseevent:MouseEvent):void
{
if (stage.displayState != StageDisplayState.FULL_SCREEN)
{
stage.displayState = StageDisplayState.FULL_SCREEN;this.btn_exitfs.visible = true;
this.btn_enterfs.visible = false;
}
else
{
stage.displayState = StageDisplayState.NORMAL;this.btn_exitfs.visible = false;
this.btn_enterfs.visible = true;
}
}
best regards,
Klaus
MMM
so i did copy that code instead of mine and deleted the striked parts but now also the fullscreen button doesn't work... well.. it works but doesn't change to the exit fullscreen button.. as it did before..
??
what about the stage object?
Tuur
nobody??
Have you find the good code Arthur ?
Hello everybody,
I'm trying to developp too a plugin to creat a menu, and I have one question, anybody can help me??
I want to scale up all the buttons of my menu when the mouse is hover one of these buttons, ans scale down when the mouse is out of the menu...
but I don't know how the code it ? somebody has solution?
I want to creat this effect in as3, cause I know I can creat scale up and down in the xml plugin, but it's not very beautiful...
Tanhs,
AGRID
scaling up an down in xml is the same as in flash. It won't be prettier. Maybe you mean neater, more code optimalized?
import fl.transitions.Tween;
import fl.transitions.easing.*;
import flash.display.*;
yourbtn.addEventListener(MouseEvent.MOUSE_OVER, scaleit);
function scaleit(evt:Event):void
{
var myTweenScaleX:Tween = new Tween(yourbtn, "scaleX", Strong.easeOut, 0, 300, 3, true);
var myTweenScaleY:Tween = new Tween(yourbtn, "scaleY", Strong.easeOut, 0, 300, 3, true);
}
Alles anzeigen
Problem with scaling is, is that flash doesnt scale from the center but from its registerpoint(default = lefttop). To fix this, you either put the mc in an empty mc and offset it with half the width and height in as3. Or if you work with a library with moveclips, you could offset it just by using the transform tool and move the registerpoint. Or you use a better tween class like that off greensock (however it seems that scalefromcenter is a buyable feature).
Ok Zephyr, thanks for your help, I'll try to do it tomorrow...
As you say, I'd try to developp with scaling without results, I hope your code will work!
Oki, that's exactly what I wanted to do... Finaly, I use the Twennlite for my effect!!!
Thk Zephyr,
Have fun with Krpano...
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!