Adobe Dreamweaver Forums



Last 10 THreads :         FireFox displaying Search interface incorrectly (Last Post : kdeuler - Replies : 0 - Views : 1 )           »          Flash Will NOT Install - Tech Note 19166 Didn't Work (Last Post : twitterpated - Replies : 0 - Views : 1 )           »          Adobe Flash 10 kills Wimpy (Last Post : ClubEXL.com - Replies : 33 - Views : 208 )           »          Disabling flash display in Air HTML Component (Last Post : ReisenderJosh - Replies : 0 - Views : 1 )           »          repeated javascript function on same page (Last Post : aonefun - Replies : 0 - Views : 1 )           »          Live stream player (Last Post : noobie_here - Replies : 0 - Views : 1 )           »          cfloop within a cfif tag (Last Post : Azadi - Replies : 2 - Views : 3 )           »          Making constraints on a symbol... (Last Post : sirkibble2 - Replies : 0 - Views : 1 )           »          Creating a boundry in the stage... (Last Post : fazstp - Replies : 2 - Views : 3 )           »          Director or Flash? (Last Post : Sean Wilson - Replies : 1 - Views : 2 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Flex
 
Tags:



Reply
  #1 (permalink)  
Old 08-28-2008, 10:51 AM
edeewan
 
Posts: n/a
Diggs:
Default Browser

Hi All,
I'm new to flex.I have a doubt regarding "How to open the new
browser window when i click on the button r text(like hypherlink in HTML)".Can
u send me the simple example regarding this problem.

I wrote some code but it is not working .Here i'm sending my code can u see
and correct the code.

This is my code :--

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
import flash.external.*;

public function openWindow():void {
var strFunction:String = "openWindow";
var strURL:String = "http://www.cflex.net";
var strCall:String = ExternalInterface.call(strFunction,strURL);
}
</mx:Script>
<mx:Button label="Open Browser Window" click="openWindow()"/>
</mx:Application>

Thanks & Regards
edeewan




Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-28-2008, 03:43 PM
michel_v
 
Posts: n/a
Diggs:
Default Re: Browser

You could use the navigateToURL method from the flash.net package

public function navigateToURL(request:URLRequest, window:String = null):void
Reply With Quote
  #3 (permalink)  
Old 08-28-2008, 06:13 PM
Greg Lafrance
 
Posts: n/a
Diggs:
Default Re: Browser

This code shows how to open a link either in a new window or in the same
window. There are other options, see FB3 help.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
public function openWindow(mode:String):void {
var strURL:String = "http://www.cflex.net";
if(mode == "new"){
navigateToURL(new URLRequest(strURL), "_blank");
}else{
navigateToURL(new URLRequest(strURL), "_self");
}
}
]]>
</mx:Script>
<mx:LinkButton label="Go to CFLEX in New Window (_blank)"
click="openWindow('new')"/>
<mx:LinkButton label="Go to CFLEX in this Window (_self)"
click="openWindow('this')"/>
</mx:Application>

Reply With Quote


  #4 (permalink)  
Old 08-29-2008, 06:42 AM
edeewan
 
Posts: n/a
Diggs:
Default Re: Browser

Hey Greg ,that code (What u have sent) is working fine for "_self,_top,_parent"
but it is not working for "_blank".In my system it is showing error like this
"Change pop-pop blocking settings for this website" in right down corner like
small icon.Here am using Mozilla Firfox.What i have to do tel me Greg.

Thanks & Regards,
edeewan.

Reply With Quote
  #5 (permalink)  
Old 08-29-2008, 06:41 PM
Greg Lafrance
 
Posts: n/a
Diggs:
Default Re: Browser

You probably need to do something in Firefox so popups will not be blocked. I don't use FF.
Reply With Quote
  #6 (permalink)  
Old 08-30-2008, 08:04 AM
edeewan
 
Posts: n/a
Diggs:
Default Re: Browser

Thank you greg.It's working fine.


Thanks & Regards
edeewan.
Reply With Quote


Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 02:45 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk