I'm trying to start off a as3.0 project with nothing in the maintimline, I want my default actionscript class to start things off. Like a main in C, so is there a main like function in AS3.0 ?
I have a very serious issue and need to be fix ASAP. Kindly check [url]... it is a flash based website, there on main flash file which have all the navigations (menu tab), when user click on any tab its load a external swf according to that tab, that swf has flv player which take videos dynamically, If user click on the trailers tab its load trailers.swf which have the player and the playlist when the user click on the video of the play list its player that video but the problem is that if the video is still in loading process and the user click on another tab so the main.swf load the swf according to that tab but the audio of the previous video is running...
thats i m trying to make a function in the child.swf(trailers.swf) which will pause the video so i will call that function the other tabs, so if the trailers.swf is loading and user click on comedy so that function will pause the video of trailers.swf and play the comedy.swf, So kindly tell me how i will access the function of [url]...
So this was quite simple in AS2, but considering that _root is no longer around, how can I call a function that is on the main time line from a nested movie clip?
This is what I have inside my movie clip:
Code: this.hit_mc.addEventListener(MouseEvent.CLICK, updateScore); I tried using Stage.updateScore, but that didn't work either. This is the error I'm getting:
1119: Access of possibly undefined property Stage through a reference with static type flash.display:Stage.
I'm having some trouble finishing an interface i'm working on,the function indica() adds a menu listing of items (indicadores) inside a mask because its too large, and i added a scrollbar that allows to scroll through the items but now i need to add the buttons inside the movie clip indicative,i can add symbols and buttons, but i'm having trouble having them call functions inside the same class that the function indica() is running.[code]
I have a document class called Main.as In the class constructor I have the following listener:
enter code here var listeningFORModeChangeToStudent:Sprite = new Sprite; listeningFORModeChangeToStudent.addEventListener(TellAllModeChangeToStudent.STUDENT,exp); addChild(listeningFORModeChangeToStudent);
[code]....
In a third class I make a call to the despatcher in the previous class:
enter code here var ThisTellAllModeChangeToStudent:TellAllModeChangeToStudent = new TellAllModeChangeToStudent; ThisTellAllModeChangeToStudent.tellAllModeChangeToStudent();
I have trace statements in eveything and from this I know the despatcher in TellAllModeChangeToStudent is being called.The problem is that the listener in the main.as is not calling the function exp.I cant see why and I dont know how to check if the listener is actually seeing the dispatch event?
I have a function with codes (variables, events, and events) that perform one after another. However, after the last code performs the main function ends. I want the codes inside this function to repeat itself after the last of the code perform.
How do I get those codes to do that?
Here is an example of what I have: see attach code.
I have continuous stated but of at the moment, the logo does not continue. I am guessing that I need maybe to put this in a loop. If this is so, I need an example as to how do this.
The second question, I have these codes on one frame (one scene). I want to create other pages or scene and transfer all of the codes to the other scenes. How do I do this? What is an example of the code that I would use to transfer the main function to the other scenes? I guess I could copy all of the codes to the other scenes but I am sure there has to be a faster way.
How do I get "close" button to run runFunction() from within component to outside declaration? FxGlobals.topLevelApplication doesn't seem to be working for this.
Does anyone know of a way to have something in a class, run a function in the main .fla? I have a class that creates a drop down menu and I would like that when a btn is clicked, a function is run.....but it is important that this function is in the main .fla and not in the class.
The Situation: I have a main.as that has a function that is worth 400 lines.
What I want to happen: I want that function to be loaded from another .as file so that my main.as does not look too long. Also, I have a lot of variables that was instantiated on my main.as that is called on that 400 line function.
I decided to rewrite my question from an earlier post...I'm using the TextMetric class: URL...The code below currently resides on the attachedMC timeline, and is written twice with different variables for each time called for each dynamicText.[code]What i am trying to do (emphasis on trying) is write the code on the main timeline, so that it can be called from any attached MC, a sort of global function if you will. Another thing to note is that there are multiple dynamic Texts using the function at the same time.[code]
I can't seem to access functions (methods) of my document class from any other class in the same package. What i need to do is create some global functions like menu reset, title change, etc. Maybe i'm not fully understanding the OOP concept, because this seems simple and it should totally work, but it doesn't and no documentation has been able to tell me why.
I have one swf (let's call this 'A') that loads in an external swf via my own pre-loading class. We'll call this 'B'.s both swfs are written by myself, the structure follows the same one I always use, ie. a DocClass named 'Main'. When B is loaded in, the DocClass's clash - ie. B calls A's DocClass. a) Is this normal behaviour?b) Will this conflict occur for any other variables/functions that share a name?
I have a function within another function. Is it possible to call the function inside the function from the main timeline. See example code. I want to call the function called sub from outside off the function called main.
Code: function main():void{ // Do something function sub():void{ //do something }}
I have a flash piece with 3 main keyframes/story ("story1", "story2" & "story 3") that cycles (and loops) from story to story, and 3 buttons that stop the cycle and take you to one of the stories
So on my first frame I have: _root.mainMC.playing = "true"; function playOn(frame) { /gotoAndPlay(frame); }
Then on each keyframe I have: stop(); setTimeout(this,'playOn',2000,"whatever the next frame is")
Then on button I have: on (press) { _root.mainMC.playing = "false"; gotoAndStop("story3"); }
I think somehow I have to have the button clear the function because for example, if I am viewing story 1 during the cycle and click 3, it goes to 3 and then quickly goes back to 2 and then stops on 3.
I have a project which requires the loading and unloading of multiple "scenes". All my navigation is working (probably not the most efficient way) but I'm having one issue. I need a button on one of the loaded SWFs to call a function on the main timeline. Since Actionscript 3 no longer supports the _root functionality the way AS2 did, I cannot access the main timeline.
In general, how do I get to the root of the main timeline without using _root?
Also, how can I reference the loaded SWF and objects inside of it from the main timeline?
I've written a script that takes keyboard input to turn movieclips on and off in a swf file (like the visible/invisible layer function in photoshop). Then I'm attempting to load the *.swf (image.swf) into a zoom/pan flash file from flash den. When I load it in, the keyboard controls no longer work. I've tried importing the keyboard control function (keyDownListener) into the main zoom.fla with this script:
I have a main movie with thumb movieclips that load new children and stops the main movie's animation. Within the child there is a close buttion that removes itself. I also wanted the close button to start the animation of the main movie again once it removed the child. Since I am using a document class to load everything for the main move, how can the close button from the loaded swf use a function from the main document class?
I want to make 5 buttons visible after a logo has animatedI have a function called vis that successfully makes the buttons visible.How do I call this from within the movie clip (instance name 'logo'?)first frame of main timeline code: