public var currentStep:int;
<mx:ViewStack id="step" selectedIndex="{currentStep}">
<comp:Choosecar id="choosecar" />
<comp:Configcar id="configcar" />
</mx>
I'm using a drag and drop inside to choosecar component, so I want to change the 'currentstep' - which is a variable of the main application - with +1 so the viewstack changes to the second component 'configcar'. The only solution I found is calling a component from the main application, I need it the other way around but I can't find it.
I'm having a viewstack with a few components. Those components have to execute a function with parameters coming from other components. Therefore the other component may not me loaded directly. Is there any way to load a component via AS3 with a function?
How do I call a custom component's public function from the main app. For example, I've got a timer component, MyTimer.In the main app, I want to call startTimer() or stopTimer().In the main app, I've got:
<visualcomponent:MyTimer /> In the component, I've got: public function startTimer():void {
In my application I have a viewstack which I am changing via actionscript using the selectedChild attribute. The problem I run into is that I want to call a method in the component that is now the selected child in the viewstack, right after I assign it to be the child it gives me a "Cannot access a property or method of a null object reference." Is there some way that I can make this work without changing the creationPolicy to all?
Actionscript:
public function displayTaskDashboard(evt:Event):void { pm_viewstack.selectedChild = nc_taskDashboard; taskDashboard.populateTasks(Globals.currentProject.Project_ID);
I have a viewstack with 3 items in it. Now my problem is that I want all these components to be of the same size. Its simply enough to do this manually but is there any other way of setting the size for all the components at once?
I have a viewstack with two tabs.In one of them there is a data grid shows a list of notes. The other one is includes a form that can edit notes or crates new note. I want the user to be able to add new note or edit existing note when clicks an item in data grid. I mean when user clicks an item the viewstack must become editor.
I have a child/ Background class there must call a metode in the main class.But this fail coms: BackGround.as, Line 35.1061: Call to a possibly undefined method resizeHandler through a reference with static type flash.displayisplayObjectContainer.[code]
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 my main application, which contains several instances of a component that create a grid of photos belonging to a certain category. (the grids, and the photos are created dynamically with a loop).
I'd like to be able to click a photo to run a function that loads the large version of the photo into a separate element that is contained in the main application. So I created a Photo component in my main application, but how, using actionscript, do I change the 'currentphoto' variable in my main application from inside the tileview component?
Alternately I could put the function in the main application (probably more logical in the long run), but how would I call it from the child component?
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?
In my flex project i used one option like Link button . If i like it will be open new page contain more information and components . Which container is suitable one ? Where is used viewstack and stages ?
With a large number of items in the stack (each having a large number of panels, databinding, etc), this gets extremely slow. The Repeater seems to trigger creation of all children regardless of the creationPolicy of the viewStack itself.
It's at the back of my head somewhere, but I can't figure it out.I have a dropdown menu movie clip I need to make _visible = false, but calling
PHP Code:
_root.dropdown._visible = false
from the external swf doesn't reach the main swf. How do I communicate commands from an externally loaded swf to the main swf? I tried _root and _level0 to no avail.
I want to call on a button instance that lives two levels up in a movie clip. So, the mc lives here: Scene 1 > startMc > navMC (the navMC contains all the buttons) I thought "page1_btn.child.child.addEventListener(MouseEvent.CLICK, page1content);" would work but doesn't seem to do it. The code on main timeline is:
how to create .as file and how to link it with flash? another question is can anyone teach me on how to create main timeline and also how to call movieclips from the main timeline?
this website I'm designing loads swfs. inside one of these loaded swfs is a button that is supposed to remove the loader child from the stage and load a page in the main swf. How would I go about scripting that without using OOP? or is there a short external class I can create?
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've got a movie with a few buttons in it. When you click on one of the buttons an external swf opens. At the same time a large, quare, white movieclip opens at the back of the external swf (the white mc is in the main movie). Okay, so for so good. In the external swf there is a close button. When you click the button, the external swf goes to frame 14 to show a short closing animation. The last frame contains the following code:
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'm a newbie to Flash. I'm learning how to create a flash based image gallery. How to call images from a folder to the main stage and animate the image to show for 1 second and the change to the next image as a slideshow in a loop. This is the home page of the gallery.
I have 2 buttons in my main movieclip, one called "projects by client" and the other "projects by category".I have an external projects.swf which has 2 functions CLIENTS_CLICK and CATEGORIES_CLICK. The code is in the first frame of the projects.fla actions layer and not in a class.
I've searched a little and in tutorials the progressbar always loads an external mc...I was wondering, is it possible to make the bar load the main movie?