Xamarin Forms GoogleMaps data from list to pin and info window - google-maps

I have a problem. I have a short list of clients and for each of them I want to display a pin and Popup window, which will be displayed after clicking the info window. However, I have no idea how to connect it.
Part of my code:
List<Client> lstClients = new List<Client>
{
new Client(1, "Firma 1", "Wspólna 10", "123-123-23-23", "F1", true),
new Client(2, "Firma 2", "Marszałkowska", "456-456-56-45", "F2", false),
new Client(3, "Firma 3", "Jerozolimskie 57", "789-789-89-78", "F3", true),
new Client(4, "Firma 4", "Koszykowa 10", "234-423-43-23", "F4", false)
};
foreach (Client client in lstClients)
{
var geoadres = client.Address;
var locations = await Geocoding.GetLocationsAsync(client.Address);
var location = locations?.FirstOrDefault();
ListPin = new Pin
{
Type = PinType.Place,
Label = client.FirmName,
Address = client.Address,
Position = (new Position(location.Latitude, location.Longitude)),
Rotation = 33.3f,
Tag = client.Tag
};
map.Pins.Add(ListPin);
}
void InfoWindow_Clicked(object sender, InfoWindowClickedEventArgs e)
{
PopupNavigation.Instance.PushAsync(new ShowPopup());
}
I will be grateful for any help.

By clicking on the pin need to show the pop up window, you can implement like this;
foreach (Client client in lstClients)
{
var geoadres = client.Address;
var locations = await Geocoding.GetLocationsAsync(client.Address);
var location = locations?.FirstOrDefault();
ListPin = new Pin
{
Type = PinType.Place,
Label = client.FirmName,
Address = client.Address,
Position = (new Position(location.Latitude, location.Longitude)),
Rotation = 33.3f,
Tag = client.Tag
};
map.Pins.Add(ListPin);
// tap event from map pinview -> Callout action
map.Pins[i].Clicked += (sender, e) =>
{
System.Diagnostics.Debug.WriteLine(((Pin)sender).Type);
DisplayAlert(((Pin)sender).Label, ((Pin)sender).Address, "OK");
};
}
add the code inside for-loop

Related

Cannot add created label to threads

I tried to write a function in Google Apps Script that creates a new label in Gmail and adds it to threads.
I have two problems:
When I run the function for the first time (archivedLabel not existing yet) I cannot add it to the threads immediately after it is created.
archivedLabel = GmailApp.getUserLabelByName(labelText) at the end of the if statement will still return null and the script crashes.
If I run the script for the second time (label already created) everything works fine.
The new labels only appear in Gmail after the user refreshes the Gmail App in the browser. Is there a way to do this automatically or a method to refresh the labels and messages so I can see the new label in Gmail without manually reloading the page?
function addArchivedLabel(thread){
var labelText = "Backed up";
var archivedLabel = GmailApp.getUserLabelByName(labelText);
//create new archived label if not already existing
if(archivedLabel == null) {
var textColor = "#89d3b2"; // Please set this.
var backgroundColor = "#ffbc6b"; // Please set this.
var userId = "me";
var resource = Gmail.newLabel();
resource.labelListVisibility = "labelShow";
resource.messageListVisibility = "show";
resource.name = labelText;
var labelColor = Gmail.newLabelColor();
labelColor.textColor = textColor;
labelColor.backgroundColor = backgroundColor;
resource.color = labelColor;
Gmail.Users.Labels.create(resource, userId);
archivedLabel = GmailApp.getUserLabelByName(labelText);
}
archivedLabel.addToThread(thread); //add new label to archived emails
}
I just encountered the same problem
For some reason this is working :
function getOrCreateLabel() {
if (!GmailApp.getUserLabelByName(LABEL_NAME)) {
GmailApp.createLabel(LABEL_NAME)
}
console.log(GmailApp.getUserLabelByName(LABEL_NAME)) // not NULL
}
And this is not working as expected:
function getOrCreateLabel() {
if (!GmailApp.getUserLabelByName(LABEL_NAME)) {
Gmail.Users.Labels.create({
"labelListVisibility": "labelHide",
"messageListVisibility": "hide",
"name": LABEL_NAME
}, "me")
}
console.log(GmailApp.getUserLabelByName(LABEL_NAME)) // NULL
}
For the second function,It seems that appsscript cache the response of GmailApp.getUserLabelByName at runtime.
So in my opinion. You will need to create a trigger, here a working exemple:
function addArchivedLabel(thread){
var labelText = "Backed up";
var archivedLabel = GmailApp.getUserLabelByName(labelText);
const thread_id = UserProperties.getProperty("thread")
// Check if come from trigger
if (thread_id) {
// retrieve the thread
thread = GmailApp.getThreadById(thread_id)
// Clean property and trigger
UserProperties.deleteProperty("thread")
ScriptApp.getScriptTriggers().forEach((p) => {
if (p.getHandlerFunction() == "addArchivedLabel") {
ScriptApp.deleteTrigger(p)
}
})
}
//create new archived label if not already existing
if(archivedLabel == null) {
var textColor = "#89d3b2"; // Please set this.
var backgroundColor = "#ffbc6b"; // Please set this.
var userId = "me";
var resource = Gmail.newLabel();
resource.labelListVisibility = "labelShow";
resource.messageListVisibility = "show";
resource.name = labelText;
var labelColor = Gmail.newLabelColor();
labelColor.textColor = textColor;
labelColor.backgroundColor = backgroundColor;
resource.color = labelColor;
Gmail.Users.Labels.create(resource, userId);
UserProperties.setProperty("thread", thread.getId())
ScriptApp.newTrigger("addArchivedLabel").timeBased().everyMinutes(1).create()
return
}
archivedLabel.addToThread(thread); //add new label to archived emails
}
// fixture to simulate get thread
function main() {
const thread = GmailApp.getInboxThreads()
addArchivedLabel(thread[0])
}
Hope it will help

