AS3 not working. Need to implement code to lauch viewer's default mail app. Please Help!
Hello,
I'm struggling to work out why; when you click on the "Contact" link/movie clip on my home page, it No Longer launches my Entourage default mail application. The action script is below. I've tried implementing loads of different mailto: as3 codes into my existing code, however none of them seem to be working with my existing code. I'm not an expert coder and could really use some idiot proof instructions/code here, what the code is, where to place it in the existing code and what other buttons/movie clip/instance name I'll need to create? Can anyone help me, Please?
Thank You,
Kavi
import flash.events.Event;
import flash.display.MovieClip;
MASTER CODE:
var k:Loader = new Loader();
k.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop1);
k.contentLoaderInfo.addEventListener(Event.COMPLETE, done1);
k.load(new URLRequest("homeLoad.swf"));
function loop1(e:ProgressEvent):void {
var perc1:Number=e.bytesLoaded/e.bytesTotal;
percent.text=(Math.ceil(perc1*100).toString()) + "%";
function done1(e:Event):void {
//removeChildAt(0);
//percent.x=-1000;
mainHolder.addChild(k);
//k.x = (mainHolder.width - k.width)/2;
//k.y = (mainHolder.height - k.height)/2;
var navigationsArray:Array = [homeLogo_mc.backToHome_mc, home_mc, branding_mc,typography_mc, advertising_mc, logos_mc, videos_mc, profile_mc, contact_mc ];
function addListeners():void
for (var i:uint = 0; i < navigationsArray.length; i++)
navigationsArray[i].buttonMode = true;
navigationsArray[i].mouseChildren = false;
navigationsArray[i].addEventListener(MouseEvent.ROLL_OVER, menuOnHover);
navigationsArray[i].addEventListener(MouseEvent.ROLL_OUT, menuOnMouseOut);
} // end of the for loop
} // end of function addListeners
function menuOnHover(e:Event):void
var targetMC:MovieClip = MovieClip(e.target); //specifies the movieClip clicked
targetMC.gotoAndStop(2); //move to frame 2 which has a light blue text
function menuOnMouseOut(e:Event):void
var targetMC:MovieClip = MovieClip(e.target); //specifies the movieClip clicked
targetMC.gotoAndStop(1); //move to frame 1 which has a white text
// to have the CLICK function, specify each function to each menu
home_mc.addEventListener(MouseEvent.CLICK, homePage);
homeLogo_mc.backToHome_mc.addEventListener(MouseEvent.CLICK, homePage);
function homePage(e:Event):void
trace("home Page");
for (var i:uint = 0; i < navigationsArray.length; i++) //loop to all menus on the array to reset(back to its white text)
navigationsArray[i].gotoAndStop(1); //move all menu to frame 1 which has a white text
navigationsArray[i].addEventListener(MouseEvent.ROLL_OVER, menuOnHover);
navigationsArray[i].addEventListener(MouseEvent.ROLL_OUT, menuOnMouseOut);
home_mc.gotoAndStop(3); //move to frame 3 which has a dark blue text
home_mc.removeEventListener(MouseEvent.ROLL_OVER, menuOnHover);
home_mc.removeEventListener(MouseEvent.ROLL_OUT, menuOnMouseOut);
mainHolder.removeChildAt(0);
percent.x=300;
k.load(new URLRequest("homeLoad.swf"));
SoundMixer.stopAll()
branding_mc.addEventListener(MouseEvent.CLICK, brandingPage);
function brandingPage(e:Event):void
trace("branding Page");
for (var i:uint = 0; i < navigationsArray.length; i++)
navigationsArray[i].gotoAndStop(1);
navigationsArray[i].addEventListener(MouseEvent.ROLL_OVER, menuOnHover);
navigationsArray[i].addEventListener(MouseEvent.ROLL_OUT, menuOnMouseOut);
branding_mc.gotoAndStop(3);
branding_mc.removeEventListener(MouseEvent.ROLL_OVER, menuOnHover);
branding_mc.removeEventListener(MouseEvent.ROLL_OUT, menuOnMouseOut);
mainHolder.removeChildAt(0);
percent.x=300;
k.load(new URLRequest("images.swf"));
SoundMixer.stopAll()
typography_mc.addEventListener(MouseEvent.CLICK, typographyPage);
function typographyPage(e:Event):void
trace("typography Page");
for (var i:uint = 0; i < navigationsArray.length; i++)
navigationsArray[i].gotoAndStop(1);
navigationsArray[i].addEventListener(MouseEvent.ROLL_OVER, menuOnHover);
navigationsArray[i].addEventListener(MouseEvent.ROLL_OUT, menuOnMouseOut);
typography_mc.gotoAndStop(3);
typography_mc.removeEventListener(MouseEvent.ROLL_OVER, menuOnHover);
typography_mc.removeEventListener(MouseEvent.ROLL_OUT, menuOnMouseOut);
mainHolder.removeChildAt(0);
percent.x=300;
k.load(new URLRequest("images1.swf"));
SoundMixer.stopAll()
advertising_mc.addEventListener(MouseEvent.CLICK, advertisingPage);
function advertisingPage(e:Event):void
trace("advertising Page");
for (var i:uint = 0; i < navigationsArray.length; i++)
navigationsArray[i].gotoAndStop(1);
navigationsArray[i].addEventListener(MouseEvent.ROLL_OVER, menuOnHover);
navigationsArray[i].addEventListener(MouseEvent.ROLL_OUT, menuOnMouseOut);
advertising_mc.gotoAndStop(3);
advertising_mc.removeEventListener(MouseEvent.ROLL_OVER, menuOnHover);
advertising_mc.removeEventListener(MouseEvent.ROLL_OUT, menuOnMouseOut);
mainHolder.removeChildAt(0);
percent.x=300;
k.load(new URLRequest("images2.swf"));
SoundMixer.stopAll()
logos_mc.addEventListener(MouseEvent.CLICK, logosPage);
function logosPage(e:Event):void
trace("logos Page");
for (var i:uint = 0; i < navigationsArray.length; i++)
navigationsArray[i].gotoAndStop(1);
navigationsArray[i].addEventListener(MouseEvent.ROLL_OVER, menuOnHover);
navigationsArray[i].addEventListener(MouseEvent.ROLL_OUT, menuOnMouseOut);
logos_mc.gotoAndStop(3);
logos_mc.removeEventListener(MouseEvent.ROLL_OVER, menuOnHover);
logos_mc.removeEventListener(MouseEvent.ROLL_OUT, menuOnMouseOut);
mainHolder.removeChildAt(0);
percent.x=300;
k.load(new URLRequest("images4.swf"));
SoundMixer.stopAll()
videos_mc.addEventListener(MouseEvent.CLICK, videosPage);
function videosPage(e:Event):void
trace("videos Page");
for (var i:uint = 0; i < navigationsArray.length; i++)
navigationsArray[i].gotoAndStop(1);
navigationsArray[i].addEventListener(MouseEvent.ROLL_OVER, menuOnHover);
navigationsArray[i].addEventListener(MouseEvent.ROLL_OUT, menuOnMouseOut);
videos_mc.gotoAndStop(3);
videos_mc.removeEventListener(MouseEvent.ROLL_OVER, menuOnHover);
videos_mc.removeEventListener(MouseEvent.ROLL_OUT, menuOnMouseOut);
mainHolder.removeChildAt(0);
percent.x=300;
k.load(new URLRequest("video.swf"));
SoundMixer.stopAll()
profile_mc.addEventListener(MouseEvent.CLICK, profilePage);
function profilePage(e:Event):void
trace("profile Page");
for (var i:uint = 0; i < navigationsArray.length; i++)
navigationsArray[i].gotoAndStop(1);
navigationsArray[i].addEventListener(MouseEvent.ROLL_OVER, menuOnHover);
navigationsArray[i].addEventListener(MouseEvent.ROLL_OUT, menuOnMouseOut);
profile_mc.gotoAndStop(3);
profile_mc.removeEventListener(MouseEvent.ROLL_OVER, menuOnHover);
profile_mc.removeEventListener(MouseEvent.ROLL_OUT, menuOnMouseOut);
mainHolder.removeChildAt(0);
percent.x=300;
k.load(new URLRequest("images3.swf"));
SoundMixer.stopAll()
contact_mc.addEventListener(MouseEvent.CLICK, contactPage);
function contactPage(e:Event):void
trace("contact Page");
for (var i:uint = 0; i < navigationsArray.length; i++)
navigationsArray[i].gotoAndStop(1);
navigationsArray[i].addEventListener(MouseEvent.ROLL_OVER, menuOnHover);
navigationsArray[i].addEventListener(MouseEvent.ROLL_OUT, menuOnMouseOut);
contact_mc.gotoAndStop(3);
contact_mc.removeEventListener(MouseEvent.ROLL_OVER, menuOnHover);
contact_mc.removeEventListener(MouseEvent.ROLL_OUT, menuOnMouseOut);
mainHolder.removeChildAt(0);
percent.x=300;
k.load(new URLRequest("contact.swf"));
SoundMixer.stopAll()
addListeners(); // call the function addListeners();
Hi Ned,
Thanks for the prompt response and help. This is the mailto code I'm trying to implement into my existing code with no luck:
var linkToEmailAddress:URLRequest = new URLRequest("mailto:[email protected]");
email_btn.addEventListener(MouseEvent.CLICK, emailAddress);
function emailAddress(event:MouseEvent):void
navigateToURL(linkToEmailAddress);
I've changed the "email_btn" to "contact_mc" and tried a bunch of other things too.
Your advice made sense to me so I'll go over it again with a fine comb and see if I can work it out.
Any other tips on how and where to paste the mailto code above would be much appreciated.
If the ball is in my court now, I will keep at it, and hope to get it right.
Thank You,
Kavi
Similar Messages
-
Redemption code from Photoshop Elements 12 purchased from Best Buy does not work 'Oops! This code doesn't seem to be active. Please contact the retailer you purchased the card from, or use a different code.' I have an invoice and the pickup notice from Best Buy. What other information does Best Buy need? What will they do? Will I get a new box? What happened to the days of just typing in a simple s/n?
Redemption Code Help
http://helpx.adobe.com/x-productkb/global/redemption-code-help.html -
my camera on my iPhone 5 is not working it's stuck on the shutter screen what can I do please help!!!!
Basic troubleshooting from the User's Guide is reset, restart, restore (first from backup then as new). Try each of these in order until the issue is resolved.
-
can't sync my ipad with itunes!i deleted "SC info"file and tried but it's not working!!it continously prompts me to authorize my computer!please help me out?
I'm having the same problem with my 4S. I have to constantly reboot my iMac or turn off my phone a few times to get it to sync. Before when I had 5.1.1 everything seemed to work just fine. I'm sure its a bug......
Both my ipads running 5.1.1 have zero issues syncing via wifi or directly plugged in. -
I was recently disconnected from my WIFI and it wont even budge to turn it back on. I tried the troubleshooting and that did not work. Apple won't connect me to tech support and i could really use help. Please.
Select None for payment method > iTunes Store: Changing account information
If None is not available > Why can’t I select None when I edit my payment information?
Yes, you can redeem an iTunes gift card for current purchases.
How to Redeem iTunes Gift Cards and content codes
And you can check the balance of a redeemed card > Account Home - Apple Store -
Why isnt my itouch not connecting to the wifi? everytime I try to connect to a network and i put in the password it says "unable to connect to this network" why isnt working?! the password is correct and everything. I just dont understand why its not working. Someone please help me! thanks
Did it ever work with this WiFi system?
Do other devices work with this WiFi system? -
Using Windows 7 Enterprise 64-bit, Microsoft Virtual WiFi Miniport Adapter shows the "device is not working properly because Windows cannot load the drivers required for this device. (Code 31).".The device is the Apple iMac10,1 All-in-one computer. Right clicking browse files (for the device) shows the Bootcamp (C:), DVD (D:); and my external hard drives can be selected.
Internet and WiFi connections all working ok. Am also running MacDrive 8 to access the Mac drives when in the Windows partition, again without any seeming issues.
Updating the driver simply generates another Code 31 error.
Appreciate this seems to be a known problem - is the a solution a novice use might be able to follow or should I simply ignore the error message?
Driver Date us 21/06/2006 and Driver Version is 6.1.7600.16385.Hi ,
Thank you for visiting the HP Support Forums and Welcome. It is a great site for information and questions. I have looked into your issue about your HP ENVY 4-1204tx Ultrabook and issues with WiFi adapter is not working properly. Error codes in Device Manager in Windows 8.1 could be fixed by deleting any extra drivers. So I would uninstall all that is listed in the Network drivers in the Device Manager, restart the Notebook. Here is a list of Device Manager options, this might help.
Here is a link to the HP Support Assistant if you need it. Just download and run the application and it will help with the software and drivers on your system that need updating or reinstalling. Hope this helps. Thanks. -
i have my serial number. I bought this macbook pro in Cleveland Ohio, and it is still under warranty. Now I am travelling in India and my disk drive is not working. need local help. in chennai. I also need to retriwve my warranty paper online, as I am right now in chennai ad all my docs are in Cleveland.
You posted in the iPad forum instead of the MacBook Pro forum. To get answers to your question, next time post in the proper forum. See https://discussions.apple.com/index.jspa I'll request that Apple relocate your post.
Cheers, Tom -
Derivation Rules Not Working for other company codes
Hi,
I have 5 Company codes and only for one FM was activated. now i want to activate FM for all 5 company codes. for which i have assigned the FM area to all 5 company codes. I have also assigned the derivation strategy to all 5 company codes as well. now when i post a transaction for any other company code derivation rules is not being process hence no commitment item or fund center is derived. however for the original company code for which FM was activated in the first derivation rule are working fine means system is deriving commitment item and fund center. can any one tell me why derivation rules are not working for other company codes? do i have to add Company code in source field of derivation strategy? could this be the reason? because in beginning there was no other company code so we did not included any company code field in the first place.
Regards,Faizan,
Go to Funds Management Government> Actual and Commitment Update/Integration> Activate/Deactivate Funds Management.
In the screen create an entry for each Company Code and Funds Management Area combination.
Activate the AA Derivtn flag if you want the derivation to be called and the Update flag if you want to update commitments and actuals in FM.
Thanks
Shyam -
in app purchase is not working in testing environment in sandbox for the past 5 days. Please anyone know about this issue.
What i did
1 . Added three products more to the existing in-app
2 . Tested with sanbox
i am getting the error "cannot connect to itunes store" with error code "0" when trying to purchase product in sandbox.
Is sandbox is down?Please help guys..Apple's sandbox has been down practically all month. You can check the status here:
http://sandbox.itunes.apple.com -
I have an IPhone operating OS 4.21. I cannot back it up before update and I cannot set up an ICloud account as it needs to be on a version later on the device. Please help, I want to update but not lose everything!
SorchaH wrote:
I receive an error "Itunes cannot back up the IPhone because the back up cannot be saved on the computer".. So I tried to download and log into ICLoud but need to do this from my device..
That would tend to indicate a permissions issues on the computer.
Running an outdated version of iTunes is of absolutely no benefit.
All iDevices work with the current version of iTunes. -
I get this error when I go to imovie, I have instalerat on via appstore, but it does not work.
The QuickTime components necessary to view, edit, import and export varioustypes of films are not installed. The components included in the iMovie installer.Reinstalling iMovie.I get this error when I go to imovie, I have instalerat on via appstore, but it does not work.
The QuickTime components necessary to view, edit, import and export varioustypes of films are not installed. The components included in the iMovie installer.Reinstalling iMovie. -
My o2 email account does not work when sending from my MAC it will accept incoming mail but not send it gives me a message that o2 account (offline) my mac I have no problem with my iPhone or mac laptop. any suggestions please.
Sorry for the delay...
I did what you've told me, new account and manually copied my files from Time Machine. I had lots of permissions problems, but at the end, almost everything is in order... It seems it had to be with some of the Apple Preferences, but I can't be sure, as most of them were dumped to the trash can.
I still don't have my Mail Rules back, unfortunately, although I did goggled some. It is a pity, as I had around 30 or 40 of them, getting my mail in order to each of its mailboxes, but it is a small price as the rest doesn't show the before syntoms.
Thanks for the help, anyway!! -
Hello, my iPod touch is not working right. It says its connected but if I select App Store, safari and other apps that require wifi pops out a note saying either"error loading" or "cannot connect to iTunes Store" and would exit the app automatically. Please help.
Thank You.See:
Can't connect to the iTunes Store -
I need to download all of my photos from my iPhone 4S and my iPad 2 to my MacBook Air because there is no more storage space available. I want to make sure all my photos are not lost and that they do not return to the original devices because of the cloud. Can someone please help ?
Connect your devices to the computer with the USB cable (one device at a time) and import the photos via iPhoto or Image Capture.
If you have not changed any default settings on your computer, iPhoto will automatically launch when you plug in the device. Then follow the import prompts.
Maybe you are looking for
-
System update 5.03 for T520i 4239CTO running windows 7 64-bit does not execute
Hi, I've just installed the latest Lenovo system update software but it does not run properly. I just get the initial popup screen showing the version but nothing else happens. Looking at the event viewer I see an error saying "Retrieved null machine
-
Using Time Machine to back up an external drive?
I have an external HD containing my iTunes library attached to my Airport Extreme Base Station. Is it possible to use Time Machine to back up the AEBS-attached HD onto a different HD? I would connect the new HD directly to my MacBook and in an ideal
-
Project deleted in iPhoto 11 ver. 9.1.1 After spending three months building a twenty six page Book Project in iPhoto i added a page and later decided to delete the page. I selected the page, pressed the delete key and confirmed the delete dialog box
-
Perform a form routine within a sap script form
Hi! How can I perform a form routine within a sap script form. Regards sas
-
In struts we assign the formBean to form in the action class as following; FormBean formBean = (FormBean)form;is it possible to pass formBean as a parameter to another class? if yes, how can that be done?