The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.


Results 1 to 5 of 5

Thread: Type-Not- Found Error for a type not in File!

  1. #1

    Type-Not- Found Error for a type not in File!

    I am currently getting Error 1046: Type was not found or was not a compile-time constant: HTMLLoader.

    The main problem I am having is that I removed all references to HTMLLoader earlier (because I know HTMLLoader only works with AIR). I don't know why I am still getting this error.

    This is my code:
    Code:
    package 
    {
        import com.swfjunkie.tweetr.Tweetr;
        import com.swfjunkie.tweetr.data.objects.StatusData;
        import com.swfjunkie.tweetr.events.TweetEvent;
        import com.swfjunkie.tweetr.utils.TweetUtil;
        
        import com.swfjunkie.tweetr.oauth.OAuth;
        import com.swfjunkie.tweetr.oauth.events.OAuthEvent;
        
        import flash.display.Sprite;
        import flash.display.StageAlign;
        import flash.display.StageScaleMode;
        import flash.filters.DropShadowFilter;
        import flash.text.StyleSheet;
        import flash.text.TextField;
        
    
        public class newone extends Sprite 
    {
     
            public function newone()
            {
                //ViewSource.addMenuItem(this, "srcview/index.html");
                stage.scaleMode = StageScaleMode.NO_SCALE;
                stage.align = StageAlign.TOP_LEFT;
                init();
            }
            /**
             * @private
             * Initializes the instance.
             */
            private function init()
            {
                oauth = new OAuth();
                oauth.consumerKey = "yydFeOifgvJqu54rr9F1nA";
                oauth.consumerSecret = "58ACu8fw0HTkxj3gx7MfxavTCaY5GfJ0TuxCWlncohc";
                oauth.callbackURL = "http://www.creamandtwosugars.net/tweetr/verified.html";
                oauth.pinlessAuth = true;
                
                oauth.addEventListener(OAuthEvent.COMPLETE, handleOAuthEvent);
                oauth.addEventListener(OAuthEvent.ERROR, handleOAuthEvent);
                
                oauth.getAuthorizationRequest();
                
                tweetr = new Tweetr();
                tweetr.serviceHost = "labs.swfjunkie.com/tweetr/proxy";
                
                tweetr.addEventListener(TweetEvent.COMPLETE, handleTweetsLoaded);
                tweetr.addEventListener(TweetEvent.FAILED, handleTweetsFail);
                    
                tweetr.getPublicTimeLine();
            }
            
            private var tweetr:Tweetr;
            private var oauth:OAuth;
    /**
             * @private
             * Show a Tweet
             */ 
            private function showTweet(tweet:StatusData):void
            {
                var bg:Sprite = new Sprite();
                bg.graphics.lineStyle(1, 0x888888,1,true);
                bg.graphics.beginFill(0,.4);
                bg.graphics.drawRoundRect(0, 0, 350, 200, 15, 15);
                bg.graphics.endFill();
                bg.filters = [new DropShadowFilter(7, 45, 0, .6, 4, 4, 1, 1)]; 
                
                /*var styles:StyleSheet = new StyleSheet();
                styles.setStyle(".tweet", {color: "#FFFFFF", fontFamily: "Georgia", fontSize: "12"});
                styles.setStyle(".age", {fontStyle: "italic", fontSize: "10"});*/
                
                var textField:TextField = new TextField();
                textField.width = 310;
                textField.wordWrap = true;
                textField.multiline = true;
                textField.text = tweet.text;
                
                bg.height = (textField.height < 100) ? 120 : textField.height + 20;
                bg.x = stage.stageWidth/2 - bg.width/2;
                bg.y = stage.stageHeight/2 - bg.height/2;
                textField.x = bg.x + 20;
                textField.y = bg.y + 20;
                
                addChild(bg);
                addChild(textField);
            }
    
    private function handleTweetsLoaded(event:TweetEvent):void
            {
                var tweet:StatusData = event.responseArray[0] as StatusData;
                showTweet(tweet);
            }
            
            private function handleTweetsFail(event:TweetEvent):void
            {
                trace("ERROR: "+event.text);
            }
            
            private function handleOAuthEvent(event:OAuthEvent):void
            {
                
                if (event.type == OAuthEvent.COMPLETE)
                {
                    // removes the authentication window
                    //stage.nativeWindow.close();
             
                    tweetr.oAuth = oauth;
             
                    // prints username, user id and the final tokens
                    trace(oauth.toString());
                }
                else
                {
                    trace("ERROR: "+event.text);
                }
            }
        }
    }
    I am trying to use the Tweetr library in this project.

    Please, I'd appreciate any help I can get on this. I'd like to finish this project by tomorrow. Thanks!

  2. #2
    Shouldn't that error have a line number? What's on the line it specifies?

  3. #3
    It doesn't give me any line numbers. It's the weirdest thing.

  4. #4
    TheCanadian's Avatar
    10,305
    posts
    Noo doot aboot it, eh?
    Proud Montanadian
    We tolerate living and breathing. And niches.

    Name Brand Watches

    Maybe getTimer() or TweenMax is the answer to your problem . . .

  5. #5
    Scrap your project and remake it.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012