Changing Printer Support File Path in Forge Design Automation API

In AutoCAD Design Automation API - How would one go about changing the Options --> Files (tab) --> Printer Support File Path --> Plot Style Table Search Path to point to another location during a work item execution? I have tried adjusting the RuntimeRequirements in the package contents xml file to point to my bundle contents, but that did not work.
<Components>
<RuntimeRequirements
OS="Win64"
Platform="AutoCAD"
SupportPath="./Contents/"/>
............
Any Suggestions? Ultimately im trying to upload a specific custom ctb file and plot with it
Thanks,
John
You need to program to copy the related files from bundle to Plotter folders in your custom plugin dll.
Suppose you placed all the related files like .pmp,.pc3 and .ctb in Contents folder, as shown in pic
Example:
Then you need to run command, prior to running any PLOT commands. This will copy files to relevant folders when your execute workItem against the bundle package you have uploaded to DA service.
[CommandMethod("PlotLayoutCommands", "COPYPLOTTERFILES", CommandFlags.Modal)]
public static void CopyPlotterFiles()
{
// Get the current document and database, and start a transaction
Document acDoc = Autodesk.AutoCAD.ApplicationServices.Core.Application.DocumentManager.MdiActiveDocument;
Database acCurDb = acDoc.Database;
//A way to copy files from bundle package to respective Printer Support Path
object roamablePath = Autodesk.AutoCAD.ApplicationServices.Core.Application.GetSystemVariable("ROAMABLEROOTPREFIX");
acDoc.Editor.WriteMessage("\nRoamable-Path\t:{0}\n", roamablePath.ToString());
string pc3FileFound = HostApplicationServices.Current.FindFile("DAS-PDF.pc3", acCurDb, FindFileHint.Default);
string pmpFileFound = HostApplicationServices.Current.FindFile("DAS-PDF.pmp", acCurDb, FindFileHint.Default);
string plotStyleFileFound = HostApplicationServices.Current.FindFile("DAS-PDF.ctb", acCurDb, FindFileHint.Default);
string scriptFileFound = HostApplicationServices.Current.FindFile("RunPlot.scr", acCurDb, FindFileHint.Default);
acDoc.Editor.WriteMessage("\nPC3 Config\t:{0}\n", pc3FileFound);
acDoc.Editor.WriteMessage("\nPMP File\t:{0}\n", pmpFileFound);
acDoc.Editor.WriteMessage("\nCTB File\t:{0}\n", plotStyleFileFound);
acDoc.Editor.WriteMessage("\nScript File\t:{0}\n", scriptFileFound);
//Start Copying:
string pmpFolder = "PMP Files";
string pc3Folder = "Plotters";
string plotStylesFolder = "Plot Styles";
try
{
File.Copy(pc3FileFound,
Path.Combine(roamablePath.ToString(),
pc3Folder, Path.GetFileName(pc3FileFound)));
File.Copy(pmpFileFound,
Path.Combine(roamablePath.ToString(),
pc3Folder, pmpFolder, Path.GetFileName(pmpFileFound)));
File.Copy(plotStyleFileFound, Path.Combine(roamablePath.ToString(),
pc3Folder, plotStylesFolder, Path.GetFileName(plotStyleFileFound)));
File.Copy(scriptFileFound, Path.Combine(Directory.GetCurrentDirectory(), Path.GetFileName(plotStyleFileFound)));
}
catch (System.Exception ex)
{
acDoc.Editor.WriteMessage("\n" + ex.Message);
}
}
or
You can create CustomPlot command something like this, which will set PC3 and CTB on the Layout.
public static void PlotLayout()
{
// Get the current document and database, and start a transaction
Document acDoc = Autodesk.AutoCAD.ApplicationServices.Core.Application.DocumentManager.MdiActiveDocument;
Database acCurDb = acDoc.Database;
//A way to copy files from bundle package to respective Printer Support Path
object roamablePath = Autodesk.AutoCAD.ApplicationServices.Core.Application.GetSystemVariable("ROAMABLEROOTPREFIX");
acDoc.Editor.WriteMessage("\nRoamable-Path\t:{0}\n", roamablePath.ToString());
string pc3FileFound = HostApplicationServices.Current.FindFile("DAS-PDF.pc3", acCurDb, FindFileHint.Default);
string pmpFileFound = HostApplicationServices.Current.FindFile("DAS-PDF.pmp", acCurDb, FindFileHint.Default);
string plotStyleFileFound = HostApplicationServices.Current.FindFile("DAS-PDF.ctb", acCurDb, FindFileHint.Default);
acDoc.Editor.WriteMessage("\nPC3 Config\t:{0}\n", pc3FileFound);
acDoc.Editor.WriteMessage("\nPMP File\t:{0}\n", pmpFileFound);
acDoc.Editor.WriteMessage("\nCTB File\t:{0}\n", plotStyleFileFound);
//Start Copying:
string pmpFolder = "PMP Files";
string pc3Folder = "Plotters";
string plotStylesFolder = "Plot Styles";
try
{
File.Copy(pc3FileFound,
Path.Combine(roamablePath.ToString(),
pc3Folder, Path.GetFileName(pc3FileFound)),true);
File.Copy(pmpFileFound,
Path.Combine(roamablePath.ToString(),
pc3Folder, pmpFolder, Path.GetFileName(pmpFileFound)), true);
File.Copy(plotStyleFileFound, Path.Combine(roamablePath.ToString(),
pc3Folder, plotStylesFolder, Path.GetFileName(plotStyleFileFound)), true);
}
catch (System.Exception ex)
{
acDoc.Editor.WriteMessage("\n" + ex.Message);
}
// these prompts are only seen when running in interactive mode in autocad
// when they are run from the activity, they are passed in as part of the script (like parameters)
PromptResult result = acDoc.Editor.GetString("Enter PC3 File:");
if (result.Status != PromptStatus.OK) return;
string pc3FileName = result.StringResult;
result = acDoc.Editor.GetString("Enter CTB File:");
if (result.Status != PromptStatus.OK) return;
string ctbFileName = result.StringResult;
result = acDoc.Editor.GetString("Enter PDF Name :");
if (result.Status != PromptStatus.OK) return;
string pdfFileName = result.StringResult;
using (Transaction acTrans = acCurDb.TransactionManager.StartTransaction())
{
// Reference the Layout Manager
LayoutManager acLayoutMgr = LayoutManager.Current;
// Get the current layout and output its name in the Command Line window
Layout acLayout = acTrans.GetObject(acLayoutMgr.GetLayoutId(acLayoutMgr.CurrentLayout),
OpenMode.ForRead) as Layout;
using (OpenCloseTransaction oct = new OpenCloseTransaction())
{
using (PlotSettingsValidator plotSetVal = PlotSettingsValidator.Current)
{
acDoc.Editor.WriteMessage($"\nStyle sheet of current layout:{acLayout.CurrentStyleSheet}");
if (!acLayout.IsWriteEnabled)
{
acLayout.UpgradeOpen();
}
plotSetVal.RefreshLists(acLayout);
if (plotSetVal.GetPlotStyleSheetList().Contains(ctbFileName))
{
if (acCurDb.PlotStyleMode)
{
acDoc.Editor.WriteMessage($"\nThe plot style sheet is being set to {ctbFileName}");
plotSetVal.SetCurrentStyleSheet(acLayout, ctbFileName);
}
else
{
acDoc.Editor.WriteMessage("\nUnable to set plot style in drawing using stb\n\n");
}
}
}
oct.Commit();
}
PlotConfig acPlCfg = PlotConfigManager.SetCurrentConfig(pc3FileName);
string mediaName = acPlCfg.Comment;
// Get the PlotInfo from the layout
using (PlotInfo acPlInfo = new PlotInfo())
{
acPlInfo.Layout = acLayout.ObjectId;
// Get a copy of the PlotSettings from the layout
using (PlotSettings acPlSet = new PlotSettings(acLayout.ModelType))
{
acPlSet.CopyFrom(acLayout);
// Update the PlotSettings object
PlotSettingsValidator acPlSetVdr = PlotSettingsValidator.Current;
// Set the plot type
acPlSetVdr.SetPlotType(acPlSet, Autodesk.AutoCAD.DatabaseServices.PlotType.Extents);
// Set the plot scale
acPlSetVdr.SetUseStandardScale(acPlSet, true);
acPlSetVdr.SetStdScaleType(acPlSet, StdScaleType.ScaleToFit);
// Center the plot
acPlSetVdr.SetPlotCentered(acPlSet, true);
// Set the plot device to use
acPlSetVdr.SetPlotConfigurationName(acPlSet, Path.GetFileName(pc3FileName), acPlSet.CanonicalMediaName);
// Set the plot info as an override since it will
// not be saved back to the layout
acPlInfo.OverrideSettings = acPlSet;
// Validate the plot info
using (PlotInfoValidator acPlInfoVdr = new PlotInfoValidator())
{
acPlInfoVdr.MediaMatchingPolicy = MatchingPolicy.MatchEnabled;
acPlInfoVdr.Validate(acPlInfo);
// Check to see if a plot is already in progress
if (PlotFactory.ProcessPlotState == ProcessPlotState.NotPlotting)
{
using (PlotEngine acPlEng = PlotFactory.CreatePublishEngine())
{
// Track the plot progress with a Progress dialog
using (PlotProgressDialog acPlProgDlg = new PlotProgressDialog(false, 1, true))
{
using ((acPlProgDlg))
{
// Define the status messages to display
// when plotting starts
acPlProgDlg.set_PlotMsgString(PlotMessageIndex.DialogTitle, "Plot Progress");
acPlProgDlg.set_PlotMsgString(PlotMessageIndex.CancelJobButtonMessage, "Cancel Job");
acPlProgDlg.set_PlotMsgString(PlotMessageIndex.CancelSheetButtonMessage, "Cancel Sheet");
acPlProgDlg.set_PlotMsgString(PlotMessageIndex.SheetSetProgressCaption, "Sheet Set Progress");
acPlProgDlg.set_PlotMsgString(PlotMessageIndex.SheetProgressCaption, "Sheet Progress");
// Set the plot progress range
acPlProgDlg.LowerPlotProgressRange = 0;
acPlProgDlg.UpperPlotProgressRange = 100;
acPlProgDlg.PlotProgressPos = 0;
// Display the Progress dialog
acPlProgDlg.OnBeginPlot();
acPlProgDlg.IsVisible = true;
// Start to plot the layout
acPlEng.BeginPlot(acPlProgDlg, null);
// Define the plot output
acPlEng.BeginDocument(acPlInfo, acDoc.Name, null, 1, true, pdfFileName);
// Display information about the current plot
acPlProgDlg.set_PlotMsgString(PlotMessageIndex.Status, "Plotting: " + acDoc.Name + " - " + acLayout.LayoutName);
// Set the sheet progress range
acPlProgDlg.OnBeginSheet();
acPlProgDlg.LowerSheetProgressRange = 0;
acPlProgDlg.UpperSheetProgressRange = 100;
acPlProgDlg.SheetProgressPos = 0;
// Plot the first sheet/layout
using (PlotPageInfo acPlPageInfo = new PlotPageInfo())
{
acPlEng.BeginPage(acPlPageInfo, acPlInfo, true, null);
}
acPlEng.BeginGenerateGraphics(null);
acPlEng.EndGenerateGraphics(null);
// Finish plotting the sheet/layout
acPlEng.EndPage(null);
acPlProgDlg.SheetProgressPos = 100;
acPlProgDlg.OnEndSheet();
// Finish plotting the document
acPlEng.EndDocument(null);
// Finish the plot
acPlProgDlg.PlotProgressPos = 100;
acPlProgDlg.OnEndPlot();
acPlEng.EndPlot(null);
}
}
}
}
}
}
}
}
}
Your Activity using C# .NET core.
private async Task<string> SetupActivityAsync(string myApp)
{
Console.WriteLine("Setting up activity...");
var myActivity = $"{Owner}.{ActivityName}+{Label}";
var actResponse = await this.api.ActivitiesApi.GetActivityAsync(myActivity, throwOnError: false);
var activity = new Activity()
{
Appbundles = new List<string>()
{
myApp
},
CommandLine = new List<string>()
{
$"$(engine.path)\\accoreconsole.exe /i $(args[inputFile].path) /al $(appbundles[{PackageName}].path) /s $(settings[script].path)"
},
Engine = TargetEngine,
Settings = new Dictionary<string, ISetting>()
{
{ "script", new StringSetting() { Value = "CustomPlot\nDAS-PDF.pc3\nDAS-PDF.ctb\nresult.pdf\n" } }
},
Parameters = new Dictionary<string, Parameter>()
{
{ "inputFile", new Parameter() { Verb= Verb.Get, LocalName = "$(HostDwg)", Required = true } },
{ "outputFile", new Parameter() { Verb= Verb.Put, LocalName = "result.pdf", Required= true} }
},
Id = ActivityName
};
if (actResponse.HttpResponse.StatusCode == HttpStatusCode.NotFound)
{
Console.WriteLine($"Creating activity {myActivity}...");
await api.CreateActivityAsync(activity, Label);
return myActivity;
}
await actResponse.HttpResponse.EnsureSuccessStatusCodeAsync();
Console.WriteLine("\tFound existing activity...");
if (!Equals(activity, actResponse.Content))
{
Console.WriteLine($"\tUpdating activity {myActivity}...");
await api.UpdateActivityAsync(activity, Label);
}
return myActivity;
}
And, Workitem:
var workItemStatus = await api.CreateWorkItemAsync(new Autodesk.Forge.DesignAutomation.Model.WorkItem()
{
ActivityId = myActivity,
Arguments = new Dictionary<string, IArgument>() {
{
"inputFile",
new XrefTreeArgument() {
Url = DownloadUrl,
Verb = Verb.Get
}
}, {
"outputFile",
new XrefTreeArgument() {
Verb = Verb.Put, Url = UploadUrl
}
}
}
});

