Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > Desktop, Mobile and non-browser Environments > AIR (Apollo)

Reply
 
Thread Tools Rate Thread Display Modes
Old 02-07-2008, 05:48 PM   #1
glidealong
Registered User
 
Join Date: Feb 2006
Location: India
Posts: 7
Send a message via MSN to glidealong Send a message via Yahoo to glidealong
Default Integrating Flex, HTML, Javascript in AIR

Hello all,
I am not sure if my post fits a flex forum. but then if it doesn't fit here it wont fit any place either.
I am working on an AIR application which integrates works of different people in our team. The different types of work consits of HTML pages, javascript code, flex movies(swf). There are two things in which I am stuck.
1. I want to embed my swf into the html page and invoke certain methods registered with ExternalInterface.adCallback api. I tried the normal <object> and <embed> tags and the script method to put the swf into the html. I can' detect the swf object to invoke the method callbacks.
2.This is a bit more confusing. I'll try to explain myself clear. I build an AIR application by importing a flex application as an swc, into an AIR project using flex builder. Once my swf is ready in the bin folder i take this swf into my master air project in aptana, since i want a combination of html,javascript,swf in the final application. But the issue is that i cannot see the component i imported into the air application in flex builder. But if i embed an swf movie created as a flex project, it works fine.
Is there anything wrong in my work flow? . it seems i am over engineering things. but i dont see any other obvious way of getting what i want.

Thanks in advance

Added: Thank you for moving the post to the appropriate forum. i missed this forum in the first place.

Last edited by glidealong; 02-08-2008 at 04:26 AM..
glidealong is offline   Reply With Quote
Old 02-13-2008, 08:56 AM   #2
glidealong
Registered User
 
Join Date: Feb 2006
Location: India
Posts: 7
Send a message via MSN to glidealong Send a message via Yahoo to glidealong
Default

OK.. let me put it a bit more simpler.
Does anybody know a way to embed an air application created using flex builder (swf output) into an air application created using AJAX/HTML in Aptana.?

The first issue has been solved. I had to remove the AC_FL_RunContent() method added by dreamweaver and use the following javascript method to access the swf object. That's it.

Code:
 function getFlashMovie(movieName) {
 if (window.document[movieName]) 
  {
      return window.document[movieName];
  }
  if (navigator.appName.indexOf("Microsoft Internet")==-1)
  {
    if (document.embeds && document.embeds[movieName])
      return document.embeds[movieName]; 
  }
  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
  {
    return document.getElementById(movieName);
  } 		
 }
glidealong is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Flash, JavaScript and the HTML DOM (dHTML) drZoode HTML and JavaScript 10 08-21-2008 07:59 PM
getURL javascript call fails in flash but not html elf2112 ActionScript 2.0 4 11-28-2005 06:18 PM
How can I set variable to ID a keyframe to display from Javascript in html doc? AspenMedia ActionScript 2.0 1 09-21-2005 01:16 AM
external as file with html links open javascript window guernica ActionScript 1.0 (and below) 1 03-28-2002 03:33 AM
Dynamic Text Boxes Set To HTML (javascript: links) JV ActionScript 1.0 (and below) 0 05-02-2001 04:38 PM


All times are GMT. The time now is 05:18 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.