exit button .swf file - actionscript-2

I've been into forums and other sites that have answered this question. They've given this code:
on(release) {
fscommand("quit");
}
but it doesn't work for me. Can anyone help me?

try putting it on a different layer. put something on the layer like a transparent box, or else the frame will be ignored.

on(press)
{fscommand("quit","true");
}

Related

Multiple types of onmouseover="bigImg(this)" one one sheet

I'm such a novice and I'm sure there is a simple solution so I humbly ask for your assistance.
I have a page that has two different types of image buttons; square and rectangle. The 'onmouseover="bigImg(this)"' works great with the square images but when it comes to the rectangular image button, it scrunches it up to try and make a square.
I know that the image size is defined like this:
function bigImg(x) {
x.style.height = "64px";
x.style.width = "64px";
}
function normalImg(x) {
x.style.height = "32px";
x.style.width = "32px";
}
My problem is that it applies to the rectangular image buttons too.
Question: Is there a way to make those "functions" into a class or id where I could specify it on the code...
OR is there a better solution?
I found a sloppy solution where I resize my long button on Photoshop to work with the same heights as the other icons. I set the width = "auto".
If any anyone has a more elegant solution, please, please, please let me know.
Thank you.
As a newbie, I find a lot of answers here. Thank you all for your posts.
On this one, I just showed you all how much of a newbie I am...
BigImg is just a name, not a function. I just changed BigImg to BigButton and I was able to isolate the buttons from everything else.
Hope this helps anyone else that was in my shoe.

How do I zoom out of a specific webpage when using Nightwatch.js?

I am trying to zoom out of my current webpage (not just the css elements) using Nightwatch. I have been trying to use the .keys() method that is already provided in the framework by using
browser.keys([browser.Keys.CONTROL, browser.Keys.SUBTRACT])
and
browser.keys([browser.Keys.CONTROL, browser.Keys.SUBTRACT], browser.Keys.NULL)
as well as
broswer.keys('\ue009', '\ue027')
but nothing seems to be zooming out properly. Am I using the correct syntax or is there another way to zoom out using the keys? Thank you for your help
Instead of:
browser.keys([browser.Keys.CONTROL, browser.Keys.SUBTRACT], browser.Keys.NULL)
try this:
browser.keys([browser.Keys.CONTROL, "browser.Keys.SUBTRACT", browser.Keys.NULL]);
If the above solution doesn't work for someone, you can do this:
browser.execute("document.body.style.zoom='50%'");

Input.GetAxis("Vertical") returns -1 by default in Unity 4.2

I had a code in Unity UnityScript, it was working in the morning, and I did not change anything.
Now I opened Unity again, it asked "do you want to update Unity?" , I say yes, now it is downloading UnitySetup-4.3.1.exe in Chrome. This may be relevant to the issue.
Anyway, now I ran my code, and noticed something unusual.
changed my code to this :
function Update()
{
Debug.Log(Input.GetAxis("Vertical"));
}
it prints -1, although I'm not pressing anything, or none of my keys are stuck.
I tried restarting Unity. Changing my code back and forth, so it "rebuilds" (hopefully) the application. None of them worked. Maybe there is some other way to refresh the project ?
Has anyone faced an issue like this? Any ideas for a solution?
Thanks for any help !
I know this is super old question but the same issue faced me with Unity 5.3.3f1, just navigate to Edit -> Project Settings -> Inputs
You'll find 4 (Array Element) for both "Vertical" & "Horizontal" 2 each, delete the duplicate ones and you're good to go.
This is expected. As per the documentation here:
The value will be in the range -1...1 for keyboard and joystick input.
If the axis is setup to be delta mouse movement, the mouse delta is
multiplied by the axis sensitivity and the range is not -1...1.
Installing the latest version (4.3.1) and restarting Unity solved the issue..

How to resize the element using jsPlumb?

In my application I need to resize the elements. Here I found the perfect example
[http://jsfiddle.net/sporritt/HUKMC/9/][1]
but its not working in my code.
Even when I used the same code without changing it, it didn't work for me.
Any help?
Thank you!
Without posting your code it is difficult to debug. Make sure that the object which is resizable is set with below class:
$('#resizable').addClass('ui-widget-content');

Safari Extension - How to respond to Settings changes?

I'm currently working on an Extension for Safari 5 and I want to run a listener function whenever Settings changes are made. Apple provides an example for that, but it doesn't work for me. I currently have this listener function in my global html file:
function numberChanged()
{
if(event.key == "number")
alert("Number has changed!");
}
safari.self.addEventListener("change", numberChanged, false);
I hope somebody can help me. Does somebody know what I'm doing wrong?
I believe that you need to include ‘event’ as a parameter in your function so it looks like this:
function numberChanged(event)
{
if(event.key == "number")
alert("Number has changed!");
}
however, that said, it’s not working properly for me either (with or without the param), so I might be wrong. Interestingly, every time I change a field or click a button on this stackoverflow form, my alert (similar to yours) IS firing, even though I did not change my setting. totally weird.
update: I got it working, finally. The example that apple provides is just wrong. So there are two parts to the answer. I gave the first part above — you do need to add ‘event’ as a parameter to your function. the second part is that the addeventlistener has to be done on the settings object and not, as apple shows you, using ‘self’ from the global.html page. so the working call would look like this for you:
safari.extension.settings.addEventListener("change",numberChanged,false);