Actionscript 3 :: Using Events In An External Swf To Load A New External Swf

Mar 31, 2010

I'm trying to get an external swf to load when the flv content of another external swf finishes playing.

I've only been using actiosncript 3 for about a week and I've got to this point from tutorials, so my knowledge is limited.

This is what I've got so far:

Code for External swf (with flv content):
import fl.video.FLVPlayback;
import fl.video.VideoEvent;
motionClip.playPauseButton = player;

[Code].....

I'm starting to get an understanding of how all of this works, but it's all to new to me at the moment, so I'm sure I've approached it from the wrong angle.

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Button Events To Load External SWF's Into Mc On Stage?

Jan 6, 2011

I have been trying to pick up more as3 lately, also have been converting some of my sites from as2 to as3. In as2 I could create 3 menu buttons and save them in a mc- lets call it menu_mc. This menu_mc sits on my main stage. I have also placed a mc on stage to hold anything that I load. Lets call it holder_mc. So I figured out how to get my email button to work using this:

email_mc.addEventListener(MouseEvent.CLICK, mailto);
function mailto(event:MouseEvent):void {
var email:URLRequest = new URLRequest("mailto:myemail@mail.com");
navigateToURL(email, "_blank");
}

That's fine. What I can't for the life of me figure out is understanding how to click on one of my menu buttons and load a swf into my holder_mc on stage. In as2 I could use this code on a button :

