5 Replies - 2506 Views - Last Post: 03 January 2017 - 11:08 AM

#1 v_1994_g   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 28-December 16

1180: Call to a possibly undefined method ActionScript Flash

Posted 28 December 2016 - 12:43 AM

Attached ImageHello I need some urgent help for my project,
This project is already done by some one else now I am trying to build air file for my project(Windows Installer)
But I am getting following errors:

Bootstrap.as, Line 120 1180: Call to a possibly undefined method LineRed.
Bootstrap.as, Line 120 1180: Call to a possibly undefined method LineBlue.
Bootstrap.as, Line 121 1180: Call to a possibly undefined method LineRed.
Bootstrap.as, Line 121 1180: Call to a possibly undefined method LineBlue.


Please can some one help me to solve this issue. I urgently need some help.
please help me.

Is This A Good Question/Topic? 0
  • +

Replies To: 1180: Call to a possibly undefined method ActionScript Flash

#2 andrewsw   User is offline

  • never lube your breaks
  • member icon

Reputation: 6813
  • View blog
  • Posts: 28,186
  • Joined: 12-December 12

Re: 1180: Call to a possibly undefined method ActionScript Flash

Posted 28 December 2016 - 01:02 AM

Copy and paste the code directly here in the forum between code tags, not just as a screenshot.

"This project is already done by some one else " That's a curious statement, please elaborate.
Was This Post Helpful? 0
  • +
  • -

#3 v_1994_g   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 28-December 16

Re: 1180: Call to a possibly undefined method ActionScript Flash

Posted 28 December 2016 - 04:02 AM

This project is done by colleague . He has left the company, Now I am responsible for this project.
This is my code..


package com.pluralpu {
    import com.greensock.loading.core.DisplayObjectLoader;
    import com.pluralpu.controls.TextButton;
    import flash.display.DisplayObject;
    import flash.display.MovieClip;
    import flash.display.Sprite;
    import flash.text.TextField;
    import flash.text.TextFormat;

    public class Bootstrap {
        private static var textFieldFormat:TextFormat;
        private static var buttonFormat:TextFormat;
        private static var menuTitleFormat:TextFormat;
        private static var titleFormat:TextFormat;
        private static var modalContentsFormat:TextFormat;
        private static var adultGameFormat:TextFormat;
        
        private static var fontFamily:String = "PT Sans";
        
        public static function getTextFieldFormat():TextFormat {
            if (!textFieldFormat) {
                textFieldFormat = new TextFormat();
                textFieldFormat.font = fontFamily;
                //textFieldFormat.font = "PT Sans";
                textFieldFormat.size = 35;
            }
            
            return textFieldFormat;
        }
        
        public static function getButtonFormat():TextFormat {
            if (!buttonFormat) {
                buttonFormat = new TextFormat();
                buttonFormat.size = 24;
                buttonFormat.font = fontFamily;
                //buttonFormat.font = "Myriad Pro";
                buttonFormat.bold = true;
                buttonFormat.color = 0xFFFFFF;
                buttonFormat.align = "center";
            }
            
            return buttonFormat;
        }
        
        public static function getMenuPageTitleFormat():TextFormat {
            if (!menuTitleFormat) {
                menuTitleFormat = new TextFormat();
                menuTitleFormat.size = 55;
                menuTitleFormat.font = fontFamily;
                menuTitleFormat.color = 0xFFFFFF;
                menuTitleFormat.bold = true;
            }
            
            return menuTitleFormat;
        }
        
        public static function getTitleformat():TextFormat {
            if (!titleFormat) {
                titleFormat = new TextFormat();
                titleFormat.size = 50;
                titleFormat.font = fontFamily;
                titleFormat.color = 0x000000;
                titleFormat.bold = true;
                titleFormat.align = "center";
            }
            
            return titleFormat;
        }
        
        public static function getModalContentsFormat():TextFormat {
            if (!modalContentsFormat) {
                modalContentsFormat = new TextFormat();
                modalContentsFormat.size = 20;
                modalContentsFormat.font = fontFamily;
                modalContentsFormat.color = 0x000000;
                modalContentsFormat.bold = true;
				modalContentsFormat.align = "left";

				
            }
            
            return modalContentsFormat;
        }
        
        public static function getAdultGameFormat():TextFormat {
            if (!adultGameFormat) {
                adultGameFormat = new TextFormat();
                adultGameFormat.size = 50;
                adultGameFormat.font = fontFamily;
                adultGameFormat.color = 0x000000;
                adultGameFormat.bold = true;
                adultGameFormat.align = "center";
            }
            
            return adultGameFormat;
        }

        public static function get height():Number {
            return 768;
        }
        
        public static function get width():Number {
            return 1024;
        }
        
        public static function createTitle(parent:Sprite, text:String, inWidth:Number, yPos:Number):TextField {
            var titleText = new TextField();
            titleText.selectable = false;
            titleText.text = text;
            titleText.width = inWidth;
            titleText.setTextFormat(Bootstrap.getTitleformat());
            Utilities.centerX(titleText);
            titleText.y = yPos;
            parent.addChild(titleText);
            Bootstrap.getLinesForTextbox(parent, titleText, "RED");
            return titleText;
        }
        
        public static function getLinesForTextbox(parent:Sprite, target:TextField, color:String = "RED"):void {
            var lineLeft = color == "RED" ? LineRed() : LineBlue();
            var lineRight = color == "RED" ?LineRed() : LineBlue();
            lineLeft.y = lineRight.y = target.y + target.textHeight / 2 + 4;
            lineLeft.x = target.x - lineLeft.width;
            lineRight.x = target.x + target.width;
            parent.addChild(lineLeft);
            parent.addChild(lineRight);
        }
    }
	

}


Was This Post Helpful? 0
  • +
  • -

#4 ArtificialSoldier   User is online

  • D.I.C Lover
  • member icon

Reputation: 2365
  • View blog
  • Posts: 7,219
  • Joined: 15-January 14

Re: 1180: Call to a possibly undefined method ActionScript Flash

Posted 29 December 2016 - 03:41 PM

Where are LineRed and LineBlue supposed to be defined? The error says you're calling functions that aren't defined, so did you define those anywhere?
Was This Post Helpful? 0
  • +
  • -

#5 v_1994_g   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 28-December 16

Re: 1180: Call to a possibly undefined method ActionScript Flash

Posted 01 January 2017 - 11:14 PM

LineRed and LineBlue methods only exist on that piece of code , I have searched it in my project. There is no such method defined anywhere in my projects. LineRed and LineBlue method only exist in Bootstrap.as file.

Is it possible to have a call with you ?
Was This Post Helpful? 0
  • +
  • -

#6 ArtificialSoldier   User is online

  • D.I.C Lover
  • member icon

Reputation: 2365
  • View blog
  • Posts: 7,219
  • Joined: 15-January 14

Re: 1180: Call to a possibly undefined method ActionScript Flash

Posted 03 January 2017 - 11:08 AM

I don't do phone calls or Skype or whatever, I just post here. If those functions aren't defined then that's the reason for the error. What are those functions supposed to do? Maybe you should talk to whoever created it in the first place and try to figure out where those are defined.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1