ActionScript 2.0 :: Access To Singleton Instance After Loading Swf Via Http?

Oct 14, 2009

My first swf loads a singleton class and instantiate it , and I access to it in the following swf's files (they were loaded in local system).

Now I have to load all swf via http. The issue is when I load second movie throw the first one, I can't get the singleton instance... it seems it lost reference...

View 0 Replies


Similar Posts:


Flex :: Getting A Static Instance Of A Class (singleton) By Using GetDefinitionByName

Mar 25, 2011

I have a ManagerClass with a Singleton implementation inside, I get the instance by calling ManagerClass.getInstance().

Can I get that same instance by just having the class name as a string? I have tried something like:

var theInstance:* = getDefinitionByName("ManagerClass").getInstance as Class;
theInstance.doTrace(); // I get a 1009 error here

View 2 Replies

ActionScript 3.0 :: Use A Singleton Class To Make Only A ONE Instance On The Stage?

Jul 30, 2009

I WIh know how Can I use a singleton class to make only a one instance of a movieclip on the stage.I use this code to make my movieclip instance:

Code:
var mioOggetto:wwp = new wwp();
mioOggetto.y = stage.stageWidth /2 -200;[code].....

View 2 Replies

Actionscript 3 :: Bindable Getter Function Of Singleton Instance Never Being Called In A Data Binding Expression

Oct 26, 2011

I have a singleton class that looks something roughly like this (only with more bindable public properties):