xamarin forms map's marker click event

I have a map with a single pin on it. as follows:
var map = new Map()
{
IsShowingUser = true,
HeightRequest = 100,
WidthRequest = 960,
VerticalOptions = LayoutOptions.FillAndExpand
};
and the pin location and label as follows:
var pin1 = new Pin();
pin1.Type = PinType.Place;
pin1.Position = position;
pin1.Label = "Ticket Number: " + Cache.Instance.Ticket.TicketNumber;
clicked event:
pin1.Clicked += delegate
{
uri = new Uri("http://maps.google.com/maps?daddr=" + position.Latitude + "," + position.Longitude);
Device.OpenUri(uri);
}
map loading:
var stack = new StackLayout { Spacing = 00 };
stack.Children.Add(map);
Content = stack;
when clicking on the pin marker, it opens an info window and clicking on the window and clicked event code triggers. It there any way to not show the info window and the event triggers as soon as I click on the marker?
Thanks
Use Map_PinClicked to handle the PinClick event, If you set e.Handled = true, then Pin selection doesn't work automatically. All pin selection operations are delegated to you.
In the Page:
map.PinClicked += Map_PinClicked;
// Selected Pin changed
map.SelectedPinChanged += SelectedPin_Changed;
map.InfoWindowClicked += InfoWindow_Clicked;
map.InfoWindowLongClicked += InfoWindow_LongClicked;
And then clickEvent:
void Map_PinClicked(object sender, PinClickedEventArgs e)
{
e.Handled = true;
uri = new Uri("http://maps.google.com/maps?daddr=" + position.Latitude + "," + position.Longitude);
Device.OpenUri(uri);
}
You can have a look at here for more information.
Currently with Xamarin.Forms 5, PinClicked event is designated as obsolete. Same goes for Device.OpenUri.
One can use pin1.MarkerClicked += Pin_Clicked; instead.
You can prevent the Info window from opening by setting the EventArgs's HideInfoWindow property to true.
docs.microsoft
private async void Pin_Clicked(object sender, PinClickedEventArgs e)
{
try
{
e.HideInfoWindow = true;
var pin = sender as Pin;
var uri = new Uri("http://maps.google.com/maps?daddr=" + pin.Position.Latitude + "," + pin.Position.Longitude);
Launcher.OpenAsync(uri);
}
catch (Exception ex)
{
//log error
}
}

