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 6717775
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:53:31+00:00 2026-05-26T08:53:31+00:00

what I’m trying to do is accessing snapText = scrollPane.source.textSnapshot; from an external swf.

  • 0

what I’m trying to do is accessing

   snapText = scrollPane.source.textSnapshot;

from an external swf. I’ve tried:

  trace("-->: "+scrollPane.source.textSnapshot.getText(0, 1000));
  trace("-->: "+myLoader.content.textSnapshot.getText(0, 1000));
  trace("-->: "+mc.textSnapshot.getText(0, 1000));
  trace("-->: "+mc.getChildAt(0).textSnapshot.getText(0, 1000));
  trace("-->: "+mc.getChildByName(myLoader).textSnapshot.getText(0, 1000) );
  trace("-->: "+scrollPane.content.textSnapshot.getText(0, 100));

all of which were fruitless. BTW:

  mc.getChildAt(0).textSnapshot.getText(0, 1000)

throws the error:

  1119: Access of possibly undefined property textSnapshot through a reference with static type flash.display:DisplayObject.

although I know the method is there.

all of the above code is run in the function checkHandler:

 myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, checkHandler);

so the swf should have been completly loaded.
The text is also there, I’ve checked with an swf decompiler.
the movieclip with the loader is created like this

 scrollPane = MovieClip(root).scrollPaneOnStage;
 myLoader.load(new URLRequest("tmp1.swf"));
 mc.addChild(myLoader);
 scrollPane.source = mc;

thanks in advance!

UPDATE – still not resolved

I’m now accessing the swf as pointed out by HotN.

  function checkHandler(evt:Event):void {

         libMC  = evt.target.content as MovieClip;
         libMC.gotoAndStop(0); 
          trace(libMC.textSnapshot.getText(0, 100));
         snapText = libMC.textSnapshot;
        scrollPane.source = mc;
    }

This resulted at first in an error, because the loader in an as3 script cant load an as2 movie (ie. AVM1). so I created an AVM2 swf which led to the error: Error #2000: No active security context. As a solution I used a class from http://www.igorcosta.org/?p=231 to load the swf, but still cant access the textSnapshot:

  trace(libMC.textSnapshot.getText(0, 100));

doesnt return anything and doesnt throw an error!

BTW: while I could change the format of the swf, I cant really change the file itself since it’s automatically generated.

  • 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-26T08:53:31+00:00Added an answer on May 26, 2026 at 8:53 am

    So this has taken me enterily too long, but I got it figured out.

          //... {
    
            loader = new Loader();  
            loader.contentLoaderInfo.addEventListener(Event.COMPLETE, checkHandler);
            loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onError);
            var context:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain); 
            context.checkPolicyFile = false;
            loader.load(new URLRequest("tmp1.swf"), context);
    
    
          //..... }
    
          function checkHandler(evt:Event):void {
    
            loader.contentLoaderInfo.removeEventListener(Event.COMPLETE,checkHandler);
    
            libMC  = loader.content as MovieClip;
    
                        //works now!
                libMC.textSnapshot.getText(100, 200);
    
            scrollPane.source = libMC;
    
    
        }
    

    so the trick was using the standard loader function like suggested so many times. however flash somehow messes up the security/sandbox settings on my local pc, which resulted in a Error #2000: No active security context. however it still worked fine when uploaded to a remote server, which is strange. you can set the local playback settings to “access local files only” under File > Publish Settings, but that didnt help at all in my case…

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

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
Does anyone know how can I replace this 2 symbol below from the string

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.