on (release) {
//load Movie Behavior
if(this.my_holder == Number(this.my_holder)){

[code]....

View 1 Replies

ActionScript 3.0 :: Button Events To Load External SWF's Into Mc On Stage

Feb 4, 2010

I have been trying to pick up more as3 lately, also have been converting some of my sites from as2 to as3.

In as2 I could create 3 menu buttons and save them in a mc- lets call it menu_mc. This menu_mc sits on my main stage. I have also placed a mc on stage to hold anything that I load. Lets call it holder_mc. So I figured out how to get my email button to work using this:

email_mc.addEventListener(MouseEvent.CLICK, mailto);
function mailto(event:MouseEvent):void {
var email:URLRequest = new URLRequest("mailto:myemail@mail.com");

[Code].....

View 2 Replies

ActionScript 3.0 :: Load External Sounds To Be Used For Events In A Game?

Mar 20, 2011

I have a game where sounds are triggered when things happen. These sounds need to be loaded externally so they can be changed. It seems like the sound class is just for loading streaming sound files. Is there a good way to load in these sounds and then have them triggerable and controllable by game events?

View 3 Replies

Flash :: Preloader To Load External SWF Without PROGRESS And COMPLETE Events

May 27, 2011

I have created the following preloader saved as "preloader.swf" that loads an external SWF file as follows:[code]I was reading to try avoid the PROGRESS and COMPLETE events since these events don't work 100% of the time.Now my question is this: is there a way of how I can go about to have the same functionality of loading an external SWF file (as above) but WITHOUT using the PROGRESS and COMPLETE events?

View 1 Replies

ActionScript 2.0 :: External Text Files Wont Load Into External Swf File?

May 28, 2007

Structure: There is 1 main file that loads external SWF files depending on what is clicked on.One of the external SWF files loads its text from external text files. This works fine when viewing the SWF applet on its own. But when viewing as a whole site, the text doesnt appear. Very annoying.I made that particular SWF on my mums computer running Flash MX 2004The flash file itself uses the Scrollbar component from MX.Could someone tell me why the text doesnt load in this scenario? It runs fine on its own, just not as an external SWF.

View 4 Replies

ActionScript 2.0 :: Trigger External Swf To Load Into Main Swf From Button In Another External Swf?

Apr 22, 2007

I am trying to get a nav button in one movie (main_nav.swf) to target a my main movie (index.swf) and load a sub nav movie (metals_subnav_infinite.swf) into it. The sub nav movie will do a similar task - loading a portfolio swf into main movie (index.swf). Here is the file breakdown of my working files:index.swf - main final movie which loads "main_nav_infinite3.swf" on startmain_nav_infinite3.swf - loads main nav "main_nav.swf" and scrolls it infinitely (infinite menu)main_nav.swf - main nav with buttons that trigger sub nav "metals_subnav_infinite.swf" to load into index.swfmetals_subnav_infinite.swf - loads sub nav "metals_subnav.swf" and scrolls it infinitelymetals_subnav.swf - sub nav with buttons that trigger "folio.swf" (have not created this file yet!) to load into "index.swf"The script I was focusing on is in main_nav.fla and it is:

metals_mc_bn.onRelease = function() {
reActivateMenu();
this.gotoAndStop(3);

[code].....

View 2 Replies

ActionScript 2.0 :: CS3 : Load External Library Objects From An External Swf?

Jan 19, 2009

How do you load external library objects from an external swf? I want to have an external swf that only contains library objects that are exported for Actionscript, and load these from the master .swf file dynamically during the master swf execution. (I may have multiple external swf resource files)I want to be able to load the external swf, and then access it's library objects via actionscript in my main swf file.

View 6 Replies

ActionScript 3.0 :: Using Loader To Load An External Swf And Control The External Swf?

Nov 17, 2010

as3 is new for me, but i would like to write a script using loader to load an external swf, and control the external swf. But I find I can't control the swf, because there are no fixed instance name. here is my script.

[Code]...

View 3 Replies

ActionScript 1/2 :: Load An External Xml In An External Loaded .swf

Jul 24, 2009

I've got a small (more than 100 hours of thinkwork up till now!) problem I can't seem to solve:

I want to populate an external loaded swf with an dynamicly loaded xml fil (loaded from my config.xml).

[Code].....

how do I get the external xml into the external swf as a variable for the actionscript in the external loaded swf (So I just want to put the path in the script in my external swf...).

View 5 Replies

Actionscript 3.0 :: External Menu Load External Swf

Aug 2, 2009

i have a main.swf and i load menu.swf into main

[Code]...

this works right on its own but when using addchild in main.swf the menu loads the button events work, even click but it will not load the associated file. If i place the menu code in the main.swf it loads all required files. QUESTION How do reference menu.swf when loaded as an external swf?

View 2 Replies

ActionScript 2.0 :: External .swf - Unable To Load CSS With External .swf's?

Dec 24, 2006

I have a "about.swf" file that loads a CSS file and formats some dynamic HTML text. On its own, it works fine...but when it gets loaded into my "Main.swf", it doesn't work. What am I doing wrong? Is there a bug that doesn't let you load CSS with external .swf's?My style sheet and index file holding the "Main.swf" are all on the root level of my site. The "Main.swf" has a "holder_mc" clip that I load the "about.swf" into which has the CSS formatting. When loaded into "Main.swf", it doesn't work.

View 9 Replies

ActionScript 3.0 :: Load External SWF And Unload External SWF

Jun 13, 2010

I'm sure this question has been answered but I have been looking everywhere and all I can find is how to load an external SWF but not how to unload it. I come from a basic knowledge of AS2 and it was easy for me to load using levels but I have run into a wall. I have a main swf and to keep the initial filesize small I would like to split some image intensive sections out and load them when needed.

View 6 Replies

IDE :: Preload External Swf Then Load Another External Swf On Top Of It?

Dec 17, 2009

Normally I do get by with a lot of R&D, but for some reason am stumped and really pressed for time!An interactive file (say main.swf) is already ready to go.I now need to make this play over a background (say bg.swf) which is a fairly heavy file.

What I'm trying to do it this:Open a new flash document (say "index.fla")- on the first frame, call "bg.swf" by using "loadMovie('bg.swf', 2)"[where 2 is the level number] and then calling "main.swf" by using "loadMovie('main.swf' 4)" [where 4 is the level number]

Now the problem I am facing is this:"bg.swf" is quite a heavy file so takes quite some time to load, whereas "main.swf" is much lighter and loads before "bg.swf" buffers fully.

What I want to achieve is this:Create a new swf file (say "index.swf"), making sure that "main.swf" does not load until "bg.swf" loads completely under it. Note: I cannot make any edits to "main.swf" (which is like a slideshow) file and it is rendered such that it starts the slideshow after 5 seconds.

View 1 Replies

ActionScript 2.0 :: Keyboard Events And External SWF?

Aug 12, 2010

I finally found a way to exactly position my External SWF on the main stage. Here is the Actionscript I placed on an empty layer:

Code:
this.createEmptyMovieClip("externalSWF",1);
externalSWF._x=550;

[code].....

View 2 Replies

ActionScript 3.0 :: Menu Selections - External SWF And Events

Apr 8, 2009

I have a Main Menu swf with Menu selections. When you click on the Menu1 button it launches a separate swf file that will be doing allot of things. I have buttons, video etc. All with some sort of a addEventListener attached to them. Because the Main Menu is running and you have the option to select another button, which launches another swf, I am unloading the current swf. I can tell the video is still running in the previous swf because you can hear it. I use the SoundMixer.stopAll() and that stops the video. But what about all those addEventListeners?

This is what loads the external swf (Main Menu).
Lesson = external swf
var myLesson:MovieClip = new MovieClip();
addChild(myLesson);
myLesson.x = 205;
myLesson.y = 30;
[Code] .....

This is what unloads the external swf: I call this in a couple of places depending if the selection is in another external swf.
myLoader.unload();
I also have been noticing that the naming of instances is increasing allot in a few of my lessons. Don't know if that has an impact on anything or not. How do you control events running in a separate external swf from a Main swf or stop, remove them.

View 3 Replies

ActionScript 3.0 :: Dispatching Events In External Swf File?

Jan 22, 2009

I have problems dispatching events from an external swf file.

The class that loads the file only receives the original events of actionscript (for example MouseEvent.CLICK, etc) and ignores others that are dispatched with a own event class or dispatched with a direct string in the type parameter. For example:

dispatchEvent(new PLYPubliEvent(PLYPubliEvent._OVERLAY_OPEN))
dispatchEvent(new Event("testtt"))

These events are dispatched from the loaded swf file in the main timeline.

View 3 Replies

Flex :: Dispatching Events From External Class?

Dec 21, 2011

I have a main application Planner.mxml. This view has a couple of custom components, one of which is LoginView.mxml. In LoginView.mxml I do the following:

protected function btnLoginClick(event:MouseEvent):void
{
try
{

[code]....

As you can see, when the user is successfully logged in, I want to dispatch a custom event; if not, I show an alert box. However, this event doesn't dispatch (or at least, I don't know how to listen for it).

I would like to listen for it in my main application where I can then change my viewstate to the logged-in state. However, the event never seems to get there. I listen for it by having loggedIn="loggedInHandler(event)" on my loginComponent.

View 2 Replies

ActionScript 2.0 :: OnPress Inhibits External Swf Events?

Oct 18, 2010

i have a scripted button named button.swf.

when i load it from another swf an i assigin to it the onPress event, this cause to block avery event in it like onRollOver,onRollOut...

for example

//pseudocode
called.swf
var mc:MovieClip;
mc.onRollOver=somefunc();

[Code]....

View 2 Replies

ActionScript 3.0 :: Dispatching Events - External SWF & Main Stage?

May 15, 2011

I am dispatching two different events showbutton and removebutton from the code inside the LOADED SWF.on main file, (the one that is loading the swf file) i m listening for events and either showing or removing the buttons based on proper scenario. Here is he error i m getting.
  
ERROR   1180  Call to a possibly undefined Method Event   - - - > dispatchEvent(new Event("showbutton"));

[Code]...

View 6 Replies

Flex :: Events - Updating External Components From An Action?

Apr 6, 2010

I'm new to Flex and am having trouble understanding Events. I think Events are what I want to use for my situation. I have 2 components, addUser.mxml and listUsers.mxml. I access these from a ViewStack in my main application. When I load listUsers.mxml it shows a list of current users in a datagrid via a HTTPService call. When I add a user using the form on addUser.mxml I would like the datagrid in listUsers.mxml to refresh when I return to that view to show the new user. I've tried several different things with addEventListener and dispatchEvent but can't seem to get it working. Can someone help me with this logic?

[Code]...

View 2 Replies

Java :: Get Flash To Respond To External Html Events?

May 17, 2011

I want my flash movie to respond to rollover type events for links on my website. The idea being that the flash movie will provide descriptions of the links when moused over, but if the user doesn't have flash the functionality isn't lost. What's the best way to do this (if it's possible)?

View 1 Replies

Flex :: Listening To Events In Javascript Without Using External Interface?

Jul 6, 2011

I need to register events in flex and listen to them in java script. Is there any way other than using external interface.

View 1 Replies

ActionScript 2.0 :: Mouse Events In External Movie Don't Work.

Jan 15, 2004

I have an external .swf that I'm loading into a main one. The external one has actionscripting which reacts to the mouse. When exported on it's own, the scripting works fine but when loaded into the main one, nothing works. There are no references to the _root in the external swf either.

View 7 Replies

ActionScript 3.0 :: No Stage Mouse Events With External Swf Loaded?

Mar 9, 2009

I have noticed that when I load an external swf, I lose my stage event listeners while my mouse is inside of the loaded swf. Is there a way to fix this?

Code:
// load the swf
var swfContainer:MovieClip = new MovieClip();
container.addChild(swfContainer);[code]....

View 13 Replies

ActionScript 2.0 :: Mouse Events In External Movie Don't Work?

Jan 15, 2004

I have an external .swf that I'm loading into a main one. The external one has actionscripting which reacts to the mouse. When exported on it's own, the scripting works fine but when loaded into the main one, nothing works. There are no references to the _root in the external swf either.

View 7 Replies

ActionScript 3.0 :: Getting Keyboard Events To Work Inside External Flash?

May 14, 2011

I'm moving on from trying to getting Keyboard Events to work inside external flash.

So i moved onto Mouse Clicks, but i have a problem with hitTestObject.

I did it the exact same way my tutor did, but it does not want to work for some reason...

Here is the good for Player.as

ActionScript Code:
package {
import flash.display.DisplayObject;
import flash.events.*

[Code]......

View 3 Replies

Actionscript 3 :: Load A Local External SWF, The Application Load-unload Infinitely?

May 6, 2011

I have a Flex application that just load an external SWF, but the application load and unload infinitely my swf.

[Code]...

View 2 Replies

Actionscript 3 :: Load An External Swf File Using Loader.Load?

Sep 19, 2011

When i try to load an external swf file using Loader.Load(); The swf starts playing even before the init event is fired. Is there any way to stop the swf from playing atleast until the init event or complete event is fired?

View 1 Replies

ActionScript 3.0 :: External Swfs Load In Different Places On 2nd Load

Oct 19, 2009

I'm loading (and unloading) external swfs into a holder in my main document. However, they seem to load perfectly the first time, but after that, they load at a different x and y. I've seen this happen before in someone else's file, but I'm not sure what the solution is.

This is the bare bones of it:

Code:

sceneHolder.x=0;
sceneHolder.y=0;
addChild(sceneHolder);

[Code].....

View 1 Replies







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