Professional :: Lost In Public Method

Jul 12, 2010

I have a MainClass on a FLA file that defines both public, private, statics or not, properties and methods.I also have a package named 'components' that stocks Sprite sub-classes for my movie exportable clips. In one of them, I use the "this.root" property to access my main class instance elements at runtime.When I access public method references, same thing, I can trace them and have a true reponse to the question : [myPublicMethod is Function] ? BUT, when I want to execute the public methods, like MainClass (this.root). myPublicMethod(), the compiler boldly throws this at me :Error 1195: Attempted access of inaccessible method myPublicMethod through a reference with static type MainClass.

View 1 Replies


Similar Posts:


Actionscript 3.0 :: Make A Public Static Method Call Another Method, But Flash Throws Error 1180?

Feb 19, 2010

I'm tryng to make a public static method call another method, but Flash throws error 1180, sayng that the method called by the static method is undefined.

Code: Select allpackage
{
import flash.display.MovieClip;[code]....

View 2 Replies

AS3 :: Flash - Inaccessible Method - Everything Is Explicitly Public?

Mar 3, 2011

In Flash CS5 I'm getting 1195: Attempted access of inaccessible method testFunc through a reference with static type Doc. when compiling and can not understand the circumstances, which I have boiled down thoroughly.

MyDoc.as - My document class.

package {
import flash.display.MovieClip;
public class MyDoc extends MovieClip {

[code]....

I can get an error-free compile if I take the seemingly unrelated TLF text box out of the equation, either by changing it to a classic text box, deleting it, or unlinking its containing MC from MyClass.
I can also get rid of the error by removing myOtherFunc()'s definition or moving it below myFunc()'s, which I had to do a few times just to convince myself that it was true.

Update: I just confirmed the same behavior on a friend's version of CS5. He's using a Mac as opposed to my Windows setup, and he only has the CS5 version installed, whereas I have both CS5 and CS4.

View 1 Replies

Flex :: Call A Method When A Public Property Changes?

May 12, 2011

If I have a .mxml file that has a method in it and a public property, can I have the method execute whenever the property changes.

<?xml version="1.0" encoding="utf-8"?>
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>

[Code].....

In another .mxml file I have added this .mxml file like so:

<viewComponents:MyViewComponent myProperty="{myVariable}" />

View 3 Replies

ActionScript 3.0 :: Access A Public Method In (swf) New ApplicationDomain?

Jul 29, 2009

How to access a public method in the swf loaded in a new ApplicationDomain?

ActionScript Code:
var appDomainA:ApplicationDomain = new ApplicationDomain();
*
var contextA:LoaderContext = new LoaderContext(false, appDomainA);
var loaderA:Loader = new Loader();
loaderA.load(new URLRequest("application2.swf"), contextA)

I want to access a public method in application2.swf from the main swf that loaded it.

View 8 Replies

ActionScript 3.0 :: Public Function Inaccessible Method Error

Nov 20, 2010

I have two classes that I am trying to get to intereact, main.as which is the class attached to the stage and then light_mc.as which is attached to a movieclip.

I have a function in main that I would like to access in light_mc. I have set it up so main stores "this" in a variable called instance so I can easily access the functions within main.

Here is the code the main.as

Code:
package
{
import flash.utils.Timer;

[Code].....

View 6 Replies

Flash :: Expose A Method In An Interface Without Making It Public To All Classes?

Nov 7, 2009

I have a issue where I'm working with a particular interface for quite a lot of things. However, I have a particular method that I want to be available only to a particular group of classes (basically, an internal method). [code]...

View 4 Replies

ActionScript 3.0 :: Know Public Method's Call Has Been Made From Outside / Inside Class?

Jul 16, 2009

I have to know if a public method has been called from outside the class or from inside. The reason is that depending on this, one of the actions to be executed in this method vary a bit.

View 3 Replies

ActionScript 2.0 :: Difference Between Private And Public Method In Custom Class

Jun 12, 2007

I have this sample class
Code:
class TestPrivate{
public function TestPrivate(){};
private function getGo(){
trace("can execute");
}}

And then after instantiate I just calling the method...for testing the "public" and "private" keyword purposing only...

Code:
import TestPrivate;
var obj1 = new TestPrivate();
obj1.getGo();

The result is still can be execute even though I put the private keyword in front of the methods. So what's the private keyword stands for actually...I thought it prevent been get accessed from outside...

View 2 Replies

Actionscript 3 :: Overriding Public Method In Dynamically Loaded Class And GetDefinitionByName()

Aug 22, 2010

I have two SWFs: main.swf and external.swf. main.swf needs to access some methods in external.swf, so it loads external.swf into itself and uses getDefinitionByName("package.Class") to access the class and one of its methods:

var ExternalClass = getDefinitionByName("package.Class") as Class;
var ClassInstance = new ExternalClass();
var NeededFunction:Function = ClassInstance["NeededFunction"] as Function;
var response:String = NeededFunction(param);

Now, I need to extend the functionality of NeededFunction (which is a public method)... I know it's possible to override public methods, but how would I go about this with a dynamically loaded class?

I was thinking I could do something like this, but it doesn't work:

var ClassInstance["NeededFunction"] = function(param1:uint):String {
var newString = "Your number is: "+param1.toString(); //New functionality
return newString;
}

View 2 Replies

Actionscript 3 :: Flex 4 Accessing Public Method In Main Application From Component

Sep 13, 2010

I need to be able to call a method from a component located under the main application in Flex 4. Can anyone tell me please how to do this without using FlexGlobals please?[code]

View 3 Replies

Professional :: Lost My Project (.fla) But Got (.flv)

Aug 4, 2011

My problem is that my old computer *exploded* last week and i was making a project for my dad so I lost my (.fla) file. But, I have an animation of that same project in (.swf) on my USB Key because I've exported it just before my computer crash just to watch what It was looking like. So my question is, is it possible to open my (.swf) in Flash Pro and get all my snippet code back and all my frame back and everything else (like if it was my (.fla) project?)

View 3 Replies

Professional :: Lost As To Where To Start With A Project?

Apr 12, 2010

I need to add 2 JPG images to the front of a video and then reupload it as YouTube video. I downloaded the video from YouTube as both a FLV and a MP4 file. Is Flash the best program to add the graphics? If so, how do I get it back to FLV or MPG format? Do I need to get the orginal file from my distributor?

View 1 Replies

Professional :: SWF Functionality Lost With Www Prefix In Url?

Feb 23, 2011

I have a website which has a swf as a horizontal menu. When the website is opened as[URL] the functionality of the swf does not work i.e. the links contained within the buttons aren't executed on click. However, if you enter the address as h[URL] the links work exactly as they should. I have contacted my host for clues but because I don't know exactly what I am asking for, the help offered is of a 'have your cleared your cookies' variety.

View 11 Replies

Flash :: Professional - Lost The Control Bar In 8

Dec 6, 2011

I have created a video with a control bar in Flash 8. When I run the .swf file by itself (in Flash player or IE) the control bar is there but when I add it to my web page the control bar is missing.

[CODE]...

View 4 Replies

ActionScript 3.0 :: Flash OOP - Add Own Custom Property To The Flash.display.Bitmap Using A Public Static Method?

Jan 3, 2011

Is it possible to add my own custom property to the flash.display.Bitmap using a public static method? I'm trying to write a bitmap utility that does something to a bitmap, and stores a Number property onto it afterwards.

[Code]....

I'm still learning AS3.0 OOP, I think that this can't be done with this method. I think I have to make a new Class that extends 'Bitmap', add the prop there, and then in the Main.as make a new instance of that class, point to the target Bitmap, and run the method in the extended 'Bitmap' class (?).

View 6 Replies

Professional :: Lost Theme Music - Any Way To Track Down?

Apr 27, 2010

I have a large Flash site. Inside one of the frames I've placed an MP3 track as a theme tune. I now cant find where it is. Is there a way to track down the theme tune so it can be removed from the site?

View 1 Replies

Professional :: Fullscreen Mode Minimizes When Focus Is Lost?

Nov 8, 2008

I'm trying to watch a flash video in fullscreen mode on a second monitor but whenever I click anything that causes the flash video to lose focus the video minimizes and goes to it's normal size. Is there a fix for this? or at least a way to zoom in on the video so its nearly fullscreen? neither IE8 or firefox 3's zoom functions will zoom in on flash.

View 2 Replies

Professional :: Colour Effect In Properties Lost When Break Apart Used

Feb 4, 2011

How does one edit a graphic then have the ability to choose in properties Colour Effect options like alpha or brightness or tint in properties ?

Bringing an .ai file into library then creating a MovieClip of it, I am able to alter colour alpha or brightness or tint etc in properties via Colour Effect option. Use break apart to delete a simple box from part of the artwork and the colour aspects just applied vanish, its back to its original aspect. Try grouping the artwork but still no options now. Same applies if I just place the graphic on stage or open the graphic from the Library.

Try it a different way, bring it in and break apart, then edit the artwork then group it to see if properties has colour effect option for it but still no joy. Try converting it to graphic after editing and giving it a new name, it vanishes, nothing visible even if I select that graphic in library.
 
It seems that the only way to apply Colour Effect in properties for a graphic or MovieClip is to NOT edit its contents when placed on stage. I cannot bring it in without needing to edit it as the program making the ai. adds a box that I dont need, border of the page in that program in fact.

View 1 Replies

Flash :: Professional - Create A .SWF - Lost In The Process Post Edit

Feb 12, 2010

ive been creating .FLV videos using premiere. Inorder to view them in IE, do I need to use the 'Flash' software to create a .SWF? I'm a little lost in the process post edit --> web

View 4 Replies

Professional :: Call Create A Public Function To Make Something Happen In Another .swf?

Feb 16, 2012

I am trying to create a public function, i have a decument class with all of my variables in it, I have worked out how to bring in external .swf files, now  I need a way to have an even trigger something on a separate .swf So at the moment I have a flunction that works on the parent
 
stage.addEventListener(MouseEvent.MOUSE_MOVE, mousePosition);
function mousePosition(event:MouseEvent) {
if(mouseX>=125)

[Code]....

View 4 Replies

Professional :: URLRequest Lost - Error 1046: Type Was Not Found Or Was Not A Compile-time Constant: URLRequest

Aug 12, 2009

In my movie i have a link button with following, simple, function creating a link:

[Code]...

lately i've associated a class file (.as) to my movie and immediately after, when publishing the movie i got the following error message: 1046: Type was not found or was not a compile-time constant: URLRequest. as well as a couple of other related error messages: 1180: Call to a possibly undefined method URLRequest. 1180: Call to a possibly undefined method navigateToURL. when i remove the link to the class file, the problem goes away. also, i have checked the class file for mentioning of "URLRequest" and nothing is there.

View 9 Replies

ActionScript 3.0 :: Use Public Variables Or Public Static Variables?

Feb 4, 2010

is it better to use public variables or public static variables?

View 6 Replies

Professional :: Best Method To Playback Video?

Mar 29, 2011

I import the video manually from the File Tab. I change the stage size to match video (I want it full screen because I have "liquid layout" AS3 code in order to match browser window) I center the video on the stage.I make the video an Object (MovieClip)

And that's it.

The video play well, matching the full brower window and resizing accordingly.

My questions are :

1 - I am making the video a movie clip but is it necessary. I have tried without and it still works!! The only thing I find weird is that the "publishing" doesnt work when the video is not made a MovieClip. (I struggle to center the SWF in the HTML page)

2 - I don't know about the Netstream class. My server is a normal FTP (with PHP MYSQL) but not a streaming server. Would it be appropriate (better) to call the video through AS3 using the Netstream class ? (actually I am not sure of what the Netstream class is for)

3 - I have tried to loop the video using the classic AS3 code (that can be found anywhere). What is funny is that the code works when the movie is not converted to an object. But when it is, the looping doesnt work at all. Do you see a reason why ? (Maybe because the video is imported manually and not an instance created from the Video MovieClip Object ??)

View 1 Replies

Professional :: Undefined Method With Linked Symbol?

Jul 8, 2011

I created a MovieClip and linked it to a class, in the movieclip's frame actions I am making calls to methods defined in the linked class. At first I had the class in the root folder along with the fla file. I then moved it into a sub-folder, I updated the linkage property to represent the change but I am now getting an "1108: Call to possaibly undefined method".

View 7 Replies

Professional :: Method Of Storing/receiving Data?

Jul 29, 2011

I'm goofing around with developing a Flash game that would be accessible via a Facebook application but am still trying to figure out how I want to organize the game itself. The game essentially is an educational game with competitive components - completing tests faster results in more points with which you can customize your avatar and other items in the game. Also, passing certain "lessons" open up new lessons. So the major components I see are:- Player data storage (scores, progress, etc.)- Social connections - transference of rewards, comparing high scores, etc.- Lesson data (what questions to ask, possible answers, etc.)How is this best controlled? PHP and SQL? XML? Should I use datagrids as an intermediary? I'm having a lot of problems finding good information, both on the internet and at the bookstore about how to manage this.

View 3 Replies

Professional :: Using SetInterval Method - Class Displaying String

Nov 4, 2010

I am trying to write a class that will take a string (provided by a different class) and display it gradually, character by character, as if it were being written by a typewriter. To do this I am making use of the setInterval method in flash.utils, but I'm having difficulties... whenever I test the movie there is no text displayed, but flash isn't reporting any errors.

Here is the code:
package {
import flash.display.MovieClip;
import flash.text.TextField;
import flash.utils.*;
public class TypeWriter extends MovieClip {
[Code] .....

View 1 Replies

Lost .fla And Need To Update .swf?

Jun 5, 2011

I created a FLASH header for a website. My client wants me to remove a small line of text from it, but I no longer have the original .fla file. The text is over a simple gradient background, and I could probably just cover the text with a color rectangle.

View 5 Replies

IDE :: Encrypted Swf And Lost SWF?

Aug 1, 2009

I encrypted my swf by SWF Encrypt and I lost my fla.... :/Now I can't decompile this swf because it is encrypted.is It any possibilty to recover this .fla ? program, method ?

View 1 Replies

Professional :: Satay Method: Firefox Crashes Swf File That Contains 3D Animation

Apr 14, 2010

I have a strange dilemn and the 3D feature in Flash CS4 seem to be the most obvious connection to the problem. I have a page with 2 different swf files ( both under 50KB), which use the satay method. One works perfectly, and the other struggles to work. The pixels are magnified, the 3D animation scales incorrectly, and moves very slowly. Eventually the browser crashes and the whole operation goes down.

[Code]...

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved