ActionScript 3.0 :: Call Main SWF From Inside Loaded SWF?

Jul 18, 2011

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?

View 2 Replies


Similar Posts:


ActionScript 2.0 :: Button Inside MovieClip To Call Function In Main Timeline

Oct 4, 2010

I'm having a bit of a hard time with calling a function in the main timeline through a button in a movieclip. The mc is in the main timeline and in it I added a button with this.removeMovieClip(); and so far it works, but when I try to call a function from the main timeline it just doesn't seem to work.

View 13 Replies

ActionScript 3.0 :: Add Button Inside Move Clip And Call It From Main Timeline?

Mar 16, 2012

On the main timeline I  have a movie clip called clock_mc and playBtn playBtn is  placed in the center of clock_mc When you press playBtn clock_mc starts playing
 
playBtn.addEventListener(MouseEvent.CLICK, playClock);
function playClock(event:MouseEvent):void
{
if (event.target == playBtn)

[Code].....
 
I've tryed to placed the replayBtn on the stage on the main timeline and I've set it up to replayBtn.visible = false; And then I add replayBtn.visible = true; to last AS frame of clock_mc but it wont work Even when I put the button physically to the last frame of clock_mc it will not work either.

View 3 Replies

ActionScript 2.0 :: Make A Call From Inside A MC To Change A Frame On The Main Stage

Jun 12, 2005

Is it possible to make a call from inside a MC to change a frame on the main stage (IE: scene 1 frame 2) rather than just frames within the MC? I've already tried going gotoAndStop("1,2") but that seemed to do jack.

View 1 Replies

Flex :: Call A Function Inside ItemRenderer In A Spark List, From The Main Application?

Sep 1, 2011

I have a main application that contains a list, using a custom itemRenderer to display data.

I would like to be able to call a function, inside the itemRenderer, from the main application.

When running the app, we have a list with three persons, and a button. I want to call the function myItemRendererFunction() inside the itemRenderer, of the selected item in the list, all this, from the main app.

[Code]...

View 1 Replies

ActionScript 3.0 :: Flash Need Buttons Inside Movieclip Call Function In Main Class

Nov 16, 2010

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]

View 2 Replies

ActionScript 2.0 :: Possible To Run FLV Inside SWF Loaded Into Main?

Sep 26, 2006

I have a website up at [URL]. The thing is that I have flv files being loaded by swfs that are loaded on a movieclip of a main swf. Locally everything works fine but as soon as I move it up the web or even try to run in over my home network, the flv files won't run. Can the flv run inside a swf that is loaded into another swf? I have set the paths to relative already, this taking into account the main swf!

Something like this:
loaded_swf_folder/flv_folder/flv_file.flv
If I didn't take the main swf into account it would look like this:
flv_folder/flv_file.flv
But I tried this already and it didn't work at all. Except if you run one of the loaded swf directly instead of through the main swf.

View 2 Replies

ActionScript 3.0 :: Set Value Of A Textbox Inside A Swf Loaded Dynamically In The Main Swf?

May 15, 2009

I am trying to set value of a textbox inside a swf loaded dinamically in the main swf...i am using

Code:

this.getChildByName("nuvoletta").textbox_value.text = "something";

but i get error 1199

I am forced using getchildbyname

View 1 Replies

Actionscript :: Call Functions Inside The Swf File Loaded In SwfLoader Of Flex App?

Nov 18, 2010

I have a swf file sample.swf which has its actionscript class in Main.as. This Main.as has various objects declared as public in it. For instance lets consider an object myData of class MyData (in MyData.as).

I am loading this swf file in my AIR app using swfLoader. I want to know how do I access myData.func() using swfLoader.loaderInfo.content.

View 2 Replies

ActionScript 3.0 :: Read A Variable From Main.swf (that Load Content.swf) And Use It From Inside The Loaded Movie?

Oct 9, 2008

How to read a variable from main.swf (that load content.swf) and use it inside content.swf?

I have a variable called TextColor = "Green" in the main movie and I want to read this variable from inside the content movie?

View 5 Replies

ActionScript 2.0 :: Recognizing Within Main Timeline A Button Located Inside Externally Loaded .swf?

May 13, 2005

I'm using the preloader like the one rhamej posted here:[URL]The part of the code I need help with is as follows:

[AS]
//fire the MovieClipLoader and attach the listener to it
var container1:MovieClipLoader = new MovieClipLoader();
container1.addListener(mclListener);

[code]....

I realize the code is wrong. I wondered if it was possible after loading an external .swf ("1_movie.swf") within the container, if you could then press a button (enter_button) located within the external .swf ("1_movie.swf") , and use the preloader code to load another external .swf on release ("tree20.swf"). I'm having trouble because the preloader code is in the main timeline of my main flash file ("index.fla"), and I don't know how to make the preloader code recognize the button located within the external .swf, and use it to load another external .swf within the same movie clip.

View 3 Replies

ActionScript 2.0 :: Recognizing Within Main Timeline A Button Located Inside Externally Loaded .swf

May 13, 2005

I'm using the preloader like the one rhamej posted here:

[URL]

The part of the code I need help with is as follows:

[AS]
//fire the MovieClipLoader and attach the listener to it
var container1:MovieClipLoader = new MovieClipLoader();
container1.addListener(mclListener);

[Code].....

I realize the code is wrong. I wondered if it was possible after loading an external .swf ("1_movie.swf") within the container, if you could then press a button (enter_button) located within the external .swf ("1_movie.swf") , and use the preloader code to load another external .swf on release ("tree20.swf"). I'm having trouble because the preloader code is in the main timeline of my main flash file ("index.fla"), and I don't know how to make the preloader code recognize the button located within the external .swf, and use it to load another external .swf within the same movie clip.

