Solved

as3 javascript call (external interface

Posted on 2009-07-03
2
939 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
[X]
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
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

624 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