ActionScript 3.0 :: Mind-bending Access Control?

Feb 15, 2011

I have written a framework that facilitates RPC calls between AS3 and PHP 5 called FlashMOG. I recently got a forum request that has introduced a pretty bizarre question regarding access control.This will be a lot easier to discuss if you have access to the FlashMOG 0.3.1 client source which is here:[URL]...

The basic idea is that I have a FlashMOGService class which has an RPCSocket member that it may share with other FlashMOGService objects. The idea is that you can create two distinct FlashMOGService objects and have them both connect to the same host/port via socket. I use my special RPCSocket class for two reasons:

1) Let developers use one port but separate functionality into two distinct services...a form of multiplexing i guess

2) RPCSocket adds functionality to the standard Socket class that works to serialize and unserialize data and get it where it needs to go. The essence of the problem here is that this guy has created a class with a FlashMOGService object as a member and has tried to assign a private method of his class as an event handler to the FlashMOGService object:

[Code]...

View 0 Replies


Similar Posts:


ActionScript 3.0 :: Mind-bending Access Control - Assign A Private Method Of Class As An Event Handler To The FlashMOGService Object

Feb 15, 2011

I have written a framework that facilitates RPC calls between AS3 and PHP 5 called FlashMOG. I recently got a forum request that has introduced a pretty bizarre question regarding access control. This will be a lot easier to discuss if you have access to the FlashMOG 0.3.1 client source which is here:

[code]...

The basic idea is that I have a FlashMOGService class which has an RPCSocket member that it may share with other FlashMOGService objects. The idea is that you can create two distinct FlashMOGService objects and have them both connect to the same host/port via socket. I use my special RPCSocket class for two reasons:

1) Let developers use one port but separate functionality into two distinct services...a form of multiplexing i guess

2) RPCSocket adds functionality to the standard Socket class that works to serialize and unserialize data and get it where it needs to go. The essence of the problem here is that created a class with a FlashMOGService object as a member and has tried to assign a private method of his class as an event handler to the FlashMOGService object:

[Code]....

My initial thought is that this should be fine because it's all done within the class. However, when I consider the monkey chain that results in this function being called, it seems almost logical that it wouldn't work. The problem is that the browser freezes when a socket message arrives that tries to call the service's client method, _service.client.firstClientMethod. This client firstClientMethod is attempted when data arrives from the server on the Socket (an RPCSocket, actually). The RPCSocket class deserializes the socket data and extracts an array with a service name, a method name, and an array of arguments. It looks into its own private class variable (an array of services using the RPCSocket) and tries to invoke whatever function was assigned thusly:

[Code]....

I'm guessing there's some kind of infinite loop going on to check access control for the various intertwined classes.

View 5 Replies

ActionScript 2.0 :: Question About Lenses And Light Bending?

Apr 12, 2009

So, I'm in physics, but we didn't get to the light and lenses part yet... Anyway, I'm making a simple program showing how a laser would pass through a circular lens. I have the design down and it works and stuff... but the light bending isn't accurate. My source of the light is at an infinite distance (meaning the beams are parallel) My question is:How would light bend as it passed through a circular lens?

View 3 Replies

Flash :: Open Source AS Lib Can Be Used For Mind-map-like Application?

Apr 19, 2010

Is there an open source AS lib can be used for mind-map-like application?

View 1 Replies

ActionScript 2.0 :: Mind Map - Click On A Node And Lines Are Drawn To Its Sub Menus

Apr 6, 2007

I want to have a menu where you click on a node and lines are drawn to its sub menus, any links to examples or tutorials would be great p.s a mind map is like these: [URL]

View 2 Replies

ActionScript 3.0 :: An Array With Objects Stored In It - When I Remove It - Flash Doesnt Seem To Mind Its Absence?

Jun 16, 2011

ive come across this method 'as' and I dont get it.I am following a tut, and i have an array with my objects stored in it(for reference to control these sprites).They are instantiations of my sprite class 'Ball.as'

Code:
for(i=0;i<3;i++){
var myMCs:Ball = myMCs[i] as Ball;
}

when I remove it - flash doesnt seem to mind its absence.

View 5 Replies

Actionscript :: Control Movie Without Having Access To It?

Oct 7, 2009

I work for an equipment planning firm and we subscribe to an organizational tool which allows us to build projects and add the items we are planning to buy to each project. The company who offers this product keeps all of the project data as well as the equipment library in a database on their servers. Up until recently, this information was displayed to us using a normal website using HTML and javascript and would access the database when it needed to.  Now they are upgrading to a flash based movie which is used as the interface and it still accesses the database to display the proper items for each project and to access the equipment library.  Since this is a 3rd party company, I do not have access to the actionscript they use but is there a way I can control the movie with some sort of programming.  In the past, I've used visual basic to send commands to the website and I could automate a huge list of tasks which would ordinarily take a long time.  Is there anything comparable to doing this in a flash movie?  It can be any programming language.

View 1 Replies

