Copy link to clipboard
Copied
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
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
Copy link to clipboard
Copied
where did that code come from?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
are you testing on an android device using animate so you can use debug messages and see warnings and errors?
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
you can test on connected (to your computer) devices. it's much better than the emulator.