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

  • Home
  • SEARCH
  • 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 6141917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:19:01+00:00 2026-05-23T18:19:01+00:00

I have a problem I cannot seem to solve. I am using AS3’s navigateToURL();

  • 0

I have a problem I cannot seem to solve. I am using AS3’s navigateToURL(); function to call a simple javascript function. At the moment it just alerts the first parameter. The problem is, when this function is placed inside of the $(document).ready(function(){..}) block it does not fire. Example of my code:

<script type="text/javascript">
  $(document).ready(function(){
    function mapLink(aVar){
      alert(aVar);
    };
  });
</script>

Example of simple AS3 call to function:

navigateToURL(new URLRequest('Javascript: mapLink("'+mapObject.tooltipMoreLink+'");'), '_self');

When the function is placed OUTSIDE of the jquery code, it works fine. Why does it need to be inside of the jquery code you may be asking? I need the jQuery DOM selectors to manipulate certain dom elements based on the value of ‘aVar’ in my javascript function.

Any guidance is welcomed with an open mind.

  • 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. Editorial Team
    Editorial Team
    2026-05-23T18:19:01+00:00Added an answer on May 23, 2026 at 6:19 pm

    eh. this is what the ExternalInterface class was designed for.

    You issue has to do with scope. Your function is scoped to the jquery object, and not globally, so it is invisible to your call. If you need jquery selectors, then you could easily set the flash var independently, followed by the jquery routine.

    update

    maybe I’m missing something, but shouldn’t this be as be easy as:

    function externalCall(param){
    
         $(domElement).doSomething(param);
    
    }
    

    ?

    I wouldn’t think this need be tied to the jq ready function. I mean, if flash has already loaded, and the user is interacting, then certainly the ready event has long since fired successfully.

    Hope that helps. I’m not sure I’m following exactly what you’re trying to do 😉

    …
    btw – I really would look into ExternalInterface, NavToURL may work, but you can call your js directly with the former method.

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

Sidebar

Related Questions

I have a simple problem that i cannot solve. I have a dictionary: aa
I have a problem with an MVC view that I just cannot seem to
I have a problem I cannot seem to solve. I have a php and
I am having quite a tricky problem, which i just cannot seem to solve.
I have a problem that I cannot seem to solve. I am building a
I have a very simple problem but cannot find a nice solution. I have
I have what I think is a fairly common problem, but I cannot seem
I researched this around and still can't seem to solve this problem. I have
I have a small problem that I cannot seem to wrap my head around
I am having an annoying problem that I cannot seem to fix. I have

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.