ActionScript 3.0 :: Access A Control In The Main Timeline?

Nov 18, 2009

I need to access variable that lies on the main timeline first frame from a action script inside a movieclip that is inside a movieclip.

View 2 Replies

ActionScript 3.0 :: Access The Check-box Control And Its Event-listeners?

Jan 22, 2009

How to access the Check-box control and its event-listeners. If a check-box(which is a movie-clip) is selected, I need AS 3.0 code in such a way that:

[Code]...

View 2 Replies

Flex :: Access The Selected Text In A TextInput Control?

Jun 15, 2010

I'm using Flashbuilder 4. I have a Spark TextInput control, and I'm implementing a "Copy" button that will copy the selected text only from within this control to the clipboard (pretty much like the RMB Copy does).

View 1 Replies

ActionScript 3.0 :: Create A Slider To Control Frames In A Movieclip Error 1009: "Cannot Access A Property Or Method Of A Null Object Reference"

Oct 27, 2010

I am using this method to create a slider to control frames in a movie clip.

[Code]...

The slider works well when I'm in the scene that contains the slider. When I go to a scene that does not include the slider, I get the following output error. TypeError: Error #1009: Cannot access a property or method of a null object reference. How can I stop the stage.add.EventListener when I navigate to other scenes that don't include the slider. This is my first as3 project. The project functions as it should but I don't know if the output error will cause problems later.

View 3 Replies

Flex :: Manipulate Child Control Inside A Panel Control?

Oct 12, 2009

I am trying to manipulate (move up and down, enable/disable and launch a form) child controls inside a panel control. However I am unable to get the id of the child control on which the click event occurs. To illustrate, I am trying to create similar functionality as is available. I am trying to create the up-down buttons that you see in the image at http:[url].......

View 2 Replies

ActionScript 2.0 :: Make A Music / Sound Control And FX Sounds Control

Mar 21, 2011

im trying to make a music/sound control and FX sounds control,so i have my FX volume level as a variable(FX_vol) and also the Music/sound volume level as a diffrent variable(M_vol),so i set them as sounds that i can use trough coding:

[Code]...

View 2 Replies

Flash :: Control Movie From JavaScript When Have No Control Over The Source?

Nov 4, 2009

Is it possible to control a Flash movie from JS when you have no control over the source? I have decompiled the movie to see its inner workings, but I know nothing about Flash, so I'm mostly in the dark. I found this resource, Interaction with JavaScript, but it's not working for me (probably because I don't know what message to send to the movie).

View 1 Replies

Flash :: Control Flex Application From Embedded Control?

Mar 21, 2010

I have a flex application and have embedded a flash (SWF) file into it using <mx:SWFLoader>. There is an "Exit" button on the Flash file. I want to be able to handle the button click event on the flex application.

So when that button in the flash file is clicked, I want to perform an action in the parent flex application.

View 2 Replies

Flex :: Access To Object Property When The Propety To Access To It's In A String Variable?

Oct 20, 2010

It's too complicate to explain but I'll give you an example

I have an AS3 ResultEvent Object and this object has several propeties which can be accessed by this like:event.result.name or event.result.age and, I have this String variable: eventProperty:String that contains "name" or "age" How do I access to event.result. with the variable?

View 2 Replies

ActionScript 3.0 :: Access The Newly Created Bitmap Data To Access The Method CacheAsBitmap.bitmapdata.dispose() ?

Oct 22, 2010

So, you have a sprite, you draw some graphics, you set cacheasbitmap=true... I can't seem to access the newly created bitmap data, to access the dispose() method.

[Code]...

View 6 Replies

Actionscript 3.0 :: Button Access - Error 1009:cannot Access?

Feb 17, 2009

i have a little issue, this is the script:

import flash.net.navigateToURL;
import flash.net.URLRequest;
button.addEventListener(MouseEvent.CLICK, action);
function action(e:MouseEvent):void
{ var request:URLRequest = new URLRequest("novosti.php");
navigateToURL( request, "_self");
}

button is instance name of symbol - button, and like that script doesnot work there is error 1009:cannot access.....but when i put symbol with instance name button in form of movie clip, script works.

View 2 Replies

Flash :: Access Local Access Database From It (or AIR)?

Nov 13, 2009

Is it possible for Flash or possibly Adobe AIR to have access to a local Access database?

I will have either a Flash EXE or AIR application running on a local PC (WinXP). The PC will also have a local Access database. I need my Flash application to get the data from this Access database. How would I do this?

I doubt it can be done with Flash or AIR alone (someone prove me wrong or right), but is there an option for some middle-man application to access the data base and send it on to Flash? How would this work?

Or could I read the MDB file into Flash and parse it myself? is there a library for this?

View 2 Replies

ActionScript 3.0 :: Access Files Vs Access Network

Jul 2, 2010

My flash movie loads config.xml from the file system. Inside config.xml are urls and the base url to other xml files that I wish to load in to the flash movie.

These urls in config.xml are requested by the flash movie providing my flash movie with data. Again these are .xml files how ever they are being accessed using the network. EG " http domain dot com slash data dot xml"(i cant post links yet)

I know that I cant access both network and local files in the same movie so my question is this. What is the best way to pass in the base url dynamically to the flash movie so i can cut out config.xml?

View 0 Replies

ActionScript 2.0 :: Difference Between Access And [] Access

Jan 7, 2004

i refer to this tutorial [URL] what i found strange is that i can't use . to refer to movie clip instance in this tutorial, it only works if i use [] access for example: "_root.instancename" versus "_root[instancename]" only the second one works.... examine the short code i attached just cut and paste the code...play the movie..and see the difference,

View 6 Replies

Flash :: Passing A "control" As Parameter Vs Passing Id Of The Control?

Jan 2, 2012

1) Passing a control itself as parameter into a function 2) Passing an id ( managed manually) of the control as a parameter into a function . Say for an array of controls I have ctrl_Array = [ my_btn, my_mc, my_dtg ] and corresponding id_Array[0,1,2] PS: If my question is difficult to understand, i just wanna know, if it is a good programming practice to pass control references among the classes as function parameters ?

