Skip to main content
Inspiring
March 26, 2023
Answered

problem link to an android app url

  • March 26, 2023
  • 6 replies
  • 649 views

good morning. i use this code for a mc to link me to a given url. When I test it in animate (test movie) it works perfectly, but when I upload the aab file to android and test it in my movie it doesn't let me access the url...

I don't know if it will be some Google limitation.
I send the code:

package com.kglad {
	
	import flash.display.MovieClip;
	import flash.events.Event;
	import flash.events.MouseEvent;
	import flash.net.URLRequest;
	import flash.net.navigateToURL;
	
	
	public class PieHome extends MovieClip {
		private var url:String = "https://www.google.es/";
		private var request:URLRequest = new URLRequest(url);
		
		public function PieHome() {
			this.addEventListener(Event.ADDED,addedH);		
		}
		private function addedH(e:Event):void{
			market_mc.addEventListener(MouseEvent.CLICK, buy);

		}
		function buy(e:MouseEvent) {
				try {
					navigateToURL(request);
					}
				catch (e:Error) {
					}
			}
	}

}

Thanks for the help

    This topic is closed to new replies. Start a new post to keep the conversation going.
    Correct answer joaquin5EDD

    are you testing on an android device using animate so you can use debug messages and see warnings and errors?


    I have already solved the problem... it seems that I had not put the URL correctly... it was not the same url that I had put in the example sent here

    6 replies

    kglad
    Community Expert
    Community Expert
    March 26, 2023

    where did that code come from?

    Inspiring
    March 26, 2023

    I don't remember... I learned about starting the class from the work you did for me a long time ago and I will have taken the url access function from the internet, although I don't remember where.

    kglad
    Community Expert
    Community Expert
    March 26, 2023

    are you testing on an android device using animate so you can use debug messages and see warnings and errors?