Solved

as3 javascript call (external interface

Posted on 2009-07-03
2
929 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

919 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now