Solved

as3 javascript call (external interface

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
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 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.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

762 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

19 Experts available now in Live!

Get 1:1 Help Now