How to make a components functions or eventhandlers visible from the outside
Afternoon,
I created a custom component with some public functions called function1, function2 function3 (no real names) my question is I am willing to do the below
< custom: Com1 height = "100%" width = "100%" function1 = "{this.someFunction}" / > "
problem is that the function1 is not visible outside Com1,
My second question is how do I mark my functions as events, so when you look at intellisense they lightning rather than methods I think that the two are closely linked.
few things are more my code for all my components is separated from my mxml via setting one actionscript actionscript for the parent class, and the class extends hbox or application. hope this makes sense, I am a vb developer not an actionscripter, which is probably why I'm doing something obviously wrong...
Thanks in advance for any help
See you soon
Tom.
1. you must tell you all that this component has events
[Event (name = "showPreview", type = "flash.events.Event")]
2 dispatches the event when it comes
private void clickHandler(event:MouseEvent):void
{
var eventObject:Event = new Event ("showPreview");
dispatchEvent (eventObject);
}
3 listen to the event from outside the component
customComponent:Component showPreview = "showPreviewHandler (event)" / > "
4 handle the event.
private void showPreviewHandler(event:Event):void
{
}
Tags: Flex
Similar Questions
-
How to make a gif to a master page from the new Web site?
I need to transform an image in motion in a gif for a Web site.
Use Photoshop to edit images and export to an animated GIF.
See the link below for more details.
How to make a GIF animated in Photoshop [tutorial]
Nancy O.
-
How to call a function inside a canvas from the outside?
Hey,.
I created a HTML5 Canvas animation with animate CC and also added some bootstrap stuff to the HTML document by hand. To animate CC, on the main timeline, I added a function:
this.removeObject = function() {}
Console.log ("withdrawal of object");
// [...]
}
Outside the canvas element, I added a button. When you click on it it must call the function removeObject inside the canvas.
I tried to access by adding a "= window.parent.canvasTimeline;" Variable in the file CC animate, but it does not work.
Is it still possible?
It is of course possible. Just have your code Animate stash a reference to your function in the global scope.
globalMyAnimateRemoveObjectFunction = this.removeObject;
Then you can make globalMyAnimateRemoveObjectFunction() from anywhere in the page.
-
How to make a hollow functions var?
Can someone explain how to make a hollow functions var?
Daniel
Do you mean something like this?
var itemsearchcount = null; previewdata(); nextviewdata(); function previewdata(){ // do something itemsearchcount = 1; return itemsearchcount; }; function nextviewdata(){ // do something more alert(itemsearchcount); };
-
How to make a video DVD of myself I use the webcam for laptop?
How to make a video DVD of myself I use the webcam for laptop? I never did a video before, and I am a teacher who wants to put my sessions on DVD now. How and what do I do?
Thanks in advance.Hi Sdashe,
You need to browse for some third-party applications that could support the web cam video, and you can use windows media center media player to burn DVD.
http://Windows.Microsoft.com/en-us/Windows-Vista/burn-a-CD-or-DVD-in-Windows-Media-Center
http://Windows.Microsoft.com/en-us/Windows-Vista/burn-a-CD-or-DVD-in-Windows-Media-Player
Bindu S - Microsoft Support
Visit our Microsoft answers feedback Forum and let us know what you think -
My panels disappeared. How to make a comeback? (I all checked, including the histogram, layers, actions and adjustments)
Hello madeline,
Please check that you have selected the correct "essentials" workspace, if you already correct then try to restore Photoshop preferences to default.
Steps to follow:
To re-create the Photoshop preferences files, start the application while pressing Ctrl + Alt + Shift (Windows) or command + Option + shift (Mac OS). Then, click Yes to the message, "Delete the Adobe Photoshop settings file?"
Let us know if that helps.
Kind regards
~ Mohit
-
How to make a link in flash from the outside
This is something I have on my todo - or lookinto list if you want - for a long time.
Is it possible for orders to push in a flash from the outside site? For example, navigate a specific image within the flash animation? I don't have a way myself, or seen websites that make this thing yet, butperhaps AS3 will allow this?
Kind regardsOf course you can do that, to implement through the Flash.ExternalInterface class.
See you soon,.
Gorka
www.AquiGorka.com -
Mac 0sx 10.7.3 set updated to OS x Lion 10.7.2
How to remove a free app ' Israel free toolbar' from the toolbar.It sits alone on the toolbar immediately under Bookmark bar.
See:
-
Question
On the right of the adressbox, I always have Yahoo then Google, how can I solve that, I already delete Yahoo from the list in the box search, but every time I start firefox Yahoo is back. Thanks Ron Mijtelen ter, Amsterdam.Hi Ron,
Have you looked at article in the Knowledge Base using the search in Firefox bar? There are lots of good information in there. You happen to have an installed Yahoo! toolbar? You must disable or delete as well if you do. Try to start Firefox in Mode safe mode by holding down the SHIFT key while starting Firefox. If you have any problems using the safe, it's a matter of add-on or extension.
Hope this helps!
-
How can I get my favorites is always visible on the side of the main page of Firefox
How can I get my favorites to be visible all the time on the side of the main page of Firefox? That was the case, then I must have done something to remove it.
View > sidebar, click Favorites to place a check mark.
-
How to create a rule of action to subtract from the Ips event log manager console express?
How to create a rule of action to subtract from the Ips event log manager express console?, some unknown has a guide?
Thank you.
Sent by Cisco Support technique iPad App
Hello
http://www.Cisco.com/en/us/products/sw/secursw/ps2113/products_tech_note09186a0080bc7910.shtml
HTH
Luis Silva
"If you need IDP (planning, design, implementation) assistance do not hesitate to contact us.
-
How to create e-commerce site using adobe muse from the beginning to the end, please
How to create e-commerce site using adobe muse from the beginning to the end, please
Mylenium, why comment you on the forums of Muse? I've never seen a useful comment on these forums. You seem to just upset against Muse all the time.
in any case, definitely go with widgets Ecwid and J-26. They are the best.
-
Followed by my previous inquiry, my hard drive crashed and lost my copy of Acrobat 9 in the installation of the new hard drive. How can I go to re - install Acrobat 9 from the disc, I hold. Thank you, Don Hamilton
Just reinstall from the disc (or download it from https://helpx.adobe.com/acrobat/kb/acrobat-8-9-product-downloads.html) and activate it with your serial number.
If your number of activations exceeds max (2), then you will need to contact customer service.
-
I installed everything according to the recipe. Video Karl Gibson watched this probably five times.
A server
Users have AdobeUpdate.Overwrites file in place
Everyone's updates (couldn't than before by themselves).
How can I easily see that updates are downloaded from the server AUSST instead of directly from Adobe online?
I found this on my own.
The answer lies (on mac) in the/Applications/Utilities/Console
Look in the sidebar to download Adobe
DML.log
Hope this helps someone.
22/06/14 21:32:13:409 | [INFO] | | | | | | | 2867720 | The download file is http://
.local:80/Adobe/updates/oobe/aam20/mac/AdobeExtensionManagerCC-7.0/7.2/setup .dmg -
How can I connect to my webserver VM from the outside?
I'm sure that there is an easy solution for this, but I searched without success.
I run a Web server on FreeBSD in Fusion, and my Mac uses DHCP (static address can come in time).
My VM (fusion 2.0.1) is connected through NAT, I also use my Mac as a local server for testing, but only to listen on 127.0.0.1
Here's my question simply:
My FreeBSD runs Apache and is set up to serve the site (example.com, say) and DNS settings are all up to date. (I know that the BSD Web server works fine because I can connect from Safari using the merger IP address directly).
Now if from the outside (you, for example), type http://example.com/ in your browser, connect to my Mac via port 80 and Apache on my Mac will attempt to server web page. But what I really want, it's demand to go on the virtual machine without going through the Mac. (In analogies, there is a setting that allows some ports go 'on' the virtual machine, but merging doesn't seem to have it - I promise to change the merger, because it works best with FreeBSD).
So in short:
How to configure my machine Virtual Port 80, rather than the Mac doing listening to?
MacGruder says:
So in short: How do I set up my VM to Port 80, rather than the Mac doing listening to?
I introduce it more as a proof of concept, then a full step by step guide because there are many variables and you did not really a complete topology of your local network and other relevant information to be explicit and accurate on a total scope of the project.
Good on my MBP without Apache running in OS X and a Virtual Machine of defined merger on NAT with Apache running on the client, I modified the nat.conf and reset the VMware network and was able to directly access Web Server of the customer from another physical Machine on my local network.
OS X host IP address: 192.168.1.100
Merge comments NAT IP address: 172.16.172.128
Another physical Machine on the LAN IP address: 192.168.1.3
Named Fusion comments: webtest
Installed the Apache server in comments and editing the web page by default so you can be sure I look what I expect to be looking at and not the host content of the Apache server.
Stop and closed Fusion comments
Edited "/ Library/Application Support/VMware Fusion/vmnet8/nat.conf" and added 80 = 172.16.172.128:80
Restarted network VMware with: sudo "/ Library/Application Support/VMware Fusion/boot.sh"-restart
Open fusion and began comments
Editing another physical Machine on the LAN hosts file to add: 192.168.1.100 webtest webtest.com www.webtest.com
Browser open on another physical Machine on LAN and typed http://www.webtest.com
Now, I'm looking at the modified Apache file index.html.en default server prompt so it allows me to know that I can access a Web server on the Guest NATed through the Port 80 of the host of another system other then the host.
Notes:
Personal firewall should of course be properly defined to allow connectivity between the systems.
If you what the outside world can then access if your host doesn't have a static IP address, then you will need to use a form any Dynamic DNS on the host computer.
It is in any case just to let you know it is possible and it's just one of the ways of May to go on this subject and without all the relevant information, I don't have the time to enter in other scenarios.
Hope that helps!
Post edited by: WoodyZ
Added the second - to - restart
Maybe you are looking for
-
I noticed an ad for 'soft idoctor' someone has any pro or Con?
I recently noticed an ad for an application called, "idoctor", all you Pro or cons?
-
After the update to iOS 9.3 push mail works do not under any circumstances
I have an iPhone 6 Plus. I have updated to iOS 9.3 and now none of my email (gmail, work email, outlook.com) push works. I have to go periodically and click on mail and let get it back (as if it was the battery saver mode). I restarted the phone, I
-
Qosmio F50: No installable VirtualPC
Hello again, Guess what I have a new problem with my Qosmio F50/VISTA 32 bit system. I try to use Virtual PC with Win7 to use a mode of VirtualXP, and for this I try to recognize if my cell phone is set up correctly.To do this, I ran the "SecurAble"
-
Acer Aspire R7 stuck in the diagnosis of the PC / had media failure before you start.
I woke up this morning and I saw my Aspire R7 with a black screen. He had the 'boot failure media' text, so I hard it started again with the power button as the keys were not appropriate. The computer has restarted and then wouldn't start, so I cycle
-
Original title: rundll error I get the following error when I turn on my computer. I am running VISTA with service pack 2. C:\Program data\f10a0075-c31f-4c3d - 9 c 66 - 6aa39dd52db1.dat Thanks for the help.