AS3 navigateToURL() v QNXStageWebView

I want to send a user to an external webpage for my application, can I use / rely on the AS3 navigateToURL to open the native or what browser should I use QNXStageWebView in my application?

:-)

Able to identify an Adobe platform evangelist tonight, apparently using navigateToURL() is supposed to work to launch a URL on the native browser, but until the browser is in the Simulator, nothing has been officially confirmed to Adobe (or they are just to play safe and do not give a clear answer:-P)

:-(

Tags: BlackBerry Developers

Similar Questions

  • function javascript with navigateToURL call

    In AS2 I could call a JavaScript pop up flash with the geturl function. But it does not work with AS3 navigateToURL. Here is my code:

    var UrlRequest:URLRequest = new URLRequest ("javascript:MM_openBrWindow (' http://www.djgecko.com/mp3/17_ice_hopper.mp3 ',' DJGecko ',' high =' + ((screen.availHeight/2)-(200/2)) +", left ="+ ((screen.availWidth/2)-(400/2)) + ', status = yes, resizable = yes, width = 400, height = 200') '");

    navigateToURL (UrlRequest);


    And here's my javascript code:

    < script language = "JavaScript" type = "text/JavaScript" >
    <!--
    function MM_openBrWindow (theURL, winName, features) {//v2.0
    Window.Open (Theurl, winName, Features);
    }
    ->
    < /script >

    When I paste the url string in my browser popup works. When I test the swf file in the Flash application, it opens a browser window and try to run the function, but of course, this does not work. When I open the .swf in a browser, embedded in the page with the javascript function, it nothing happens. Can anyone help?

    Thank you!

    Stressing the navigateToURL _self has solved the problem.

    ex:

    navigateToURL (UrlRequest, "_self");

  • [URGENT] Problems of compatibility in Flash Professional CS6

    Hello

    I can't add a clickable URL in my Flash banner advertising. It is created in old Flash Player 9 and ActionScript 1.0 and is having so many problems of compatibility throughout the project. I saw a lot of videos, but I still do something wrong, is there anyone any direction can point to where all the latest flash tutorials are to learn the basics. I just read the "creation of first FLA" file - it's been a dozen years that I used Flash and I'm not worried about it, file is created and all - in general I just change little things like the URL and text and images, perhaps in the future a little more animation but as now I just need this URL thing sorted. I see the getURL function is no longer available and navigateToURL is a job, but still, I'm having some trouble. Let me know if you guys can point me in any direction to learn the basics of it where I can understand it on my own or if someone can help me. Willing to share the FLA file if they want to study or anything at all.

    Thank you.

    The first thing you need to do is to post in the appropriate forum.  This is the forum of the Actionscript 3.  Since you say that your file is an AS1 file, you should post in this forum.  Here is a link for him:

    http://forums.Adobe.com/community/Flash/flash_actionscript?view=discussions

    When you post in this forum, show the code (getURL) that you use.

    If you intend to modify this file to a design of the AS3, then continue with this announcement and make sure that you change the settings of publication to agree.  Follow-up by displaying the AS3 (navigateToURL) code that does not work for you.

  • getURL to send the message to the Director does not work

    Hello:

    I work with Flash CS5.5 and I need to send data to the Director. I used this command before getURL ("lingo: sprite (15) .visible = TRUE'");

    but now does not work.

    Can you tell me, please, how I can send and retrieve data from Flash CS5.5 and vice versa?

    Thank you very much

    If you try to use AS3, navigateToURL is the substitute of AS2 getURL.  Find it in the help documentation to see how to use it.

  • Button Flash CS3 Pro problem

    Hello

    I am creating a flash animation where if someone clicks on one of the photos in the film, it will go to this product. I've played everywhere to try to create this as a button which will goto the URL when clicked.

    I tried in AS2 and AS3 and just can't get to work. Can someone give me a quick glance at the way in which the code should work? AS2 is nice if it's easier.

    I rely mainly on Google and the help documentation of Flash for all my reference needs.  I normally do not teach anything, just trying to help people learn how to learn.

    I recommend stick you with AS3 - don't forget to set your parameters of publication for her.  AS3 provides better error handling, such as if your code is wrong, he will say.  AS2 more often leaves you staring at an empty result with nothing to indicate why.

    ActionScript is best placed on a layer of his own... If for nothing else, for the sake of visibility and as a matter of administrative order.  In general, the code just needs to exist in the same frame as the objects, it is trying to target, but not the same layer.

    Instance names are assigned to objects on the stage, not in the library... the name of the instance is assigned by selecting the object on the stage and by entering its name in the properties panel where it says .

    I don't know any tutorials for something this basic.  Try Googling "AS3 navigateToURL tutorial" and other terms with respect to your need to see if you can find something to help you over the hump.

  • Navigate to a Web page from the pictures stored outside

    I have a flash piece that chages just the image displayed on the screen. The images are stored extrenally if I can easily change out them occasionally.  It is possible to navigate to a web page, if you click on an image? If so, how is that contradict or you can direct me to where I can find how to do this? Sorry, if this is a basic question, I'm kinda a rookie.

    Thanks for your help.

    Kate

    Your stupid bet is to place the image into a movieclip and affect the code by clicking on to the movieclip.  The code you assign depends on what version of Actionscript, you use.  So depending on who it is, try searching Google is:

    «getURL AS2»

    or

    "AS3 navigateToURL.

    and you can try adding "tutorial at one of these institutions.  They can meet in the Flash help documents if you look here, perhaps with a few examples.

  • Go to a new Web page by clicking on a button

    I watched and listened to almost all of the tutorials online, but can't find the place where:

    When you click on a button or dropdown menu item - how to get it to you take to the (appropriate) next page.

    for example, click on Contact - should go to the contact page.

    What happens / where should I be looking for or asking (i.e. a code goandGet?) to do this?

    Forrest

    AS2: getURL()

    AS3: navigateToURL()

  • NavigatetoURL AS3 question

    I have a Flash presentation that has links that open external files (PDF format) my question, is possible to open multiple PDF files in one click? As pdf opening1.pdf 3. 2 at the same time?

    I tried this below links to a .pdf file and a powerpoint, separated by a comma and it doesn't

    App1.addEventListener (MouseEvent.CLICK, fl_MouseClickHandler);

    function fl_MouseClickHandler(event:MouseEvent):void

    {

    trace ("mouse clicked");

    navigateToURL (new URLRequest ("FinalAppendices/Appendix1OPT.pdf,FinalAppendices/AMPLAppendix3.ppt"), '_blank');

    }

    use:

    App1.addEventListener (MouseEvent.CLICK, fl_MouseClickHandler);

    function fl_MouseClickHandler(event:MouseEvent):void

    {

    trace ("mouse clicked");

    navigateToURL (new URLRequest("FinalAppendices/AMPLAppendix3.ppt"), "_blank");

    navigateToURL (new URLRequest ("FinalAppendices/Appendix1OPT.pdf", "_blank");

    }

  • navigateToURL anchor named #anchor problem in AS3

    I created a SWF file with navigateToURL (http://anysite.com/this.html#4, "_blank").  The link works fine even if I'm in the Flash environment only.  When I embad the SWF in a HTML file and call the link, the address shows http://anysite.com/this.html bar I lose the anchor named #4.

    I already have the "Flash with anchor named" HTML template in publication settings.

    Any suggestions?

    Your code should be:

    navigateToURL (new URLRequest ("http://anysite.com/this.html#4"), "_blank");

    I tried this and it works fine on chrome and IE7

    PSIF it works please mark the post as answered.

  • Question by QNXStageWebView: "browser can not handle web page.

    Has anyone seen this behavior before / can anyone suggest a remedy.

    An HTML page I show in a QNXStageWebView component (with all the properties to values by default, for example, allow JavaScript, allow plugins, etc.) has a link to this URL:

    http://appworld.BlackBerry.com/WebStore/content/41285/

    Click on the link leads to failure. IIRC, I saw both of these messages in the exception dialog boxes:

    "The browser can not handle web page.

    and

    (something like) "Unknown protocol".

    This behavior occurs in both debug and release build (OS 2.0.1.358) and works very well in a regular web browser.

    Hello

    I just revisited this question yesterda. take a look at QNXStageWebView HTML API documentation, I noticed the unknownProtocol event and implementation of the following (check my particular URL of interest not shown):

        private function onUnknownProtocol(event:UnknownProtocolEvent):void
        {
            _webView.stop();
            event.preventDefault();
            flash.net.navigateToURL(new URLRequest(event.url));
        }
    

    That does the trick.

  • Something like a universal clickTAG code to AS3?

    Hello! I got this code from my client to use for a campaign in a set of banners:

    (release) / / universal "clickTAG"

    {

    If ("clickTAG"! = null) {getURL (ClickTag, "_blank") ;}}

    ElseIf ("clickTAG"! = null) {getURL (clickTAG, "_blank") ;}}

    ElseIf ("clickTAG"! = null) {getURL (clicktag, "_blank") ;}}

    ElseIf (_root.link1! = null) {getURL (_root.link1, "_blank") ;}}

    ElseIf (_root.clickTAG! = null) {getURL (_root.clickTAG, "_blank") ;}}

    }

    It is AS2, and I don't know if it works, but as they gave it to me, should be. Question - is there a similar AS3 version out there? Since I'm on Flash Professional CC.

    I tried something like this:

    () Link.addEventListener

    MouseEvent.CLICK,

    function (): void {}

    If (root.loaderInfo.parameters.clickTAG.substr (0,5) == "http:") {}

    navigateToURL)

    URLRequest (root.loaderInfo.parameters.clickTAG) news, "_blank".

    );

    }

    ElseIf (root.loaderInfo.parameters.clickTag.substr (0,5) == "http:") {}

    navigateToURL)

    URLRequest (root.loaderInfo.parameters.clickTag) news, "_blank".

    );

    }

    ElseIf (root.loaderInfo.parameters.clicktag.substr (0,5) == "http:") {}

    navigateToURL)

    URLRequest (root.loaderInfo.parameters.clicktag) news, "_blank".

    );

    }

    ElseIf (root.loaderInfo.parameters._root.link1.substr (0,5) == "http:") {}

    navigateToURL)

    URLRequest (root.loaderInfo.parameters._root.link1) news, "_blank".

    );

    }

    ElseIf (root.loaderInfo.parameters.ClickTag.substr (0,5) == "http:") {}

    navigateToURL)

    URLRequest (root.loaderInfo.parameters.ClickTag) news, "_blank".

    );

    }

    ElseIf (root.loaderInfo.parameters._root.clickTAG.substr (0,5) == "http:") {}

    navigateToURL)

    URLRequest (root.loaderInfo.parameters._root.clickTAG) news, "_blank".

    );

    }

    }

    );

    But no luck, it was running only the first version of "clickTAG". Any help is appreciated.

    You get a substring of an object that doesn't exist may not. Try to take the substr pieces.

  • Ayuda con as3

    That tal buenas tardes:

    Quisiera pedir knew apoyo, con el end than me help.

    Estoy tratando hacer una botonera in as3 para a project that me order, his co-production los botones y el text that will en los botones, don't sin embargo was the hora of ponerles los links, estos no how.

    El código Québec he hecho es el siguiente:

    var nombresBotones:Array = new Array ("GOOGLE", "YAHOO", "HOTMAIL", 'INTERC', 'CRISTALAB');

    var direccionesWeb:Array = new Array ('','http://www.yahoo.com.mx','http://www.hotmail.com','http://www.intercambiosvirtuales.org','http://www.cristalab.comhttp://www.google.com.mx' ");

    for (var i = 0; i < 5; i ++) {}

    var button: Sprite = new Sprite();

    button.graphics.beginFill (0xff0066, 0.5);

    button.graphics.drawRect (0, 0, 70, 25);

    button.graphics.endFill ();

    Button.x = i * 80;

    Button.y = 30;

    var str:String = nombresBotones [i];

    var fontDescription:FontDescription = new FontDescription("Arial","normal");

    var format: ElementFormat = new ElementFormat (fontDescription, 14, 0 x 000000, 1);

    var textElement: TextElement = new TextElement (str.toUpperCase (), format);

    var textBlock:TextBlock = new TextBlock();

    textBlock.content = textElement;

    textBlock.baselineZero = TextBaseline.ROMAN;

    var textLine:TextLine = textBlock.createTextLine (null, 300);

    textLine.x = 5;

    textLine.y = textLine.height + 5;

    button.buttonMode = true;

    addChild (button);

    button.addChild (textLine);

    }

    key [i] .addEventListener (MouseEvent.CLICK, presionado);

    function presionado (e:MouseEvent): void {}

    var EPB: URLRequest = new URLRequest (e.target.url);

    navigateToURL (webs);

    buttonsContainer.addChild (button);

    }

    Quisiera than any of ustedes me pudiesen help, he tratado hacerlo por una semana y no to me compares nada, por favor.

    Espero su respuesta

    Los PD. that connects aqui puse examples of son.

    There are several errors in your code/reflection.

    you have a loop that does nothing.

    the button is set as a sprite.

    you I use outside this loop several times

    you have a foreign close-brace-}

    you try to use the button in a table, when adding a listener

    your listener called presionado() but it doesn't have such a function

    There is a hold() function, but there is no listener to call this function and it does nothing.

    you try to use a mouseevent (e) outside the body of the function so e will be undefined and therefore e.target and e.target.url

    Try:

    var nombresBotones:Array = new Array ("GOOGLE", "YAHOO", "HOTMAIL", "Password", 'CRISTALAB');

    var direccionesWeb:Array = new Array ('",'http://www.yahoo.com.mx', 'http://www.hotmail.com','http://www.intercambiosvirtuales.orghttp://www.google.com.mx','http://www.cristalab.com" ' "");

    for (var i = 0; i)< 5;="" i="" ++)="">

    var button: MovieClip = new MovieClip();

    button.graphics.beginFill (0xff0066, 0.5);

    button.graphics.drawRect (0, 0, 70, 25);

    button.graphics.endFill ();

    Button.x = i * 80;

    Button.y = 30;

    var str:String = nombresBotones [i];

    var fontDescription:FontDescription = new FontDescription ('Arial', 'normal');

    var format: ElementFormat = new ElementFormat (fontDescription, 14, 0 x 000000, 1);

    var textElement: TextElement = new TextElement (str.toUpperCase (), format);

    var textBlock:TextBlock = new TextBlock();

    textBlock.content = textElement;

    textBlock.baselineZero = TextBaseline.ROMAN;

    var textLine: TextLine = textBlock.createTextLine (null, 300);

    textLine.x = 5;

    textLine.y = textLine. height + 5;

    button.buttonMode = true;

    addChild (button);

    button.addChild (textLine);

    Button.URL = direccionesWeb [i];

    button.addEventListener (MouseEvent.CLICK, hold);

    }

    function hold(e:MouseEvent):void {}

    navigateToURL (new URLRequest (e.currentTarget.url));

    }

  • Create a button link URL in AS3 when outside the class is used.

    I need help!

    Quick background - I'm the guy at work who has the most basic understanding, base, base of Flash and was installed.  Makes me the guy ' go to ' now.  I've been avoiding AS3 for a few years now because I'm not a software engineer and my coding knowledge is quite limited. I have googled around for an hour and get something in AS2.  Not so much with AS3.  We have recently upgraded to Flash CC and had removed all previous versions, so now I have no choice.  I can follow directions but the technical jargon associated with AS3 is a learning curve steep for me when I do something like that, maybe twice a year.

    Now, what I'm trying to accomplish:

    It is simple stupid.  I have a flash web-banner.  The background is a static image of the PNG.  It has a countdown to a date.  I need the whole banner to function as a button so that when you click on it, it takes the user to a Web site.  That's all.  That's all I need.  I was able to do this in AS2 before without much of a fight.

    So I did the countdown using the script from this site:

    http://blog.anselmbradford.com/2009/08/03/creating-a-date-countdown-timer-in-ActionScript-3-Flash /.

    It works by referencing classes by external script.  It took me a bit of tinkering, but I got it together, no problem.
    So I'm going to make a button.  I create a button object.  Invisible, place it on a layer above all the rest.  I apply this code in action:

    MyButton.addEventListener (MouseEvent.CLICK, f);

    function f (e: Event) {}

    navigateToURL (new URLRequest ("http://www.adobe.com"));   Use the url of your choice.

    }

    And then it breaks.  The SWF up errors and will not compile.
    First of all, he says:
    1180: call to a method may be undefined, event.

    So I import flash.events.Event. Then, I get:
    1180: call to a method may be undefined navigateToURL.

    1180: call to a method maybe not defined URLRequest.

    1180: call to a method may be undefined addFrameScript.

    1120: access of undefined property MouseEvent.

    So I add:

    import flash.net.navigateToURL;

    import flash.net.URLRequest;

    import flash.events.MouseEvent;

    Who clears all errors except the 1180: addFrameScript.  What I've read, when there is an external class used, I can't apply action in a frame on the timeline script?
    It is so far above my head.  I tried for hours yesterday to find a way to add the script to the button to the main class, but the closest I had been set on my button never compile errors.  I don't know what I'm doing here and why it is so difficult to do two things at the same time in AS3.  I'm just frustrated with all this now.

    Could someone take pity on me and tell me what I need to do to get this working?  Try to use small words and talk to me like I'm the fool of the village, which is how I feel right now.

    Thank you!

    change this to the following and retest:

    Joshua Fowler wrote:

    I think you're right. Under the parameters of the publication, that's what 'Class' is pointing.

    This is the first main part of the code:

    package com.anselmbradford

    {

    import flash.display.MovieClip;

    import flash.events.TimerEvent;

    import flash.utils.Timer;

    SerializableAttribute public class Main extends MovieClip

    {

    /**

    Create a new object of Countdown, listen to updates and pass the date to countdown to.

    */

    public void Main()

    {

    var cd:CountDown = new CountDown();

    cd.addEventListener (CountDownEvent.UPDATE, _updateDisplay);

    CD.init (new Date (2015,3,9,20,00));

    }

    /**

    * Update the display.

    */

    private void _updateDisplay (evt:CountDownEvent): void

    Does this sound correct?

    Thanks again!

  • A simple way to load a pdf page into flash with as3

    Hallo,

    is there a simple way to load a pdf page into flash with as3 at Flash.

    I mean no plug in or as a class.

    Thank you.

    If it is an air application, you can use the htmlLoader.

    Otherwise, you can use navigateToURL but that only opens 'in' your swf, and you cannot manipulate the PDF with actionscript.

  • NavigateToURL works during the tests, but not upon publication

    Trying to create a hyperlink simply in Flash.  Works perfectly during the test.  But when I download from the net, by clicking on the link takes me to www.thirdnewhope.com/iamtnh.blogspot.com rather than just www.iamthn.blogspot.com.  I tried to change allowscriptaccess forever.  It does not either.  I'm puzzled :-(

    AS3 code:

    button_1.addEventListener (MouseEvent.CLICK, goClick);

    function goClick(evt:MouseEvent):void {}

    var url: String = " " http://www.iamtnh.blogspot.com ";

    var req:URLRequest = new URLRequest (url);

    navigateToURL (req, "_blank");

    }

    HTML code:

    < div id = "flashContent" >

    < object classid = "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width = "560" height = "400" id = "events2013" align = "middle" > "

    < param name = "movie" value = "events2013.swf" / > "

    < param name = "quality" value = "high" / >

    < param name = "bgcolor" value = "#000000" / >

    < param name = 'play' value = 'true' / >

    < param name = "loop" value = "true" / >

    < param name = 'wmode' value = 'window' / >

    < param name = "scale" value = 'showall' / >

    < param name = "menu" value = "true" / >

    < param name = "devicefont" value = "false" / >

    < param name = "salign" value = "" / > "

    < param name = "allowScriptAccess" value = "sameDomain" / >

    <!-[if! IE] >->

    < object type = "application/x-shockwave-flash" data = "events2013.swf" width = "560" height = "400" > "

    < param name = "movie" value = "events2013.swf" / > "

    < param name = "quality" value = "high" / >

    < param name = "bgcolor" value = "#000000" / >

    < param name = 'play' value = 'true' / >

    < param name = "loop" value = "true" / >

    < param name = 'wmode' value = 'window' / >

    < param name = "scale" value = 'showall' / >

    < param name = "menu" value = "true" / >

    < param name = "devicefont" value = "false" / >

    < param name = "salign" value = "" / > "

    < param name = "allowScriptAccess" value = "sameDomain" / >

    <!-<! [endif]-->

                        <a href=" http://www.Adobe.com/go/getflash ">

                            <img src=" http://www.Adobe.com/images/shared/download_buttons/get_flash_player.gif "alt ="Get Adobe Flash player"/ > "

    < /a >

    <!-[if! IE] >->

    < / object >

    <!-<! [endif]-->

    < / object >

    < / div >

    disable your Blocker for popups.

Maybe you are looking for

  • No option to uninstall Shockwave for Director plugin

    I want to get without Adobe and uninstalling, but find myself with this shockwave for Director plugin, which only give options to activate or not. But I not went. How do I do that?

  • False alarm critical of Apple - scam or virus?

    A couple of days, while browsingthem web (English version of the German company important and trustworthy), I received a popup alert indicating «Safari alert, your iPad is locked for your protection on 0808 148 3688 Apple support call» I had my son g

  • my laptop starts up then the screen goes black and says no operating system found

    My child put their hands on my laptop now it starts and then it says no operating system found, or there is another sign that comes up it says Security Accounts Manager intiliaztionfailed because of the following error: the handle is invalid. Error s

  • Wallpaper (wallpaper) keeps extending from any position I click

    When I got to my laptop (Vista Ultimate) the great horizons has worked, but suddenly it has stopped allowing me to change my wallpaper position no matter what I click. The images are still tense even if they are small images and larger pictures are c

  • Returns a copy of the hash table

    I have problems by returning a copy of a hash that is normally stored in the persistent store table. final class SyncCentres { private static Hashtable syncCentres; private static PersistentObject persist; private static final long ID=0xdfeab99e040a2