Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

problem link to an android app url

Contributor ,
Mar 26, 2023 Mar 26, 2023

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

559
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Contributor , Mar 29, 2023 Mar 29, 2023

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

Translate
Community Expert ,
Mar 26, 2023 Mar 26, 2023

where did that code come from?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 26, 2023 Mar 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 26, 2023 Mar 26, 2023

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 29, 2023 Mar 29, 2023

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 29, 2023 Mar 29, 2023

The truth is that I don't know how to use animate on an android device... maybe an emulator? or can animate be installed on mobiles?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 30, 2023 Mar 30, 2023
LATEST

you can test on connected (to your computer) devices.  it's much better than the emulator.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines