Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > General > Best Practices

Reply
 
Thread Tools Rate Thread Display Modes
Old 12-04-2008, 06:10 PM   #1
jgladden
Registered User
 
Join Date: Dec 2008
Posts: 1
Default MVC View Error

I am using MVC (similar to Moock's Clock Example). In my view class I want to load an image based on a url passed in from my model. However if I try to declare a private var loader:Loader variable to load the image, I receive an error.

Any suggestions on how to fix this? Or more specifically why the error in the first place?

Example view code:

package shoegallery {

import shoegallery.*;
import mvc.*;

import flash.events.*;
import flash.net.URLRequest;
import flash.events.MouseEvent;
import flash.display.MovieClip;


/**
* Creates a user interface that can control a ShoeGalleryModel.
*/
class ShoeGalleryView extends AbstractView {

private var loader:Loader;
jgladden is offline   Reply With Quote
Old 12-08-2008, 05:34 AM   #2
Assertnfailure
as[org].addListener(this)
 
Assertnfailure's Avatar
 
Join Date: Dec 2005
Location: LA, California
Posts: 838
Default

You need to import the Loader...

import flash.display.Loader;
Assertnfailure is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Temp.as Error - One for the Archives jollyork ActionScript 3.0 1 11-18-2008 07:58 PM
Odd E4X Error in Parsing josh.e.stroud ActionScript 3.0 1 02-26-2008 12:03 PM
Error opening URL help den_m ActionScript 2.0 10 03-28-2007 05:07 PM
Model View Controller compuboy1010 ActionScript 2.0 0 07-14-2006 11:16 AM
check if text fields are empty and display error beccasaur ActionScript 2.0 5 08-31-2004 07:31 PM


All times are GMT. The time now is 04:04 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.