• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

1120: Access of undefined property

New Here ,
Mar 19, 2011 Mar 19, 2011

Copy link to clipboard

Copied

I have a clip inside another clip that I am trying to access a button from to load an external page (pop-up) and receive the 1120 Access of defined property error.

my ac3 code is located in my main (top level) clip as follows :

TiaraFrames_mc.TSofaQAFrm_btn.addEventListener(MouseEvent.CLICK,TSofaQAFrm);

function TSofaQAFrm(event:MouseEvent){

var TSofaQAFrmURL:String="TSofaQA.html";

var TSofaQAFrmWindow:String="newwindow";

var TSofaQAFrmFeatures:String="width=630, height=915, left=100, top=100, toolbar=0, location=0, menubar=0, toolbar=0, status=o, scrollbars=1";

ExternalInterface.call("openwindow", TSofaQAFrmURL, TSofaQAFrmWindow, TSofaQAFrmFeatures);

}

The error I receive is:

Scene 1, Layer 'Actions', Frame 1, Line 15   1120: Access of undefined property TiaraFrames_mc

I have checked and rechecked my naming and it all seems good.

I originally had the code in the imbedded clip however I don't believe the "Externalinterface.call" can be used from that location. Is that correct?

I have had success with this in other files where the button is located in the main clip.

Thanks

Paul

TOPICS
ActionScript

Views

2.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Mar 20, 2011 Mar 20, 2011

externalinterface can't be used in the flash test environment.  your swf must be embedded in a container html page.  externalinterface allows communication between that container html page and your swf.

p.s.  please mark helpful/correct responses.

Votes

Translate

Translate
Community Expert ,
Mar 20, 2011 Mar 20, 2011

Copy link to clipboard

Copied

click file/publish settings/flash and tick "permit debugging".  retest the following:


trace(TiaraFrames_mc.name);

trace(TiaraFrames_mc.TsofaQAFrm_btn.name);

TiaraFrames_mc.TSofaQAFrm_btn.addEventListener(MouseEvent.CLICK,TSofaQ AFrm);

function TSofaQAFrm(event:MouseEvent){

var TSofaQAFrmURL:String="TSofaQA.html";

var TSofaQAFrmWindow:String="newwindow";

var TSofaQAFrmFeatures:String="width=630, height=915, left=100, top=100, toolbar=0, location=0, menubar=0, toolbar=0, status=o, scrollbars=1";

ExternalInterface.call("openwindow", TSofaQAFrmURL, TSofaQAFrmWindow, TSofaQAFrmFeatures);

}


copy and paste the output including error message.  indicate the line of code mentioned in the error message.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 20, 2011 Mar 20, 2011

Copy link to clipboard

Copied

Thanks kglad,

That showed me I hadn't given TiaraFrames_mc an instance name. Once I did that got rid of the "1120: Access of undefined property error" however the button still won't work.

I get no errors testing the move however when I run Debug Movie and click on the button I get this:

Error: Error #2067: The ExternalInterface is not available in this container. ExternalInterface requires Internet Explorer ActiveX, Firefox, Mozilla 1.7.5 and greater, or other browsers that support NPRuntime.

at Error$/throwError()

at flash.external::ExternalInterface$/call()

at FrameStylesB_011211_fla::MainTimeline/TSofaQAFrm()[FrameStylesB_011211_fla.MainTimeline::frame1:23]

Cannot display source code at this location.

Thoughts?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 20, 2011 Mar 20, 2011

Copy link to clipboard

Copied

externalinterface can't be used in the flash test environment.  your swf must be embedded in a container html page.  externalinterface allows communication between that container html page and your swf.

p.s.  please mark helpful/correct responses.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 20, 2011 Mar 20, 2011

Copy link to clipboard

Copied

I have tested this in Dreamweaver and live from the server with no success. The button is recognized but will not access the page.

Should I pursue this in a Dreamweaver forum?

Thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 20, 2011 Mar 20, 2011

Copy link to clipboard

Copied

i would first suggest testing using your html published by flash so you can make sure your externalinterface and js code are correct.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 20, 2011 Mar 20, 2011

Copy link to clipboard

Copied

Thanks

I went back and adjusted the js to include:

<script language="javascript">

function openwindow (URL, windowname, windowfeatures){

window.open(URL, windowname, windowfeatures);

}

</script>

and it works great.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 20, 2011 Mar 20, 2011

Copy link to clipboard

Copied

LATEST

you're welcome.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines