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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:07:51+00:00 2026-05-18T01:07:51+00:00

Originally the AS3 script would trace some words for a certain string I typed

  • 0

Originally the AS3 script would trace some words for a certain string I typed in the textfield (ti). I want to know how to display and image, instead.

I know in AS2 it was loadMovie but I don’t know how to do this in AS3. And would the loadit in the newvid function be the movieclip that changes or something else? (O got that function newvid script off a website.)

ti.border = true
ti.addEventListener(TextEvent.TEXT_INPUT, onInput);

function onInput(event:TextEvent):void {
    if(ti.text.search('happyface')!=-1) newvid;
    else if(ti.text.search('sadface')!=-1) trace ('sadface.jpg');
}

function newvid() {
    var loadit = new Loader();
    addChild(loadit);
    loadit.load(new URLRequest("happyface.jpg"));
}
  • 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-18T01:07:52+00:00Added an answer on May 18, 2026 at 1:07 am

    Loader class lets you load another SWF or Image file. Once loaded your loadit object becomes another display object. You can fix it’s position, hide/show it or listen to it’s events. Following is a very comprehensive example of using Loader class

    http://www.republicofcode.com/tutorials/flash/as3loader/

    Also check out the example in Loader documentation for example.

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

Sidebar

Related Questions

Originally I thought to ask if there would be an easy way to provide
Originally there was the DAL object which my BO's called for info and then
Originally I though I'll just take a screenshot of my app on the iPhone
I originally asked this question on RefactorMyCode , but got no responses there... Basically
I originally asked this question , but in finding an answer, discovered that my
Note: Originally this question was asked for PostgreSQL, however, the answer applies to almost
This originally was a problem I ran into at work, but is now something
I originally used WebRequest and WebResponse to sent Http Post Messages. Always I got
I originally had an array[1..1000] that was defined as a global variable. But now
When I originally was introduced to Mocks I felt the primary purpose was to

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.