Working with buttons
Hello!
import flash.text.TextFormat;
btn2.visible = false;
btn.addEventListener(MouseEvent.CLICK, myClickReaction);
function myClickReaction (e:MouseEvent):void{
trace("I was clicked! myclickreaction");
tekst.text = "This is my text";
btn.visible = false;
btn2.visible = true;
btn2.addEventListener(MouseEvent.CLICK, myClickReaction2);
function myClickReaction2 (e:MouseEvent):void{
trace("I was clicked!myclickreaction2");
tekst.text = "This is my text2";
btn.visible = true;
btn2.visible = false;
This is my code. I have 2 buttons on screen. After clicking btn, btn2 do not show himself. Why?
Thank you!
There is nothing wrong with the code... it works if I test it. Do you see the trace from the line : trace("I was clicked! myclickreaction"); ? Do you get any error messages?
Similar Messages
-
Scroll effect is not working with button
step 01: Make 3 pages (e.g. Home, About and Contact)
step 02: use state 3 individual buttons from widget and link them with pages (home, about and contact pages)
step 03: Try to use scroll effect with individual buttons.
it will not work...
if you first use scroll effect and then link the buttons with pages then the button will not get display on browser.What scroll effect are you using on the buttons?
-
Working with buttons and movies
hi guys, amd fairly new to flash web design and have been
trying to create my portfolio.However, i hv created thumbnails
which i want 2 act as buttons and when click to ,i would like the
main image to appear in the centre with others on the
sides.something similar to the gallery of
http://oviedofoto.com/. However,
i have tried it out a million times and have failed.
Pliz help.thanxTry this tutorial:
http://www.flash-creations.com/notes/dynamic_slidingviewer.php -
Over State and actions not working with buttons in Flash cs4
Hi - I am working on a Flash file and some of the buttons in the document are not working.When I test the movie the hand cursor appears when I hover over the buttons they don't change colour (as specified in the over state) and the actions don't work. Not sure what is going on here as I created other buttons in the same document the same way and they work fine. Thanks in advance.
If you remove the code from the buttons do they react properly to a mouse over interaction?
What is the code that is in place? -
How to work with buttons?
Hi all,
I'm kind of new to Flash so forgive me for my obvious
question...
I created buttons that I would like to assign to some text. I
want the text to apear once the button is been pressed.
I can't really fegure it out, even the manual doesn't seem to
help me.
Any one so nice?1. When you declare the variable inside a function its scope is limited to within that function... meaning it does not exist outside that function.
2. When you are comparing values for equality you use == rather than =
3. The if/else section of code that you show will execute immediately, before any chance of clicking a button happens. You need to contain that code in a function and call that function if you want it to happen after you click the buttons
Try....
var hot:Number;
red_btn.addEventListener(MouseEvent.CLICK, setvar1)
function setvar1(MouseEvent):void
hot=1;
tracePressed();
red2_btn.addEventListener(MouseEvent.CLICK, setvar2)
function setvar2(MouseEvent):void
hot=2;
tracePressed();
red3_btn.addEventListener(MouseEvent.CLICK, setvar3)
function setvar3(MouseEvent):void
hot=3;
tracePressed();
function tracePressed():void {
if(hot==1)
trace("you pressed the first button");
else if(hot==2)
trace("you pressed the second button");
else if(hot==3)
trace("you pressed the third button"); -
firefox 4 came on my computer thru an update. now i do not have my yahoo toolbar that has the refresh button the home button and the other buttons that are on yahoo tool bar. i want to use my yahoo toolbar and it says it isnt compatible with firefox 4... HELP!
fire fox does not have a refesh button it doesnt have a home button so i can access my homepage. i want that backAs Digital Persona have abandoned it, there will be no update to their extension. It may work with the Fingerfox (SE) extension - https://addons.mozilla.org/firefox/addon/fingerfox-se
-
I have created a button (via Content Editor) that uses JavaScript to open the Attachments folder of a list item in the Explorer Window in SharePoint 2010. The purpose is to have drag and drop functionality for each list item, having multiple attachments.
The button works but opens the "Attachments" folder containing all of the other folders for each list item (one folder per item). It seems that when you add an attachment to a list item, SharePoint numbers the folder based on the item's ID. What
I'm trying to do is take the JavaScript I have and have it run when a button is clicked in a custom form. When it runs, I'm trying to get it to open the "specific" folder for the list item. I have had success creating a hyperlink in the list that
does this; however, the link WILL NOT work until I use the Content Editor created button that runs JavaScript, that prompts me to click OK to my profile certificate, and then opens the Attachment folder. After that occurs, I can use my hyperlinks without issue
because I'm no longer prompted to click OK for my cert.
So I'm trying to take the JavaScript I have and place it in a list item form (custom form) and have it run when a form button is clicked. The problem is I have very little knowledge of JavaScript (did I mention little?) and
"don't know how to take the "http:" address I have in the script and append to it the list item ID, according to the record I have open."
So that for any record I open, the script will grab the corresponding record ID (or list item ID) and append it.
Here's the script I'm working with (which I didn't create but am grateful for):
<style>
.httpFolder {behavior:url(#default#httpFolder);}
</style>
<script text = "javascript">
function fnOpenFolderView(){
oDAV.navigateFrame("https://server/collection/site/subsite/Lists/Sublist/Attachments","_self");
</script>
<div id = "oDAV" class = "httpFolder"/>
<input type = "button" value = "Open Attachment Folder" onclick = "fnOpenFolderView()"/>
The above script, in the Content Editor, creates a button that opens the Attachments folder for the corresponding SharePoint list.
JackSki123Hello Thriggle,
Thank you for pointing that out. I appended your "GetUrlKeyValue" to the end and it worked. That said, I noticed it doesn't run as smoothly as when I simply click on the Content Editor button I created that resides on the SharePoint List
ASPX page (not the form). The Content Editor button has the same code, minus the "GetUrlKeyValue". I click it; I get prompted to choose my cert; it opens right up.
Now go to the ASPX Display form where I dump the code in a table cell. Button appears in cell; I click it; wait; wait; I get prompted for cert; it opens. Do I need some sort of "throttle" for the JavaScript? For instance, I thought before running
JavaScript, you reference the library first. This code doesn't do that. I'm wondering if there's something more I need to make this run smoothly. Thank you both for getting me this far.
JackSki123 -
purchased Lion, installed it - once I log in - i get the curtain and message to hold the power button till it shuts down. Worked with the disk repair utility - fixed permissions to hold the power button till it shuts down. Worked with the disk repair utility - fixed permissions - still can't get past the "black curtain of death" any suggestions?
My machine was patched to date 10.x.x. I was lucky to get an internet connection and I selected the option to re-download Lion... its curruently being downloaded. What if that doesn't work?
Any thougths would be appreciated.
JoeAnd you have a workstation? not a notebook.
Usually a driver or hardware, nothing that Disk utility will fix.
You know of course what a Prohititory Sign is?
prohibitory sign, kernel panic
Forum devoted to Lion:
Mac OS X v10.7 Lion Communities
Tips and FAQs
FAQ kernelpanic
Resolving Kernel Panics
Avoiding eliminating Kernel panics
Lion App Compatibility Table - RoaringApps
RoaringApps Mac OS X Lion Application Compatibility
did you make sure your apps, drivers, and hardware support Lion? -
Hi - I created a form in Adobe Livecycle and have a button on it to send the form via email. It worked, but only for those with PC. However, I could not get it to work with Apple loaded with Yosemite even with reader installed . Is there a way i can make it work for apple / Mac? It worked fine on a mac using Mountain Lion and reader
ThanksLiveCycle = XFA forms.
afaik - These cannot be used in Apple OSs.
Be well... -
MobileMe preferences button and menu doesn't work with Firefox 4 on Mac OS X 10.6.6
When I login to my MobileMe account I have two buttons on the top right of the page: Preferences and My Account name.
Both I can select but when I do I cannot press either one of the menu entries that show. So I cannot change anything or create folders in iDisk for instance. All did work on Firefox version 3.6. It also works on Safari.
What settings do I have wrong? I like Firefox more than Safari.
Thanks.
FritsanderYou can install the portable Firefox 3.6.x version to access websites that do not work with Firefox 5+.
*http://www.freesmug.org/portableapps:firefox#toc1
*http://sourceforge.net/projects/osxportableapps/files/Portable%20Firefox%20OS%20X/ -
Email button doesn't work with Adobe Reader, only Acrobat
Hi,
I'm new to Adobe products and don't have much experience. Here's my problem.
I used LiveCycle Designer ES2 to create a fillable PDF form, with an email submit button. (uses mailto: to open users Outlook and attaches the pdf automatically)
The form is viewable by all, but the email button only works if opened with Acrobat.
Is there a way to have this work with Reader? We obviously don't have Acrobat licenses for every user.
Any support or assistance would be greatly appreciated.
ThanksThe problem is deeper than that. It's not reader. Now the same form I was creating in LifeCycle Designer ES2 yesterday, with the actions working perfectly, no longer work. None of the actions are working.
Could it be realted to me trying to set the default version compatibility to Adobe 7. It gave me warnings, so I set it back to 9.
Any help would be appreciated. -
Power button not working with 7.1 update
Power button not working with 7.1 update
I take it your phone was still under warranty then?!
Unfortunately I was not so lucky, and my experience was rather poor service-wise. They're called Apple Geniuses but I beg to differ...
I'm not sure where in the world you are located, but my "experience" involved visiting the Leeds store and confusing everyone with this issue. I can tell you, just by the looks on their faces, they had never been faced with this problem before!
I suggested my phone was rolled back to the version it was previously to establish whether this was the underlying issue. I was asked whether my phone had been backed up and as it had the "genius" proceeded to restore the phone "as it came out of the factory" to quote him.
When this was completed the phone was still doing the same thing and I was advised "the software update must have highlighted a hardware issue." I was told it would have to be physically repaired and was told to have this done by a third party as Apple would charge approximately £160. Incidentally, I work in IT and repair PC's, laptops and mobile devices for a living and made a point of raising that a sleep/wake button ribbon cable for an iPhone 4S can be bought on eBay for as little as £3.00...if indeed it does need replacing, which I suspect it does not.
Anyway, so now I was left with a phone for the rest of the day which was blank and still the problem remained. On the train, on the way home, you can then imagine my disbelief when I actually took the time to look at my phone's configuration and realised that iOS version 7.1 was still installed, so obviously the issue would still remain. So the visit to the "genius bar" was a complete waste of time as I'm still in the very same position, and I still blame the 7.1 update for this...let's home 7.2 is released very shortly and this solves the issue...
I have downloaded the package to roll the version back to 7.0 but I'm a little reluctant to carry this out yet as I would expect Apple to so the issue they have caused. This is NOT hardware related but software.
I seriously think Android is calling me... -
Sharepoint send to button not working with document mode 9
Hi All,
We are using document mode 9 for HTML 5 in the master page but the SharePoint send to button is not working with ie 9.
Can anyone help me to resolve this issue.SharePoint 2010 doesn't use HTML 5, so its possible that the browser is running in quirks mode. Try the default compatibility mode and see if that works for you.
Steven Andrews
SharePoint Business Analyst: LiveNation Entertainment
Blog: baron72.wordpress.com
Twitter: Follow @backpackerd00d
My Wiki Articles:
CodePlex Corner Series
Please remember to mark your question as "answered" if this solves (or helps) your problem. -
I have a submit button that uses the mailto: function to activate the required fields property on a pdf fillable form, but our users would prefer that the form not generate an email. Please let me know what I could replace the mailto: action with so the submit button will only activate the required fields proptery.
Thanks for the help!
Ken K.Whatever is running on the server does not have to be PHP, any mechanism
that can accept a HTTP request can handle your form content. You have a
choice between using the "normal" HTML forms submission format, or you can
submit a FDF or XFDF file to your server. I've used Perl, PHP, Microsoft's
.NET and good old Unix shell scripts to accept and process PDF forms
submissions.
If you don't know how to implement the server portion, you will need to
work with somebody who can do that for you. How this is best done depends
on what server system you are using, and potentially what limitations your
web hosting provider is forcing you to live with.
Karl Heinz Kremer -
Working with two buttons in jsp
hi
My working with jsp's in struts.
I have a jsp with two buttons "Save" and "Delete".
My requirement is, on clicking either the "save button" or "Delete button" in jsp, it should call the corresponding code in the Action class.
wht is the logic required to call the corresponding code in the Action class ?
Thankshi
Thanks nani and jHyena for ur reply , but its not working, can u tell me where i went wrong, how to set them in jsp and action class.
This is my Action class
public class EditUserDetailsAction extends Action {
* Generated Methods
* Method execute
* @param mapping
* @param form
* @param request
* @param response
* @return ActionForward
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws DaoException {
System.out.println("---------------in execute() befor try/catch-----------");
//**************************the problem is here calling in if()/else, how should i call i?**************
if() {
try{
EditUserDetailsForm editUserDetailsForm = (EditUserDetailsForm) form;
System.out.println("------------ execute()-----------------");
DaoImplementer daoImpl = new DaoImplementer();
Integer editUid = (Integer) editUserDetailsForm.getUser_Id();
String editName = (String) editUserDetailsForm.getName();
String editTitle = (String) editUserDetailsForm.getTitle();
String editEmail = (String) editUserDetailsForm.getEmail();
Integer editTelephone = (Integer) editUserDetailsForm.getTelephone();
String editUserName = (String) editUserDetailsForm.getUserName();
String editPassword = (String) editUserDetailsForm.getPassword();
daoImpl.registerUser(editUid, editName, editTitle, editEmail, editTelephone, editUserName, editPassword);
System.out.println("------------sent to model components---------------");
System.out.println("----------forwarding to edituserdetail.jsp----------");
return mapping.findForward("editUserDetails");
catch (Exception e) {
System.out.println("@@@ ---Exception in EditUserDetailsAction class--@@@@");
throw new DaoException("Error adding userDetails: ",e);
return mapping.findForward("addUserDetails");
Here is the jsp
<html:html locale="true">
<head>
<html:base />
<title>editUserDetails.jsp</title>
<script type="text/javascript">
function save_display(){
var x = confirm("Save: Are you sure ?")
if( x == true ){
confirm("Save: OK")
else{
text("Save: Cancelled")
function delete_display(){
var y = confirm("Delete: Are you sure ?")
if( y == true ){
confirm("Delete: OK")
else{
alert("Delete: Cancelled")
function funSave(){
document.form[0].ID.value = id;
form[0].ID.value.action="<%=request.getContextPath()%>/division/editDesignation.app?save=save";
form[0].ID.value.method="post";
form[0].ID.value.submit();
function funDelete(){
function funSave(){
document.form[0].ID.value=id;
form[0].ID.value.action="<%=request.getContextPath()%>.app?save=save";
form[0].ID.value.method="post";
form[0].ID.value.submit();
</script>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<html:javascript formName="editUserDetailsForm"/>
<html:form action="/editUserDetails" onsubmit="return validateEditUserDetailsForm(this);">
user_Id : <html:text property="user_Id"/><html:errors property="user_Id"/><br/>
name : <html:text property="name"/><html:errors property="name"/><br/>
title : <html:text property="title"/><html:errors property="title"/><br/>
telephone : <html:text property="telephone"/><html:errors property="telephone"/><br/>
email : <html:text property="email"/><html:errors property="email"/><br/>
userName : <html:text property="userName"/><html:errors property="userName"/><br/>
password : <html:password property="password"/><html:errors property="password"/><br/>
<html:submit property="save" value="Save" onclick ="funSave()"/>
<html:cancel property="delete" value="delete" onclick="funDelete()"/>
</html:form>
</body>
pls let me know how to set the hidden variables within the above jsp .
and in Action class how to call it.
I would be very thankful to u guys.
Thanks
Maybe you are looking for
-
Error 503 in WEBLogic Server 9.2- Production and Test Environment
Dear All, since a few weeks (after deploy new Version) i got a lot of Error 503 in my Environment. what i can/should do to identify what is wrong to solve the problem. I cannot find Log entries who could explain what is wrong. Have any one any Idea o
-
Iphoto not displaying front cover photos in my book project
After installing iphoto 11 the front cover page in my book project will not display the photos or the text, how ever the text will display if clicked on and then only 1 line at a time. The photos on the other hand will not. When the photo boxes ar
-
Dear All, After Saving the document it is not released and system gives error is as; You have not defined a CO account assignment for an account that is relevant to cost accounting. System response Account 411101 is defined as a cost element. This me
-
Slow performance during Apply Request Values Phase of JSF lifecycle
Dear all, I found that my application is sucked at the Apply Request Values Phase of JSF lifecycle when I submit the page. (Totally spend 1 min to pass this phase) In the application, there is around 300 input fields in the page. Who know how can I e
-
Transform box "jumps away" on mouse click
When I work with many smart object, I often move them around using ctrl-T (Transform tool). But sometimes they're smart objects which almost jump out of the canvas the moment I click on them or when I try to resize the box, it gets squished at the mo