Xamarin Maps Pins Invisible

I have a very strange issue where the map pins do not show up on the map.
I am using Xamarin.Forms.Maps
I am setting up a map with
map = new CustomMap(
MapSpan.FromCenterAndRadius(
new Position(37, -122), Distance.FromMiles(0.3)), this)
{
IsShowingUser = true,
HeightRequest = 100,
WidthRequest = 960,
VerticalOptions = LayoutOptions.FillAndExpand
};
Then I create an absolute layout and add map to it and set the absoluteLayout to be the content
var absoluteLayout = new AbsoluteLayout
{
BackgroundColor = Color.Red.WithLuminosity(0.9),
VerticalOptions = LayoutOptions.FillAndExpand
};
AbsoluteLayout.SetLayoutBounds(map, new Rectangle(0, 0, 1, 1));
AbsoluteLayout.SetLayoutFlags(map, AbsoluteLayoutFlags.All);
absoluteLayout.Children.Add(map);
absoluteLayout.Children.Add(btn);
Content = absoluteLayout;
I also add an initial pin to the map
PinInfo firstInfo = new PinInfo
{
pinId = "1",
Description = "First Description",
};
var pin = new Pin
{
Type = PinType.Place,
Position = position,
Label = "custom pin",
Address = "custom detail info",
BindingContext = firstInfo,
};
pin.Clicked += async (sender, e) =>
{
await DisplayAlert(pin.Label, "The address is: " + pin.Address, "Cancel");
};
map.Pins.Add(pin);
However, in the app I can see the map, but it is not zoomed to the initial area, adding pins does nothing, and I cannot see the initial Pin.
I've been trying to search online for a very long time now, but for some reason have not found anyone with a similar issue...
Any help is very much appreciated.
Depends on where you are placing your Pin. In other words, what is stored position?
Try the following after adding your Pin:
map.MoveToRegion(MapSpan.FromCenterAndRadius(position, Distance.FromMiles(0.3)));

