Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

as3 javascript call (external interface

Posted on 2009-07-03
2
Medium Priority
?
945 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 1500 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

Industry Leaders: 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

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…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.

824 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