AS3.0 NavigateToURL

Hi All,
Iam using asc.jar to compile the as scripts which i have
written. But when i try to compile the code using the following
command
java -jar asc.jar sample.as
It gives an error 1017: The definition for BaseClass Object
is not found.
My Sample.as is a very simple one.
Please find the code below.
package
import flash.net.URLRequest;
import flash.net.navigateToURL;
public class Sample
public function keynoteOpenUrl(url:String) : void {
var absUrl:String = "
http://www.yahoo.com";
if (url.indexOf("
http://www.yahoo.com") == -1) {
url = absUrl + url;
navigateToURL(new URLRequest(url));
Anyone help me on this. If there is any errors in the
actionscript, please let me know. Iam a newbie to flash and
actionscript.
Thanks,
Prabakaran Srinivasan

Goodness sakes, that was a long post for a quick answer I
just figured out:
My loop should read like this:
for each (var prop:String in xmlAmenity.feature) {
trace (prop);
The key was enumerating through each xmlAmenity.feature, not
xmlAmenity. Of course, if there's a better way, I'm all
ears...

Similar Messages

  • Opening a pdf file in a relative link / local

    Maybe this sounds simple.
    But I get used to AS2 code to open  a pdf file like the code below:
    getURL("pdfDocuments/pdfname.pdf","_blank")
    As I search uncle Google I'm stuck to this as equivalent to getURL in AS2.
    btn.addEventListener(MouseEvent.CLICK, btnClick);
    function btnClick(e:MouseEvent):void {
              navigateToURL( new URLRequest("pdfDocuments/pdfname.pdf"), "_blank");
    But still it did'nt work.
    Before in AS2 getURL working on mailto, pdf on a relative link and a typical url's.
    But as to AS3 navigateToURL function only works on mailto and typical url.
    Any tweaks to the code above, to get it to work? will much appreciated.
    Thanks,

    There's numerous examples if you google "call javascript from actionscript".
    Here's 1 that sums it up pretty simply, just import flash.external.ExternalInterface; then use it statically via its call() method to call javascript. Then in the javascript simply do what you want.
    http://www.hardcode.nl/archives_155/article_334-call-javascript-function-from-as3-and-vice versa.htm
    e.g. ACTIONSCRIPT:
    import flash.external.ExternalInterface;  // call javascript function passing to load relative URL "pdfs/some.pdf"ExternalInterface.call("loadPDF","pdfs/some.pdf");
    e.g. HTML
    <html><head><script type="text/javascript">// <!-- // function with the called namefunction loadPDF(pdfName){     // open a new window (or tab) to the PDF requested from AS     window.open(pdfName,"_blank"); } // --></script><body> </body></html>
    Nothing really much to it.
    Here's a reference to window.open() if you want to customize the opened window:
    http://www.w3schools.com/jsref/met_win_open.asp

  • List component question

    Hello,
    I have flash cs4, and I am using a list component. I know how to open swf when somebody clicks on the list, but is there any way to tell the component to open a .pdf file on  a new window using the list component?
    thanks for your guidance
    Cheers.

    You just need to link to the pdf like you would link to any web page.  The code you use depends on the version of actionscript you are using...
    AS2:  getURL("http://www.yourdomain.com/your.pdf", "_blank");
    AS3: navigateToURL(new URLRequest("http://www.yourdomain.com/your.pdf"), "_blank");

  • Simple question about getURL

    Newbie here...I'm trying to stop an animation from repeating and have a button get a URL. Should be simple but having trouble. Please help.
    Last frame in actions layer : stop();
    Button layer last frame has the following:
    learnmore_btn.addEventListener(MouseEvent,CLICK;getURL("http://www.xxxxxxx");
    function getURL(event:MotionEvent):void
        "http://www.xxxxxxxx".getURL();

    getURL is an AS2 function name, so you are better off not using anything by that name.  In AS3 navigateToURL is used to link to new pages.
    Beyond that, your code is just wrong in a variety of ways--too many to go thru.  The event listener should specify the event type and the name of the event handler function to call.  The event handler function should incorporate the linking code needed.
    learnmore_btn.addEventListener(MouseEvent.CLICK, linkLearnMore);
    function linkLearnMore(event:MouseEvent):void
       navigateToURL(new URLRequest("http://www.xxxxxxxx"));  // linking code

  • [flash cs3] fscommand

    Estoy haciendo un ejecutable en flash con los típicos :
    fscommand ("allowscale", true) ;
    fscommand ("fullscreen", true) ;
    fscommand ("showmenu", false);
    pero en cs3 el exe no funciona? en cambio en el 8 si... como
    se soluciona?
    Gracias

    Gracias Juan a tu respuesta... espero que lo solucionen
    pensaba que debía
    ser un problema mío pues es un tema ciertamente
    preocupante.
    Gracias.
    "Juan Muro" <[email protected]> escribió en el
    mensaje de noticias
    news:gg72el$ib1$[email protected]..
    > Guaj:
    > Pues ciertamente Markus, el problema existe, dado que
    fsCommand está
    > contemplado como acción válida y documentada
    en AS3 y no sé cómo diablos
    > no se ha hablado aquí antes, ya que este es uno de
    los peores bugs
    > conocidos de Flash Player 9, tanto del standAllone, como
    de los plugins de
    > IExplorer y de Firefox.
    > El problema se produce no solo con el fscommand, sino
    también con el
    > getUrl (o igualmente si escribes en AS3 navigateToURL()
    ) y es un bug
    > difícil de explicar.
    > En realidad lo que te sucede es que Flash Player ni
    siquiera ejecuta los
    > primeros comandos, aunque sí el último, y esto
    puede ser debido -a falta
    > de que Adobe saque una mejor explicación- a la
    manera de cargar las
    > ordenes en el mapa o matriz asociativa basada en el
    valor del argumento.
    > La solución en aplicaciones a ejecutar sobre
    navegadores es más complicada
    > que sobre ejecutables. En estos la única manera
    -hasta el momento segura-
    > que conozco para evitarla es poner cada una de las
    órdenes fscommand en un
    > frame diferente, aunque hay quien dice que si pones los
    argumentos en
    > case-sensitive diferentes también funciona:
    > fscommand("trapallkeys","true");
    > fscommand("fullscreen","TRUE");
    > Salu2
    > `8¬]
    > Juan Muro
    >
    > "markus" <[email protected]_nospam> escribió
    en el mensaje de noticias
    > news:gfv34s$qgi$[email protected]..
    >> Estoy haciendo un ejecutable en flash con los
    típicos :
    >> fscommand ("allowscale", true) ;
    >> fscommand ("fullscreen", true) ;
    >> fscommand ("showmenu", false);
    >> pero en cs3 el exe no funciona? en cambio en el 8
    si... como se
    >> soluciona?
    >> Gracias
    >

  • Going to a new webpage by clicking a button

    I have looked and listened to almost all of the on-line tutorials but can't find where:
    when you click on a button or dropdown menu item - how to get it to take you to the next(appropriate) page.
    i.e. click on Contact - should go to the contact page.
    What / where should I be looking for or asking (i.e. goandGet code??) in order to do this?
    Forrest

    as2:  getURL()
    as3:  navigateToURL()

  • Simple URL Opener???

    Hi everyone,
    Is there a simple way to just open a new web browser window or tab at a particular URL when clicking a button.
    It used to be getURL(<url>)  bu this seems to be gone and it wants me to use flash.net.URLLoader  but I can't seem to get it to work.
    Can anyone point me in the right direction for this?
    !m!

    In AS3, navigateToURL replaces AS2's getURL.  And adding functionality to buttons involves a bit more coding.  The "_blank" shown below should open a new window.
    function btn1Click(evt:MouseEvent):void {
       var url:String = "http://www.awebsite.com/awebpage.html";
       var req:URLRequest = new URLRequest(url);
       navigateToURL(req, "_blank");
    btn1.addEventListener(MouseEvent.CLICK, btn1Click);

  • Help with buttons in AS3

    Hi Folks,
    I'm stuck with a simple flash movie I need to create in which two images fade in and fade out, and each of them must be clickable and hyperlink to a separate URL.
    I've got the fading going okay, but I cannot for the life of me get even a single button to work on it.
    If it's helpful I can send along what I've got so far.  Any assistance would be greatly appreciated.
    Regards,
    Andrew.

    Hi Ned,
    Thank you for the followup email.
    I think I was close - I was aware of the changes between AS2 and AS3, but I
    think I was putting the Action in the wrong place.
    Next question - if I have 2 buttons (say btn1 and btn2), how do I make btn1
    available for say frames 1-60, and btn2 available from frames 61-120?
    I am primarily a ColdFusion developer, and a complete newbie to flash, so
    sorry if this is a dumb question.
    Regards,
    Andrew.
    2009/5/15 Ned Murphy <[email protected]>
    In AS3, to make a button work with code, you need to add an event listener
    for it.  In the timeline that holds that button, in a separate actions layer
    that you create, in a frame numbered the same as where that button exists,
    you would add the event listener:
    >
    btn1.addEventListener(MouseEvent.CLICK, btn1Click);
    >
    Descriptively, that line of code contains the following:
    >
    buttonInstanceName . displayObjectMethod (eventClass . eventType,
    eventHandlerFunction);
    >
    The name of the function for processing the clicking of that button was
    already defined at the end of the event listener assignment, so now you just
    have to write that function out:
    >
    function btn1Click(evt:MouseEvent):void {
       var /String = "http://www.awebsite.com/awebpage.html";
       var req:URLRequest = new URLRequest(url);
       navigateToURL(req);
    >

  • Convert simple code from as2 to as3

    Hello, i am looking for some help here for something simple (i think)
    var txt:String = link1;
    btn.onRelease = function():Void {
    if( sample_id )
    getURL("http://www.website.com/registration?partner_id=" + sample_id + "sampleURLCode", "_blank");
    else
    getURL("http://www.website.com/registration?sampleURLCode", "_blank");
    Is there a way to make this simple code into AS3?

    Hi, Apparantly that's because the 'link1' and 'sample_id' variables are not within the scope of the code you posted above, Perhaps you have defined them outside on a different frame or class. You can either define them with the same code like:
    var sample_id:Number=1234;  //Use your own variable type and value here
    var link1:String = "your string or link URL here";
    var txt:String = link1;
    btn.addEventListener(MouseEvent.CLICK, gotoURL);
    function gotoURL(e:MouseEvent)
    if( sample_id )
          navigateToURL(new URLRequest("http://www.website.com/registration?sample_id=" + sample_id + "sampleURLCode"),"_blank");
    else
          navigateToURL(new URLRequest("http://www.website.com/registration?sampleURLCode"),"_blank");
    Or you can put a direct reference to your existing variable like (If your variables are defined on root/frame 1) :
    var link1:String = "your string or link URL here";
    var txt:String = MovieClip(this.root).link1;
    btn.addEventListener(MouseEvent.CLICK, gotoURL);
    function gotoURL(e:MouseEvent)
    if( MovieClip(this.root).sample_id )
          navigateToURL(new URLRequest("http://www.website.com/registration?sample_id=" + sample_id + "sampleURLCode"),"_blank");
    else
          navigateToURL(new URLRequest("http://www.website.com/registration?sampleURLCode"),"_blank");
    try that, or you can share your .fla !
    cheers

  • AS3 swf tiny question

    I have a feeling that I know the answer to this. I am not
    terribly savvy on Actionscript (basic sklls, not expert)..and not
    in 3.0 at all!!!!!!!! I have a website that is done nearly all in
    Flash with AS2.0. I recently added a video player from a video
    aggregator, but their player is AS3.0.
    All I could do was to build an html page and embed the AS 3
    player into that. I prefer the seamlessness that Flash provides. Is
    there ANY possible way to embed an AS3 swf file into an AS2
    website.
    I just cannot completely rebuild the entire website right now
    in 3.0!!!!
    Is there ANY simple solution? I cannot believe that I am the
    only person who is having issues like this...Ugh!!!!
    thanks for any help you can offer.

    you can't use an as2 file to load an as3 file and have the
    as3 file work.
    you can use getURL() to load your as3's embedding html file.
    if you want it to look seemless, you can load into the same window
    so the user will see your as2 content replaced by the as3 swf.
    in the as3 swf you can put code to load your as2's embedding
    html file (using navigateToURL()). so, you can go back and forth
    between your as2 and as3 swfs.

  • Working with AS3 External Classes

    Ok... trying to work with AS3 external classes. I have a movieClip that I want to also function as a button. Instance name is "_onDemand". This movieClip is on the stage of my Home.fla.  "_onDemand" movieClip properties   Class:HomePage  Base clase: flash.display.MovieClip
    I want the user to click this movieClip and take the user to an external URL within a new browser window or tab.
    Can anyone help me? Or at least point me to a really really good tutroial that does exactly this using external classes?
    Thanks so much,
    Mark
    My code:
    package com.cox4college.pages
    import com.gaiaframework.templates.AbstractPage;
    import com.gaiaframework.events.*;
    import com.gaiaframework.debug.*;
    import com.gaiaframework.api.*;
    import flash.display.*;
    import flash.events.*;
    import com.greensock.TweenMax;
    import flash.net.URLRequest;
    import flash.net.navigateToURL;
    public class HomePage extends AbstractPage
    public function HomePage()
    super();
    alpha = 0;
    //new Scaffold(this);
    override public function transitionIn():void
    super.transitionIn();
    TweenMax.to(this, 0.3, {alpha:1, onComplete:transitionInComplete});
    override public function transitionOut():void
    super.transitionOut();
    TweenMax.to(this, 0.3, {alpha:0, onComplete:transitionOutComplete});
    public class _onDemand extends Sprite
    // Link Navigation button handlers
    public var _onDemand:Sprite;
    // if you want a hand cursor
    _onDemand.buttonMode = true;
    _onDemand.useHandCursor = true;
    _onDemand.addEventListener(MouseEvent.CLICK, onDemandClickHandler);
    _onDemand.addEventListener(MouseEvent.ROLL_OVER, onDemandRollOverHandler);
    _onDemand.addEventListener(MouseEvent.ROLL_OUT, onDemandRollOutHandler);
    public function onDemandClickHandler(e:MouseEvent):void{
    navigateToURL(new URLRequest("http://ww2.cox.com/residential/santabarbara/tv/ondemand.cox"));
    public function onDemandRollOverHandler(event:MouseEvent):void{
    _onDemand.gotoAndStop("hover");
    public function onDemandRollOutHandler(event:MouseEvent):void{
    _onDemand.gotoAndStop("static");
    Getting the following errors:
    1120: Access of undefined property _onDemand.

    Ok. I admit it... I had some wonderful help to resolve this issue. You ever feel like you are on an island learning AS3 External Classes? I feel that way all the time... so far... I plan on not feeling that way soon. I hope this helps someone get off that island.
    package com.domainname.client {
        import flash.display.*;
        import flash.events.*;
        import flash.net.*;
        import flash.utils.*;   
        import caurina.transitions.Tweener;
        import caurina.transitions.properties.*;
        FilterShortcuts.init();   
        ColorShortcuts.init();      
        public class Main extends MovieClip {
            private var coverDelay:Number = 4;
            //#DF6D27
            public function Main():void {
                initMain();
            private function initMain():void {
                mc_form.visible = false;
                Tweener.addTween(mc_cover,{alpha:1,time:1,delay:coverDelay,onComplete:formIn});
                btn_onDemand.buttonMode = true;
                btn_listings.buttonMode = true;
                btn_ppv.buttonMode = true;
                btn_rhapsody.buttonMode = true;
                btn_onDemand.addEventListener(MouseEvent.MOUSE_OVER,navOver);
                btn_onDemand.addEventListener(MouseEvent.MOUSE_OUT,navOut);
                btn_onDemand.addEventListener(MouseEvent.CLICK,navClick);
                btn_listings.addEventListener(MouseEvent.MOUSE_OVER,navOver);
                btn_listings.addEventListener(MouseEvent.MOUSE_OUT,navOut);
                btn_listings.addEventListener(MouseEvent.CLICK,navClick);
                btn_ppv.addEventListener(MouseEvent.MOUSE_OVER,navOver);
                btn_ppv.addEventListener(MouseEvent.MOUSE_OUT,navOut);
                btn_ppv.addEventListener(MouseEvent.CLICK,navClick);
                btn_rhapsody.addEventListener(MouseEvent.MOUSE_OVER,navOver);
                btn_rhapsody.addEventListener(MouseEvent.MOUSE_OUT,navOut);
                btn_rhapsody.addEventListener(MouseEvent.CLICK,navClick);           
                function navOver(evt:MouseEvent):void {
                    Tweener.addTween(evt.target,{_color:0xffc614,time:.2});
                function navOut(evt:MouseEvent):void {
                    Tweener.addTween(evt.target,{_color:0xffffff,time:.2});
                function navClick(evt:MouseEvent):void {
                    var url;
                    switch (evt.target.name) {
                        case 'btn_onDemand':
                        url = new URLRequest("http://ww2.cox.com/residential/santabarbara/tv/ondemand.cox");
                        break;
                        case 'btn_listings':
                        url = new URLRequest("http://ww2.cox.com/myconnection/santabarbara/watch/entertainment/tv-listings.cox");
                        break;
                        case 'btn_ppv':
                        url = new URLRequest("http://ww2.cox.com/residential/santabarbara/tv/pay-per-view.cox");
                        break;
                        case 'btn_rhapsody':
                        url = new URLRequest("http://ww2.cox.com/myconnection/santabarbara/listen.cox");
                        break;                                                           
                    navigateToURL(url,"_blank");

  • How to load html page or website in flash as3

    hi
    how to load html page or web link (www.google.com)  in flash as3.
    please help me...

    Use the navigateToURL function...
    var url:String = "http://www.wherever.com";:
    var req:URLRequest = new URLRequest(url);
    navigateToURL(req);
    OR in one line...
    navugateToURL(new URLRequest("http://www.wherever.com"));

  • AS3 comboBox problem.

    Ok, I have a simple ComboBox with instance name of dragonCombo
    A Lable with an instance name of dragonLabel
    Using a an AS3 called Dragon.as
    When the ComboBox is clicked, a picture should pull up.   The problem is, there are no errors, but The ComboBox is not listing any of the Labels I loaded.  This is my AS3 code, maybe someone can see the mistake I have made somewhere.
    package
    import flash.display.MovieClip;
    import flash.display.Loader;
    import fl.controls.ComboBox;
    import fl.data.DataProvider;
    import flash.events.Event;
    import flash.text.TextFieldAutoSize;
    import flash.net.URLRequest;
    import flash.net.navigateToURL;
    import fl.controls.Label;
    public class Dragons extends MovieClip{
    public var dragonCombo:ComboBox;
    public var dragonLabel:Label;
    var comboDP:DataProvider;
    var dragonLoader:Loader;
    public function Dragons() {
    setupComboDP();
    setupdDragonCombo();
    setupLabels();
    private function setupComboDP():void{
    comboDP = new DataProvider();
    comboDP.addItem({ Label:"Fire"});
    comboDP.addItem({ Label:"IceNFire"});
    comboDP.addItem({ Label:"Ghost"});
    private function setupDragonCombo():void{
    dragonCombo.width = 150;
    dragonCombo.prompt = "Choose a Dragon";
    dragonCombo.dataProvider = comboDP;
    dragonLoader = new Loader();
    dragonLoader.x = 200.00;
    dragonLoader.y = 60.00;
    addChild(dragonLoader);
    dragonCombo.addEventListener(Event.CHANGE,loadData);
    public function setupLabels():void{
    dragonLabel.text="";
    dragonLabel.autoSize = dragonLabel.autoSize = TextFieldAutoSize.LEFT;
    public function loadData(e:Event):void{
    dragonLoader.load(new URLRequest("dragons3/"+e.target.selectedItem.Label.toLowerCase()+".png"));

    Your Dragons class is creating its own dragonCombo (it is not the one on the stage)...
           public var dragonCombo:ComboBox;
    that has no association with the combobox you placed on the stage manually as far as I can see.
    Assuming this is not your document class, if all you are doing is importing the Dragons class, then you are not implementing it at all.  You would have to have a line...
         var dragons:Dragons = new Dragons();
    in you fla in order to instantiate the class.  At that point you might start seeing error messages because in doing that your class is trying to target an object that doesn't exist because it only declared the combobox, it did not create an instance of it, as in...
          dragonCombo = new ComboBox();

  • ActionScript 3 - XML - NavigateToURL

    Ok there are many tutorials out there on how to use this function, what I am trying to do and can't seem to find a tutorial on is using navigateToURL with the "mailto" email address being populated from an XML list.
    For example you have a list of offices and each office has a lead. I want to populate a List component with the office name, and when clicked I want it to open the email client and populate the To: and Subject line from the xml file.
    What I have so far populates the Office name into the list and when clicked  the mail client will open but doesnt populate the To because I can't figure it out.
    I believe I need to specify a var to pull the email address from the xml list, I just cant seem to get it right.
    here is a snippet example of my xml code
    <officeleads>
      <office>
       <officenm>PDX</officenm>
       <emllink>[email protected]</emllink>   <-------- I want this to populate the "To:" in an email
      </office>
    </officeleads>
    and here is my ActionScript
    var leadloader:URLLoader = new URLLoader();
    leadloader.addEventListener(Event.COMPLETE, onLoaded);
    leadlist.addEventListener(Event.CHANGE, openMailClient);
    function openMailClient(l:Event):void
    var request:URLRequest = new URLRequest();
    request.url="mailto:"                 <----------  this is where I know I need to somehow specify the emllink in the xml file to be filled into the "To:"
    navigateToURL(request,"Self");
    var xml:XML;
    function onLoaded (l:Event):void
      xml = new XML(l.target.data);
      var offlst:XMLList = xml.office;
      for (var i:uint=0; i<offlst.length();i++)
       leadlist.addItem({data:offlst.officenm.text()[i],
           label:offlst.officenm.text()[i]});
    leadloader.load(new URLRequest("officeleads.xml"));
    Any help will be greatly appreciated.
    Thanks
    Sam
    AS3 Noob

    try:
    import fl.events.ListEvent;
    var leadloader:URLLoader = new URLLoader();
    leadloader.addEventListener(Event.COMPLETE, onLoaded);
    leadlist.addEventListener(ListEvent.ITEM_CLICK, openMailClient);
    function openMailClient(e:ListEvent):void {
       var request:URLRequest=new URLRequest("mailto:"+leadlist.getItemAt(int(e.rowIndex)).data);
        navigateToURL(request,"_self");
    var xml:XML;
    function onLoaded(l:Event):void {
        xml = new XML(l.target.data);
        var offlst:XMLList = xml.office;
        for (var i:uint=0; i<offlst.length(); i++) {
           leadlist.addItem({data:offlst.emllink.text()[i],
                   label:offlst.officenm.text()[i]});
    leadloader.load(new URLRequest("officeleads.xml"));

  • NavigatetoURL is not working properly

    I am using a single command getURL in my project It is a
    simple Menu template that has some animated buttons.On clicking
    they will get the required URL.I am using Flash 9 that is AS 3.0
    version.
    At first the Links are not working in IE and working best in
    Mozilla.I found that a tag in OBJECT embed
    statement.allosripaccess= always.then It was solved.Now It is
    causing problem in Mozilla new version 3.0.The animation is
    working.But that navigateToURl is not fetching the required Web
    pages.The Links are silent.No action is there.I am unable to
    scratch the Mystery.
    If Anybody could solve it, i am so thanfull.From the
    begening the getURL is a rough function in flash ActionScript
    Kit.Now in As 3 only name is changed.I don't know Why the developrs
    of ActionScrip Left it with such ambigous functionality.

    Hi
    i have xml driven menu which uses navigateToUrl. evrithing is ok when i press ctrl+Enter and publish swf. It navigates to the url which is specified in menu.xml.But when i upload swf to website it is not working, navigates to like directory not a url.
    ex. on local swf navigates to "sites URL"
    on web site navigates "/" sign to mydomain/"sites URL" (error404)
    please help to solve this
    here is my as3 script and xml
    <?xml version="1.0" encoding="utf-8"?>
    <menu>
    <item>
    <posNum>1</posNum>
    <label>label1</label>
    <linkTo>link1</linkTo>
    </item>
    <item>
    <posNum>2</posNum>
    <label>label2</label>
    <linkTo>link2</linkTo>
    </item>
    </menu>
    //---------XML-MENU----//
    var xmlPath:String = "menu.xml";
    var xml:XML;
    var loader = new URLLoader();
    loader.load(new URLRequest(xmlPath));
    loader.addEventListener(Event.COMPLETE, xmlLoaded);
      function xmlLoaded(e:Event):void {
    if ((e.target as URLLoader) != null )
    {  xml = new XML(loader.data);  createMenu(); } }
    var numberOfItems:uint = 0;
      function createMenu():void {
    numberOfItems = xml..item.length();
      var count:uint = 0;
    var xPos:Number =61;
      for each (var item:XML in xml.item) {
    var menuItem:ButtonEffect = new ButtonEffect();
    menuItem.name = "btn"+item.posNum;
    menuItem.x = xPos xPos += menuItem.width-3.15;
    menuItem.y = 82;
    menuItem.menuText.txtb.text = item.label;
    menuItem.menuTextw.txtw.text = item.label;
    menuItem.linkTo = item.linkTo;
    menuItem.mouseChildren = false;
    menuItem.buttonMode = true;
    addChild(menuItem);
    menuItem.alpha =100;
    count++;
    menuItem.addEventListener(MouseEvent.CLICK, itemClicked);
    function itemClicked(event:MouseEvent):void {
    var yyy:String = event.target.linkTo;
    var url:URLRequest = new URLRequest(yyy);
    navigateToURL(new URLRequest(yyy),"_self");
    trace(yyy); } } }

Maybe you are looking for

  • 2nd generation shuffle won't take charge, not recognized by mac pro.

    2nd generation shuffle won't take charge, is not recognized by mac pro. light will not go on

  • Use boolean array to perform set operations

    I am currently taking a computer science class that uses Java as the language of choice. I have no prior experience with Java. We have a homework assignment in which we are supposed to use a boolean array to implement set operations. We have to creat

  • Enhancement for inbound idoc

    Hi gurus one help.... i need to read the of purchase requsition from inbound idoc , basic type purqchg02 iam unable to find its exit, plz help me asap....

  • Can i use id on html:select syntax...

    Hi, i am using the following code to take data from the database directly to a dropdown box. <html:select property="lddate" style = "width:160"> <html:option value="--SELECT--">SELECT</html:option> <html:options collection="loadDateList" name="almRec

  • Incoming Calls via CUBE to IVR- intermittent garbled audio

        Connecting via an ITSP and incoming calls are: ITSP--SIP Trunk-- MyCUBE--SIP Trunk--CUCM--IVR(CTI Ports and RPs)                                                                         |