View 3 Replies

ActionScript 3.0 :: Call A DispatchEvent Call From Inside Of A Static Function?

Feb 3, 2009

Does anyone know if there is a way to call a dispatchEvent call from inside of a static function?

View 2 Replies

ActionScript 3.0 :: Stop Inside Frame Not Working When Loaded Inside SWf

Mar 1, 2011

I have a flash code where i am loading an AS 2 SWF inside AS 3. The thing is if i put the AS 2 SWF on same domain its working fine but if i put AS 2 SWF on different domain it loads the SWF properly but the "stop()" written inside the AS 2 frame doesnt work... and it keeps on playing all the frames continuously...

[Code]...

View 9 Replies

Call Main Timeline Function From MC?

Aug 14, 2010

I need to run a function once a movieClip has stopped playing, but can't figure out how.

View 4 Replies

ActionScript 2.0 :: External Swf To Call On Main Swf?

Dec 10, 2010

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.

View 1 Replies

ActionScript 3.0 :: Call On Buttons Above Main Timeline

Sep 23, 2009

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:

[Code]...

View 6 Replies

Professional :: Call Movieclips From The Main Timeline?

Jul 24, 2011

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?

View 3 Replies

Call Function In Main Doc Class From External SWF?

Jul 9, 2009

I have a main.swf that loads in an external swf called home.swf. I want to be able to call a function in main.swf's doc class from the loaded swf:

Code:

function loadArtist():void { // my function }

in the main timeline of home.swf I'm calling it this way:

Code:

function timeToGo(m:MouseEvent):void {
trace("button pressed");
MovieClip(this.parent.parent).loadArtist(); }

the home.swf compiles fine but when loaded in the main.swf & the button is pressed i get this error:

TypeError: Error #1006: loadArtist is not a function.
at home_fla::MainTimeline/timeToGo()

It seems that it thinks loadArtist is a property. Ack. I've got 3 objects loaded dynamically using addChildAt(mc, 0) ...

View 2 Replies

Flash :: Call Viewstack (main App) From Component

Dec 14, 2011

I have a viewstack in my main application

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.

View 1 Replies

ActionScript 3.0 :: Call A Function On The Main Timeline?

Oct 18, 2009

I have a button in a movieclip and im trying to tell it to call a function on the main timeline. How do I do this? root something?

Here is the function on the main timeline im trying to call

ActionScript Code:
function hallwaylurkerload (evt:MouseEvent):void {
var currentGalleryID:int = 1;
loader.load(new URLRequest(galleries[currentGalleryID][0]));

[Code].....

View 1 Replies

ActionScript 3.0 :: Can't Call A Function From The Main Swf With The External Swf

Jun 23, 2010

I have one swf and this one load another one inside a MC on the stage.

Code:
function chama_movie(name:String) {
this.mcLoader.removeChild(carregador);
var carregador:Loader = new Loader();

[Code]....

View 7 Replies

ActionScript 3.0 :: How To Call Function Outside From Main As File

Aug 11, 2011

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.

The Question: How do I do this?

View 7 Replies

ActionScript 2.0 :: Call Main Swf From External Swf's Timeline?

Apr 17, 2008

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:

TweenLite.to(_level0.contentback_mc,1,{_alpha:0});
this.unloadMovie();

The first line is to make shure the large white mc becomes transparent again. The second line is - ofcourse - to unload the external swf.

The problem is that the first line doens't work. When I trace the first line from the main movie, the output contains '_level0.contentback_mc;

Oh, and the external swf is loaded in an actionscript generation container (contentback_mc).

View 1 Replies

ActionScript 3.0 :: Call Function Within Another From Main Timeline?

Jun 19, 2011

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
}}

View 10 Replies

Call Functions On The Main Timeline, From A Different Time Line?

Jul 14, 2009

so here's the function on main stage:

function slideImage(btnNum:Number)
{
trace("scrolling image");
trace(btnNum);

[Code].....

How can i acess slideImage function on the main stage. in AS2 _root.slideImage(btnNumber); would work. How Would I do this in AS3?

View 3 Replies

Professional :: How To Call Images From Folder To Main Stage

Aug 14, 2010

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.

View 6 Replies

Actionscript 3 :: Call A Function On Main Stage From A MovieClip?

Feb 2, 2012

I have to call a function that is defined on the main stage of my project, and I have to call it from a MovieClip

View 3 Replies

ActionScript 3.0 :: Call A Function Of External Swf From Main Timeline?

Apr 30, 2010

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.

View 1 Replies

ActionScript 3.0 :: "stop" Inside Frame Doesn't Work When Loaded Inside Swf?

Mar 1, 2011

I have a flash code where i am loading an AS 2 SWF inside AS 3. The thing is if i put the AS 2 SWF on same domain its working fine but if i put AS 2 SWF on different domain it loads the SWF properly but the "stop()" written inside the AS 2 frame doesnt work... and it keeps on playing all the frames continuously...
 
Here is the loading code..

var context:LoaderContext = new LoaderContext(); 
if(Security.sandboxType == Security.REMOTE){ context.securityDomain = SecurityDomain.currentDomain };
var objLoader:Loader = new Loader();var mRequest:URLRequest = new URLRequest("SomeURL.swf");objLoader.contentLoaderInfo.addEventListener(Event .COMPLETE, onSWFLoadComplete);objLoader.load(mRequest, context);

[Code]...

View 1 Replies







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