Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 46057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T15:54:23+00:00 2026-05-10T15:54:23+00:00

Is it possible to get the x,y coordinates of a Flex app within an

  • 0

Is it possible to get the x,y coordinates of a Flex app within an HTML page? I know you can use ExternalInterface.ObjecID to get the ‘id attribute of the object tag in Internet Explorer, or the name attribute of the embed tag in Netscape’ but I can’t seem to get past that step. It seems like it should be possible to get a handle on that embed object. Any suggestions?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T15:54:23+00:00Added an answer on May 10, 2026 at 3:54 pm

    I think the easiest thing to do is to include some kind of JavaScript library on the HTML page, say jQuery, and use it’s functions for determining the position and size of DOM nodes. I would do it more or less like this:

    var jsCode : String = 'function( id ) { return $('#' + id).offset(); }';  var offset : Object = ExternalInterface.call(jsCode, ExternalObject.objectID);  trace(offset.left, offset.top); 

    Notice that this is ActionScript code, but it runs JavaScript code through ExternalInterface. It uses jQuery and in particular its offset method that returns the left and top offset of a DOM node.

    You could do without jQuery if you looked at how the offset method is implemented and included that code in place of the call to jQuery. That way you wouldn’t need to load jQuery in the HTML and the Flex app would be self-contained. The reason I suggest to use a library like jQuery is that browsers do these things differently. I’m not sure if calculating offsets is very different from browser to browser, but it doesn’t hurt to be insulated from browser differences.

    The JavaScript in my example is an anonymous function so that the ID of the embed/object tag can be passed in to it as a parameter to ExternalInterface.call, but you could just use string concatenation if you want:

    var jsCode : String = '$('#' +' + ExternalInterface.objectID + ').offset()';  var offset : Object = ExternalInterface.call(jsCode); 

    That would work too, I just think the first version is more elegant.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 66k
  • Answers 66k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer You can do it with just metadata, there's a good… May 11, 2026 at 11:25 am
  • added an answer Go to Tools --> Options --> Text Editor --> CSS… May 11, 2026 at 11:24 am
  • added an answer For latex, use the inputenc option: \usepackage[utf8]{inputenc} Instead of utf8,… May 11, 2026 at 11:24 am

Related Questions

Is it possible to get the x,y coordinates of a Flex app within an
Is it possible to get the text of an OleDbCommand with all parameters replaced
Is it possible to get the originating port from an ActionExecutingContext object? If so,
Is it possible to get the current source line number in Perl? The equivalent
Is it possible to get the expiry DateTime of an HttpRuntime.Cache object? If so,
Is it possible to get the name of the currently logged in user (Windows/Unix)
Is it possible to get the value from the first page to the second
Is it possible to get the equivalent of the focus and blur events that
In Scala, is it possible to get the string representation of a type at
Is it possible to get access to the spell checker that is incorporated in

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.