Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

as3 javascript call (external interface

Posted on 2009-07-03
2
934 Views
Last Modified: 2013-11-11
I'm trying to make a javascript call in as3. Since the geturl command has gone Im using the

ExternalInterface.call command but it doesnt seem to work. IS there anything I'm missing? code below, thnx in advance. I've checked the trigger which is defintiely working
import com.digicrafts.events.*;
import flash.external.ExternalInterface;
import flash.external.*;
 
 
photo_mc.addEventListener(ItemEvent.CLICK,itemHandler);
 
 
function itemHandler(event:ItemEvent) {
	switch(event.type){
		case ItemEvent.CLICK:
		ExternalInterface.call("getbargain");
		break;
	}
}
 
 
 
flash.system.Security.allowDomain("www.mywebsite.com")

Open in new window

0
Comment
Question by:sousflai
2 Comments
 
LVL 39

Accepted Solution

by:
blue-genie earned 500 total points
ID: 24772346
is itemEvent from digicrafts?

does it go into the switch case?
your javascript function exists right?
0
 

Author Comment

by:sousflai
ID: 24772714
hi its all solved, it was swfobject which was causing a problem

thnx anyway
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question