View 1 Replies

Control A MC Onstage From Within Another MC?

Jun 21, 2009

I want to control (i.e. play) a movieclip that's located on the stage from within another movieclip. The structure is basically like this... Stagemovieclip (mc)stop scriptanimationmovieclip (bt2)actionscript layer (code below)button (bt)the code within bt2 is:

[Code]....

View 2 Replies

ActionScript 3.0 :: Mc Control From Within Mc?

Dec 14, 2010

I have a mc of "pages" and 1 frame on main timeline and another mc called "titles" .I would just like to be able to say at the end of title1 something like pages.gotoAndPlay(relevant frame);however I have been bangin my head against this all day. how do I do itmdesperate. Just want to be able to play my animation without using buttons..ie. when this frame is reached .. do this?I have a next and previous function - but I couldnt fig out how to make that work automatically either.

View 1 Replies

Control Timeline And FLV Together?

Dec 3, 2009

Where can I find ready-made buttons that will control an FLV and a timeline together? I have a swf with an FLV and I animate images and phrases on a movieClip timeline timed to what they say in the flv. I set up cuepoints that trigger the animations, so when users scrub, pause, etc. the timeline eventually catches up with the FLV, but it would be a lot nicer if the pause, scrub, etc. would do the same to the timeline and there was no lag time.

View 1 Replies

ActionScript 1/2 :: Using One .swf To Control Another .swf?

May 23, 2010

I need to find a way to come up to a solution to this problem, I can't have a different solution - for difficult reasons, I'm stuck with this layout.I have one .swf file (call it Parent.swf) - and within this .swf file there are two other .swf files sitting next to each other. (cLeft.swf and cRight.swf)Now - again for reasons that are complicated to explain - the cLeft.swf plays through it's animations, and then stops at the end - but there are no buttons to replay it - and right-clicking is not an option. So, I was wondering if there was code I could use in cRight.swf to target and replay cLeft.swf - understanding that at runtime - both of these are embedded within a larger parent .swf - as I named Parent.sw

View 6 Replies

Professional :: Control Bar For .swf?

Jun 10, 2011

Somebody answered that a way to get a control bar to a .swf file was to use the "button handlers and the goto and stop methods".No reference as to what is meant by this or to where I can get the .html to do this.I've got the .swf file but no control bar!I understand that .swf can be visible by most browsers.So how do I get the scripting for addin these button handlers and the goto and stop method". Since I'm a newbie, please don't say, this is easy, just use this or that method.I need the scripting that will do it.I know how to put the .swf in the page with <object> and <embed src=""> but no control bar.

View 3 Replies

ActionScript 2.0 :: Get GUI To Control?

May 19, 2009

I have this animation that makes patterns you can change the patterns shape and so on with the action script but I want the users to be able to change it at run time.What I need is for a scroll bar or maybe text field to be able to change the action script.

This is the line that needs to be editable e.g the number must change.

this[newnode]._rotation=137.5

View 1 Replies

AS3 :: Control One Movieclip From Within Another?

Jun 21, 2009

I have 2 movieclips on the main timeline of my movie; One (mc) contains an animation, the other (bt2) contains a button (bt) with code. I want it so when the button (bt) is clicked, it causes the animation (mc) on the main timeline to play.

The button's code is contained inside bt2.

So far I've tried the following things...

Code:
bt.addEventListener(MouseEvent.CLICK, onClick);
function onClick(event:MouseEvent):void
{bt2(root).mc.play();}

[Code].....

... along with several other things. Nothing is working at all, and I spent all last night looking for a solution with none in sight.

View 3 Replies

IDE :: Control An External SWF?

Mar 21, 2010

Is it possible to load an external SWF and control is with play/pause buttons, seekbar, and volume bar?Basically it would be something like this:controller.swf - this would load the external swf file and control itmovie.swf - this is the actual content that I'd like to control

View 1 Replies







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