Passing variables through navigateURL to open iFrame as3

By using NavigateURL I can easily pass variables as below through Flash to paypal, this works no problem and can include all the data required.
var req:URLRequest = new URLRequest("https://www.paypal.com/cgi-bin/webscr");
var reqVars:URLVariables = new URLVariables();
reqVars.cmd = "_xclick-subscriptions";
reqVars.business = "BUSINESS CODE";
reqVars.lc = "GR";
reqVars.item_name = "Product Name";
reqVars.item_number = "Product Number 0001";
reqVars.no_note = "1";
reqVars.no_shipping = "2";
reqVars.src = "1";
reqVars.a3 = "15.00";
reqVars.p3 = "1";
reqVars.t3 = "Y";
reqVars.currency_code = "EUR";
//and so on
req.data = reqVars;
req.method = URLRequestMethod.POST;
navigateToURL(req);
By using callIframe as shown below I can easily open an iFrame from Flash.
calliFrame("http://www.webAddress.com/" +"?iframe=true&width=800&height=550", "Page Title", "Page Description");
function calliFrame(url:String, title:String, desc:String):void{
if (ExternalInterface.available) {
trace("calling prettyPhoto");
try {
ExternalInterface.call('$.prettyPhoto.open', url, title, desc);
} catch (event:Error) {
trace("Error occurred!");
}
} else {
trace("External Interface unavailable");
}
}
Is it possible to pass the navigateURL variables through the calliFrame method? I've tried variations but not gotten to either transfer the data or show the page.
I hoped something like the example below would work but only get a blank page or list of the data shown in the iFrame:
calliFrame("https://www.paypal.com/cgi-bin/webscr" +reqVars +"?iframe=true&width=800&height=550", "Page Title", "Page Description");
Any help would be much appreciated, thanks in advance.
The second parameter is the window name, so all you gotta do is pass the name of your iframe.
public function navigateToURL(request:URLRequest, window:String = null):void
docs: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/package.html#navigateToURL()