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

The Archive Base Latest Questions

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

A section of a Flash animation I’m creating involves an area where people can

  • 0

A section of a Flash animation I’m creating involves an area where people can write on a notepad, save their work and update it at a later time. The file will be downloaded by users before they run it, rather than from a webpage. Here is the code I have so far:

import flash.events.MouseEvent;
import flash.net.FileReference;
import flash.display.MovieClip;
import flash.events.Event;

stop();

var MyNotes:FileReference = new FileReference()


Save_btn.addEventListener (MouseEvent.CLICK, SaveText);

function SaveText(Event:MouseEvent):void {
MyNotes.save(TypeOwn_txt.text, "MyNotes.txt");
}

Load_btn.addEventListener (MouseEvent.CLICK, LoadText);

function LoadText(Event:MouseEvent):void {
MyNotes.addEventListener(Event.SELECT, onFileSelected);
var swfTypeFilter:FileFilter = new FileFilter("Text Files","*.txt; .html;*.htm;*.php");
var allTypeFilter:FileFilter = new FileFilter("All Files (*.*)","*.*");
MyNotes.browse([swfTypeFilter, allTypeFilter]);
}

function onFileSelected(event:Event):void
{
trace("onFileSelected");
MyNotes.addEventListener(Event.COMPLETE, onFileLoaded);
MyNotes.load();
}

function onFileLoaded(event:Event):void
{
var fileReference:FileReference=event.target as FileReference;
var data:ByteArray=fileReference["data"];
TypeOwn_txt.text=data.toString();
}

The problem is I receive a “Symbol ‘Structure Summary’, Layer ‘Actions’, Frame 29, Line 19 1119: Access of possibly undefined property SELECT through a reference with static type flash.events:MouseEvent.
” in regards to the line “MyNotes.addEventListener(Event.SELECT, onFileSelected);”. I’ve done some research and understand this is something to do with the parent not being identified as a MovieClip, or something along those lines. I’m still not sure, however I don’t have a clue how to proceed! 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. Editorial Team
    Editorial Team
    2026-05-31T08:07:05+00:00Added an answer on May 31, 2026 at 8:07 am

    Just to let you know the problem is solved, although I really don’t know how. I used this site for a template and worked backwards. I’ll put in the working Code below in case it’s of use to somebody else.

    import flash.events.MouseEvent;
    import flash.net.FileReference;
    import flash.net.FileFilter;
    import flash.utils.ByteArray;
    import flash.events.MouseEvent;
    import flash.events.Event;
    import flash.events.IOErrorEvent;
    import flash.display.MovieClip;
    
    var myNotes:FileReference;
    
    Load_btn.addEventListener(MouseEvent.CLICK, onLoadClicked);
    
    function onLoadClicked(event:MouseEvent):void
    {
        trace("onBrowse");
        myNotes=new FileReference();
        myNotes.addEventListener(Event.SELECT, onFileSelected);
        var swfTypeFilter:FileFilter = new FileFilter("Text Files","*.txt; *.html;*.htm;*.php");
        var allTypeFilter:FileFilter = new FileFilter("All Files (*.*)","*.*");
        myNotes.browse([swfTypeFilter, allTypeFilter]);
    }
    
    
    function onFileSelected(event:Event):void
    {
        trace("onFileSelected");
    
        myNotes.addEventListener(Event.COMPLETE, onFileLoaded);
        myNotes.addEventListener(IOErrorEvent.IO_ERROR, onFileLoadError);
        myNotes.load(); 
    }
    
    function onFileLoaded(event:Event):void
    {
        var fileReference:FileReference=event.target as FileReference;
        var data:ByteArray=fileReference["data"];
        textArea.text=data.toString();
        myNotes.removeEventListener(Event.COMPLETE, onFileLoaded);
        myNotes.removeEventListener(IOErrorEvent.IO_ERROR, onFileLoadError);
    }
    
    function onFileLoadError(event:Event):void
    {
        myNotes.removeEventListener(Event.COMPLETE, onFileLoaded);
        myNotes.removeEventListener(IOErrorEvent.IO_ERROR, onFileLoadError);
    
        trace("File load error");
    }   
    
    Save_btn.addEventListener (MouseEvent.CLICK, SaveText);
    
    function SaveText(Event:MouseEvent):void {
        myNotes=new FileReference();
        myNotes.save(textArea.text, "MyNotes.txt");
    }
    

    Thanks to everyone who contributed.

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

Sidebar

Related Questions

Has anyone here created a Flash site or application that is ADA (Section 508)
on this code, which loads flash onmouseenter, how can i get some kind of
I'm building a flash site that uses video transitions to go from section to
Can jquery interact with XML like Flash do. I want to make random text
I'm creating a slideshow where each slide can have: - a video or a
Section 4.2 of the draft OAuth 2.0 protocol indicates that an authorization server can
Flash CS4, AS2 I am making a Flash tour. I have 3 sections: About,
.section .data astring: .asciz 11010101 format: .asciz %d\n .section .text .globl _start _start: xorl
.section .data msgI: .ascii x = y\n msgI_end: msgM: .ascii x > y\n msgM_end:
The section Last links in the chain: Stashing and the reflog in http://ftp.newartisans.com/pub/git.from.bottom.up.pdf recommends

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.