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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:21:02+00:00 2026-05-25T21:21:02+00:00

I have a class called S3Uploader which extends Sprite, which has a private function

  • 0

I have a class called S3Uploader which extends Sprite, which has a private function init, which looks sometihng like this:

private function init(signatureUrl:String,  
                              prefixPath:String, 
                              fileSizeLimit:Number,
                                queueSizeLimit:Number,
                              fileTypes:String,
                              fileTypeDescs:String,
                              selectMultipleFiles:Boolean,
                                buttonWidth:Number,
                                buttonHeight:Number,
                                buttonUpUrl:String,
                                buttonDownUrl:String,
                                buttonOverUrl:String
                                ):void { 
//do stuff

}

In my flex app, I am trying to display the sprite and call the init function when the app is loaded. my code so far is this:

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
               xmlns:s="library://ns.adobe.com/flex/spark" 
               xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
                initialize="init();">
    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <fx:Script>
        <![CDATA[
            import S3Uploader;

            function init() {   
                var s3upload:S3Uploader = new S3Uploader();
                s3upload.init('/s3_uploads2.xml', '', 524288000, 100, '*.*', 'All Files', true, 100, 30, '/images/upload-button.png', '/images/upload-button.png', '/images/upload-button.png');
                uploader.addChild(s3upload);
            }
        ]]>
    </fx:Script>
    <s:SpriteVisualElement id="uploader" />
</s:Application>

however, on the line where i call s3upload.init, i get a 1195 error saying “1195: Attempted access of inaccessible method init through a reference with static type S3Uploader.”

When i looked up this error, it seems like almost everyone getting this was trying to call a function with set or get. However, I am not doing this and i have no idea why i am getting this error. Does anyone know what I am doing wrong?

  • 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-25T21:21:02+00:00Added an answer on May 25, 2026 at 9:21 pm

    You should learn the basics of OOP. You cannot call private functions from not within function owner objects. Mark it as public.

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

Sidebar

Related Questions

I have a class called Foo that has a function that looks like the
I have a class called Foo that looks like this: class Foo < ActiveRecord::Base
I have a class called User with static function loginRequired(), which returns false if
I have one class called Person that basically looks like: public class Person {
I have a class called Deal. Deal has vote_scores. I would like to see
I have a class called Continent and Country. Continent class has Country collection: private
I have a class called SparseMatrix which contain a private vector of type Cell.
I have a class called IssuesView which implements INotifyPropertyChanged . This class holds an
I have a class called Questions . This Questions has properties QuestionID and QuestionAnswer
I have a class called imageResizing. It has a member, MAX_WIDTH_ORIGINAL_IMG which is defined

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.