how to access variables that are declared in a movie clip from a function declared in that same movie clip.
i.e. **************************** var int1 = 1 var int2 = 2
[Code]....
I'm trying to do this in the main movie clip of a movie that I plan on importing dynamically in another movie. I've tried to use this.int1++, but I think that flash was looking for a variable that belongs to "myfunction" when I did that. I could just use _root.int1++ but like I said, I plan on dynamically loading this into another movie, in which case it would be pointing to the wrong movie.
How would you go about accessing a function or variable from a parent clip if the clip accessing has been loaded using the Loader() constructor in AS3?
I am having a strange issue in my flex app. I have a Video element that loads an FLV file from the same directory as the SWF app. If I move my SWF and FLV to a local directory on my computer and load the SWF in my browser, the video plays without any issues. However, if I move the same collection of files (SWF, FLV, HTML) to a network share, the video no longer loads.
[Code]...
In my netStatusHandler() callback I get an event status of: NetStream.Play.StreamNotFound.
Again, I only have this issue when loading content from a network share.
I'm loading in a flex application a .swf via <mx:Image> (that is a subclass of SWFLoader). Is it possible to retrieve a list of all the public variables and functions inside the loaded .swf?
I am using the Flex Builder 3 debugger almost every day and it's starting to be a real pain that the 'Variables' tab in the 'Flex Debugging' view doesn't show local variables, only 'this' is displayed.
Also I can not add Watch Expressions for local variables.
Am I forgetting something here or is the debugger just very limited?
I want to make such flash file, which would contact web content without asking an user to add the file in the allow list on adobe web-page, is it possible to make it without help of other programing languages?
I work with FlashDevelop, Flex SDK and FP10 debug. I am able to access a local variable (xcorner) which is never declared before, at the condition that it must be declared after... in an "if" for instance. If I remove the declaration of xcorner, within the if, errors occur at compilation, but otherwise it works.
PHP Code: public function pushShape2Pool(name:String, sh:Shape, rotAngle:Number = 0):int{ [...] // xcorner is NEVER declared before !!! coordSprites[0] = new Rectangle(xcorner, 0, globalBmp.width, globalBmp.height); trace("xcorner=" + xcorner); // display 0 xcorner += globalBmp.width; [Code] .....
I have the following problem when loading a swf file. I have content.swf file located at [URL]. The contetn.swf access a file settings.xml located in the same dir. I load it like this:
_settingsURLRequest = new URLRequest( "settings.xml" ); _settingsLoader = new URLLoader(); _settingsLoader.load( _settingsURLRequest );
Now I have another file loader.swf located at another domain [URL]. The loader.swf file loads content.swf but content.swf search for the settings file at domain2 not domain1. I know that I can use absolute address when loading the settings file but I'm loading a lot of files and I prefer another solution. Is there a way to specify that content.swf should always search for settings.xml in its own domain no matter the fact that its being loaded from onother file in onother domain?
Is there a way that i can access Local SharedObject using a swf from the net.
For example, i have a .swf that creates SharedObject running locally on my desktop computer.. But when i'm somewhere else, i need to access some of the shared objects in my desktop, is that possible?
I am facing a problem in accessing Local shared object from 2 diff. swfs. Let me explain the scenario clearly.I am developing a radio widget (in maindomain.com for ex)which has a button to open a html page (placed in contentserver.com) as a popup with specific wt and ht. The html page loads the same SWF file of radio widget from "maindomain.com", means whatever changes we do for the SWF in maindomain will be reflected automatically in the popup also.Here where the problem is:
1. Say I am playing radio station "A" in main window and added this station to favourite list (which is done by storing in Share object). So when i open the popup its reflect there.
2. Now when i change radio station "A" to "B" in the popup and added "B" to favourites and closed the popup.
3. When I refresh the main window, I can get both "A" and "B" in fav, as expected.
4. But if without refreshing in main window when I changed to some new station "C" and then open the popup, it has got only radio station "A" in the fav list.
I am pretty sure this is because of Sharedobject.flush(). The thing I am wondering is, why the station "B" which is also pushed to sharedobject when added to favourite is getting deleted when I flush() the SO.?I googled many forums but not satisfied solution for this. Even I tried to get the Sharedobject.getLocal("SO","/") every time before using data in it. but no use.Is it a Flash limitation accessing LSO from diff SWF?
I have a html page on my c drive (it will not be hosted online, ever) which embeds a swf from a server, with swfObject, allowScripAccess is true. I need that swf to invoke some calls to the html's js funcitons. I get an error stating [code]...
I know i can solve it by going to settings mamager and adding my C to my "trusted sites".... I, however, need a different solution, that does not involve tweeking settings manager. Tried adding a crossdomain to the root of the directory on my comp, with no luck - im assuming for crossdomain to work it must be hosted on a server - and my local directory is not a server, and cannot be one ( no localhost is allowed as per requirement).
I'm working on a flash video player and I'm trying to figure out how to access something inside the constructor that I know is set but it keeps telling me its not.
[Code]....
now in the metadata function its giving me the error, "Access of undefined property video" Now, am I just completely not understanding how classes work or is this a common problem?
I have a file which loads a series of SWFs. It loads one, allows it to play to completion, then stops. Right now, it will just wait for the user to press a button and select the next one. However, I need it to play them sequentially. Is there any way for the SWFs which get loaded to access the functions which control the SWF loading?
I've been working my way towards better OOP design lately and I've come across a problem with accessing functions in other classes from my Main class. Here is the code:
They are listening for functions that are within the Player.as class, these functions control the dynamics/movement of the player itelf. But for some reason I'm getting a 1120 error(access of undefined property). Basically how do you listen/access for functions within a different class?
I'm sorry if this has been answered 1,000 times, but I am so confused with everything!! In the main timeline of my movie, I have a container movieclip called "content". I want to load an external swf into content, and then access the functions in that swf. I can load it no problem, but I can't for the life of me figure out how to access the functions, I can't seem to find it anywhere!
I'm creating a soundboard, and and I've been using Flash for about 2 weeks and Actionscript for about a week, so you'll have to excuse my ignorance. I've used google to look for specific things to no avail so here I am.Okay, so, I have a soundboard that, when pressing a button, it will hide or show certain buttons on the page, to give the feeling of multiple pages. All my visibility stuff works like a champ.
Right now, in the working version of my soundboard, I'm not using functions to instantiate my linkable objects, create the array, or populate the array to hold the linkable objects. I would like to use functions to make my code less obtuse. I looked around for a while trying to figure out how to pass an array of objects into a function but i haven't had much success. I'm not quite sure if it's even possible to do. These are the errors I get:
1120: Access of undefined property playArraySound001. 1061: Call to a possibly undefined method play through a reference with static type Class. 1120: Access of undefined property playArraySound001. 1120: Access of undefined property GordonSoundArray. 1136: Incorrect number of arguments. Expected 1.
The first code is what works, the next code is the stuff that doesn't work.This is the working version
Code: //////////// CODE FOR PLAYING SOUNDS //// This is creating an instance of the Linkable object var playArraySound001:Link_10_minutes = new Link_10_minutes(); var playArraySound002:Link_3_eggs = new Link_3_eggs();
I am creating a web page that allows users to upload their own swf files to my web page, which are then used by the main web page as components. This creates a security issue though because I don't want the uploaded swf files to access other files on the server.
when the main webpage starts, it loads whatever third party swf files the user specifies. Is there a way for my main web page to change the security settings of the loaded swf so that the loaded swf is treated like it was loaded from another domain? Or is there another way I can provent these uploaded swfs from accessing local files on the server.
how can i call public functions or vars of a sprite class from another class (or frame script)? i keep getting 1061: Call to a possibly undefined method getSide through a reference with static type flash.display:Sprite.
//Framescript var a:Sprite = new customRect(); addChild(a);
I use the following jQuery code to access functions in my SWF (FP 10.1 SWF embedded via SWFObject): $('#FlashApp')[0].someFunc(); This works fine in every browser.. except for Internet Explorer (surprise!). Surely, the point of jQuery is to make this code work across all browsers? I'd really rather not write extra code to check for IE. How can I talk to my SWF in a browser independent way?
I've made two custom classes ("banana" and "box"). As I start my application I create two new objects from these classes - first I create a banana object and then a box object. The banana class/object has a property/variable ("weight") that I set with information from an external XML file, thus it takes a while for it to receive a value.
My problem is that my box object needs to access the "weight" property of the banana project, just after the box object has been created. The problem is that the banana object hasn't finished initialising when I make the request from the box object...
Is there a way of either check the status of another class (initialisation status that is), or is there another way of preventing the box object to either be created before the banana object is initialised?
I'm creating a soundboard, and and I've been using Flash for about 2 weeks and Actionscript for about a week, so you'll have to excuse my ignorance. I've used google to look for specific things to no avail so here Okay, so, I have a soundboard that, when pressing a button, it will hide or show certain buttons on the page, to give the feeling of multiple pages. All my visibility stuff works like a champ.
Right now, in the working version of my soundboard, I'm not using functions to instantiate my linkable objects, create the array, or populate the array to hold the linkable objects. I would like to use functions to make my code less obtuse. I looked around for a while trying to figure out how to pass an array of objects into a function but i haven't had much success. I'm not quite sure if it's even possible to do.
Short description of my project:I'm making a "flash-car-damage-registration-program" where a user can click on a part of a car, make two choices (from two comboboxes) that describes the damage, and then save it in a datagrid withing flash.I have split up the code in different class files:I have a damage.as class file that describes the damage and its properties.I have a carPart.as class file that extends the Movieclip class. This sets all the propertiesof each carpart and where the roll-over/out eventlisteners are, pluss som escriptive text to each carpart. This works the way I want it to. This is just to quickly give you an idea of what I'm working on.So to the real question or problem: I have a LoadMyXmlData.as class file where I load some xml data, this works fine. A function in this class takes a combobox and a xmllist as parameters.
I want to populate the mentioned comboboxes from the xml data. Both comboboxes are on the stage within another movieclip, but I can seem to access them. (yes, they have instancenames etc) I get error 1120: 'Access of undefined property'. I have tried ways like: containingMc.comboboxMc' and so forth but no luck. I have been searching the web for days for a solution to my problem, but nothing so far.