public class Session extends EventDispatcher
{
private var _Id:String;
private static const _instance:Session = new Session( SingletonLock );
private static const SESSID_CHANGED:String = 'SessionIdChanged';

[Code]...

The abnormal behavior I'm discovering is that the event listeners registered through registerOnSessionChange are indeed being called when the session Id changes, but the MXML data binding expression is not updating. I've tried all combinations of dispatching the event during the capture phase, and making it not cancelable, but to no avail. My understanding of [Bindable (event= ...)] is that the MXML should update the url string when the event specified is dispatched, so what am I doing wrong or misunderstanding?

Note: I realize there are lots of different ways of doing the singleton pattern in Actionscript, but unless the way I am doing it is actually causing my problem somehow,

View 2 Replies

Professional :: Access Timeline Variable From Static Class / Singleton?

Nov 3, 2010

How can I access a timeline variable from a static class / singleton?

View 14 Replies

Flex :: Access Https Resource If Swf Is Served From Http?

Jan 24, 2011

My swf is being served via http protocol. I don't really see this being easily changed. There's a resource that a website has opened up via their api that I need to access but it is using https protocol. Because of this my swf can't access the resource because of security settings.

Option 1 would be to serve my swf via https. I can't do this at the moment.

Option 2 would be set secure="false" property of the cross domain policy file. I can't do this, I dont have access.

View 1 Replies

Flex :: HTTP Resources Not Loading?

Jul 8, 2009

I'm working though the Adobe "Flex in a Week" video training series, and I've reached Exercise 9, which deals with creating a remote service call. Up til this point, the data source and images have been local assets (located in src/assets in my Flash Builder project).
I access the room list by this:

<mx:HTTPService id="rooms" url="assets/roomList.xml"
fault="httpFaultHandler(event)"
result="httpResultHandler(event)"/>

Here are the two result handlers:

private function httpFaultHandler(event:FaultEvent):void{
Alert.show("There was a problem","Error");
}[code]...........

However, when I run the application in the blazeDS container, I get no rooms despite the fact that the room list clearly exists in the deployment directory after running the application:

$ find . -name roomList.xml
./tomcat/webapps/odt/adobeODT-debug/assets/roomList.xml

How can I debug the reason for this failure? The deployment process used by the Flash Builder tool is fairly opaque, and the tomcat instance isn't advertising 404s from Flex apps. Is there logging somewhere, or something, that needs to be turned on?

View 1 Replies

Http - SWF Flash Files Not Loading With IIS Compression On?

Mar 7, 2010

I've got a bunch of flash files being served off a HTTPS site in IIS7. With contentcompression turned on, the flash files wont display. Does flash not support HTTPcompression, or is IIS doing something unusual?

View 1 Replies

Actionscript 3 :: Loading Images And Video In AIR Without HTTP

Jan 2, 2012

I'm curious what the correct methodology is for loading image and video data directly from the file system, without employing HTTP.I'm writing an AIR slideshow application, and it works great but currently relies on a local MAMP server to hand the app all the media via the standard, tried and true, FLASH media loading methodologies.I know that since FLASH was developed as a web plugin it handles this way of receiving data best, but I'd really like to extricate this rather onerous and unnecessary bit and have the app as a stand-alone player, however, I'm unclear what the "correct" way is to load the media.I have the File objects ready and I've gotten as far as having the user select the local directory from which to pull the media and I'm getting a list of the files (based on their extensions) from the list.

View 1 Replies

ActionScript 3.0 :: Loading FLV From Network Drive To SWF In HTTP

May 17, 2011

I have an swf wrapped with swfobject in html on a intranet: [URL]. That swf tries to access a flv file on a network drive:
\sub.mydomain.comdatamediamymovie.flv
I get an NetStream.Play.StreamNotFound error when I try to load that flv file. The code works fine when accessing files on the same http domain and when locally on my hd.

I've tried both with single and double backslash I the path so that it isnt broken.. cause I noticed that flash removes single backslahses. It actually seem as if I cant access any file on the network drive. So therefore I cant load a policy file (crossdomain) from that netwrok as well. I've added the network path to the Global Security settings panel, but that doesnt work. But it actually works in plugin version 10.1.. but not in 10.2 or 10.0. How is that for weird. I think it has something to do with security sandbox when accessing file over networks.

View 1 Replies

ActionScript 3.0 :: Access Values Held By A Class Instance From Another Class Instance?

Oct 14, 2009

I have to admit I pretty much ran away from Flash when AS2 came along and only used it for animation purposes over the last 5 years.So I'm having a major crash course in AS3 in Flash CS3 and I'm not enjoying it one bit. I'm getting maybe 10mins of finished work per hour as I try to figure out the limits and rules of AS3. Quite often it seems that AS3 simply can't do what I want it to. Anyway: Characterchecks.as is the main class and it loads a bunch of XML into four arrays. The file starts like this:[code]If I trace the value of, say, cc._Categories from the main FLA, it's empty. I'm guessing that the next line of AS in the main FLA doesn't wait for the previously called function to complete? (This may tie in to my next problem)My next step is that I want to display various things based on the data in the array. I have another class, Display.as which will hold all the functions to create the items on display. I thought it would be best for these to be a separate object. I wonder if I'm right?

So I declare an instance of Characterchecks in the main FLA and call it cc, and then run the functions to populate the arrays... Now I create an instance of Display and call it cd. How can I get functions in cd to see the values of the variables in cc? And if the main timeline can't tell that the functions aren't finished filling the arrays, how is cd supposed to know?I might be asking dumb questions, or maybe I'm doing things ***-backwards, I don't know. I'd appreciate any help, I really would. This whole thing has me at the end of my tether... being the most technically advanced person in my circle of co-workers and web design friends means I have no-one to explain why things need to be done a certain way or what the best way is.

View 3 Replies

ActionScript 3.0 :: Not Loading Videos From A Network Share (unc Path) Into Swf On Http Intranet

May 17, 2011

This isse occurs in flash player 10.2 but not in 10.1. Im sorry if my rusty english is making this hard to understand. I have an issue that causes my hair to turn grey. I think it has something to do with security sandbox when accessing file over networks share from http. I have an swf wrapped with swfobject in html on a intranet: [URL] That swf tries to access/stream/load a flv file on a network share unc path:[URL] I get an NetStream.Play.StreamNotFound error when i try to load that flv file. I catn even load an image from that share. The code works fine when accessing files on the same http domain and when locally on my hd.

I've tried both with single and double backslash i the path so that it isnt broken.. cause I noticed that flash removes single back slashes. It actually seem as if I cant access any file on the netwrok drive. So therefore I cant load a policy file (crossdomain) from that network as well. I've added the network path to the Global Security settings panel, I can provide you with more info if you want to.

View 2 Replies

ActionScript 3.0 :: Loading The Image Binary (after HTTP Request Headers Are Removed) As A Bitmap In Flash?

Sep 11, 2010

I'm building an image viewer that has violent content (video games), and so it requires users to enter their birthdays. Problem is that because of company policy, I can't expose any of the source images being viewed in the event that someone might use their resources/net tabs (or just sniff the request) and get the direct link to the image. (I know that they could screenshot it, but that's out of anyone's control and not something I'm worried about.)Is there anyway to inherently mask loaded resources (images)? I've been using sockets, which is great, but there's also the problem of actually loading the image binary (after HTTP request headers are removed) as a Bitmap in Flash.

View 4 Replies

Access An Instance In A Different FLA?

Sep 28, 2009

I am trying to add a LOAD EXTERNAL MOVIE CLIP behaviour to a button sitting in a .FLA called SERVICESMENU. I want to load a .swf titled MULTIMEDIA.SWF into an instance of an empty symbol called PAGE LOADER on a different .FLA called MAIN.FLA.

The problem is when I am in the SERVICEMENU.FLA file, I cannot see the instances that I created in the MAIN.FLA when following the behaviours wizard so I cannot choose the PAGELOADER instance that was created in and resides in the MAIN.FLA file.

View 2 Replies

Professional :: How To Access Instance Name

Apr 23, 2010

if i have a movie clip in my Scene 1 and inside that movie clip is another symbol e.g. a button, how will i reference the instance name of that button in my Scene 1

View 2 Replies

ActionScript 3.0 :: Access Instance On The Second Frame?

May 20, 2009

I have a FLA file and bind it to a class. I need access some instances on the second frame of the FLA file from the class, but I failed because they are not instanced yet.

View 2 Replies

ActionScript 3.0 :: How To Access Instance On The Second Frame

Sep 1, 2009

I have a FLA file and bind it to a class. I need access some instances on the second frame of the FLA file from the class, but I failed because they are not instanced yet.

View 1 Replies

ActionScript 3.0 :: Access MC Instance When We Have Only Its Name As A String?

Jun 8, 2009

I am sending the instance name (i.e. String)of the MovieClip to a function.From that function I need to access that same instance of MovieClip using that name.I have a MovieClip Instance name Planet_mc. And I am sending it to function abc()

abc(Planet_mc.name);
function abc(s:String):void
{

View 6 Replies

ActionScript 3.0 :: CS4 : Access A Global Instance?

Nov 2, 2009

When I created a Symbol in a Scene, I gave it an Instance Name.  How do I access it later on from within an objected added to the Scene.

View 5 Replies

Flash :: Access A Stage Instance?

Apr 4, 2011

I'm using Flash CS5. I have some instances on my stage declared in the main class and I want to attach some events to them, however at the time of the main class constructor, these are declared as null.

What's the best practice for accessing stage instances? Is there an event listener I could add that will tell me when the stage instance properties have been populated?

Simple example:

public class bleepBloop extends MovieClip {
public var productName:TLFTextField;
public function bleepBloop() {
trace( productName ); // Here it is null
}
}

However, when I access productName later, it's defined.

View 1 Replies

Actionscript 3 :: Access An Instance Of A Class From Anywhere?

Jun 15, 2011

I currently pass a reference to my model through the constructor to any class that needs it in my simple mvc pattern, this can get annoying at times when it starts to go deeper.

How do Classes such as LoadMax allow you from anywhere to simple import the class, and do something like addChild(LoaderMax.getContent("bg"));? Replicating this should surely be a good way to have my model work, without the complexity of big frameworks?

View 4 Replies

Actionscript 3 :: Access Class Instance From Everywhere?

Dec 29, 2011

for my current project I am starting to work with AS3 and I have written a ClipManager class where I can define an MC like "mainView" during initialization like this:

clipManager:ClipManager = new ClipManager(mainView);

With my clipManager I can now easily load stuff into the mainView etc. The problem is that I want every button throughout the whole thing to access Class Methods of this instance to alter the mainView

View 1 Replies

ActionScript 3.0 :: Access Variables Outside Of Instance?

Jul 23, 2009

So in AS2.0 I would use _global.variableName to create and refer to a variable that was maybe created on the stage and then needed to be referenced to inside of an instance. That doesn't seem to work anymore. Are you expected to not want to do that, or is the code just changed now?

View 9 Replies

ActionScript 3.0 :: Access Instance In Class

Jul 29, 2009

I have a music.fla and i set document class its to com.music_ct in the music.fla, i have a movieclip with instance name :aaa.[code]

View 7 Replies

ActionScript 3.0 :: Can't Access Button With Instance Name

Sep 14, 2009

In my timeline I have a button, with an instance name of view_only_button. On my actions layer, I have code that is attempting to add a listener for a MOUSE_DOWN event. The frame that has the button is the same as where the actionscript is going, but of course it is two different layers. When I try accessing the variable by the code below, I get the error:

Error #1009: Cannot access a property or method of a null object reference.

ActionScript Code:
view_only_button.addEventListener(MouseEvent.MOUSE_DOWN, viewOnlyDownHandler);
function viewOnlyDownHandler(event:MouseEvent):void{
//Code to execute inside of the event call
}

When commenting the addEventListener line out, the error goes away. I am unsure why this would issue an error

View 7 Replies

ActionScript 3.0 :: Access Instance Name Through Class?

Apr 26, 2010

I have a movie clip with a dynamic text box with an instance name inside. The movie clip is linked to a class, but when I try to access that instance name through that class it just returrs null.

View 1 Replies

ActionScript 3.0 :: How To Access Document Instance

Oct 12, 2011

In flash, you give the stage a document class (Engine). I'm making the assumption that it creates an instance of this somewhere, but my question is, how the hell do you access this? I have found many places saying to create another instance, this is not what I want

View 8 Replies

ActionScript 3.0 :: Access Button (by Instance Name) Inside MC?

Nov 20, 2009

how do you access a button inside a movie clip by instance name? i want to add an event listener to the button.

i tried:

Code:
myMovieClip.myButton.addEventListener(MouseEvent.MOUSE_DOWN etc......

and got no errors but at the same time it didnt respond to my event listener

View 4 Replies

ActionScript 3.0 :: Access A Class Instance Property?

Jan 15, 2010

I have a problem with the piece of code that's been annoying me for a week. It should be very simple but all my attempts at a solution somehow seem to get thwarted by an invisible hand that wants me to fail.Here is the scenario: I am trying to create an image strip consisting of image thumbnails. When one mousovers each image it should print its information (say a name) in a textfield.I created an image container class that loads the images through a url request, then an image strip class that receives an array with image names and urls and displays them in a row. So far so good.

However when it comes to showing the info I have no clue how to address which image is being pointed at. I put a variable called imageIndex inside my imageContainer object, then put all the created containers in imageStrip's for-loop inside an array called mgContainerArray. I created a for loop in my fla that goes through this array and assigns all those containers a mouseover event listener. What I'm stumped with is that there is no way I can access the imageIndex variable from my function to tell the code which image is currently being mouseovered. It keeps giving me an error.Here is the code:

Code:
for(var i:Number=0; i<myImageStrip.imgContainerArray.length;i++){
myImageStrip.imgContainerArray[i].addEventListener(MouseEvent.MOUSE_OVER,

[code].....

View 3 Replies

ActionScript 3.0 :: Access Data From An Instance Of A Class?

Oct 27, 2009

I have a class LoadXML which loads and extracts data from an XML file. I am using this data for my Main class by creating a new LoadXML class. I now want to use this data for my other classes but without having to create another new instance of LoadXML. Since global variables dont exist in A3, I tried creating get methods in LoadXML and then returning these values into variables in the desired classes.[code]

View 7 Replies







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