ActionScript 3.0 :: Make 2 Loaded Swfs Communicate With Each Other?

Jan 14, 2009

This has quite a long background history, so I`ll first ask the question: how can I make a loaded SWF file activate a function inside another loaded SWF file - both in the same 'parent' movie, domain and directory - when the user clicks a 'link' on the first swf?I'm new to actionscript, been only working with it for 2 months and I've been learning on the go. So far, so good, flash cs3 help has been useful, as well as this forum and other sites. My project is a website, no innovations, just simple info and light animations.The site should have an intro page (I called it index), a preloader, then the actual site (home), with links to each specific area (pages). In home, a small slideshow movie clip should always be on the upper left corner looping images until the user clicks a link to a page, when the slideshow fades away. With this briefing, I made a file for the index, and a uiloader in it would get the home file and that 'should' be it.My stage resizing event listener was working perfectly on home - standing alone - moving the slideshow exactly as it should. But when home was loaded inside index, the slideshow moved way more than it should never getting in the right place. After various unsuccessful attempts, I decided to move the slideshow into its own swf and load it directly in the index, together with the home file. This way, I managed to make it relocate precisely, but got myself the problem I'm asking here. I need to get the slideshow to fade away when the user clicks a page link, but they are separate files.

I tried to use a Loader.content based function, located at the index, but figures Flash help was not exactly clear on how I had to use it properly, so I did not manage to get it to work. It always reported an unspecified property. I searched around here and over the net, found similar problems and their solutions but could not resolve my problem. I think this is a little too specific..

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Make Transitions Between Loaded Swfs?

Oct 13, 2009

I am trying to make transitions between loaded swfs. Below is my code. I know I need to add to one of the functions to make it play the "out" transition before the new swf is loaded. Each swf has a timeline with a stop frame and a frame labeled "out". The below script allows me to press buttons and load the coresponding swf to the stage.

Code:

package
{
import flash.display.MovieClip;
import flash.display.SimpleButton;

[code]....

View 21 Replies

ActionScript 3.0 :: Make Transitions Between Loaded Swfs

Oct 14, 2009

I am trying to make transitions between loaded swfs. Below is my code. I know I need to add to one of the functions to make it play the "out" transition before the new swf is loaded. Each swf has a timeline with a stop frame and a frame labeled "out". The below script allows me to press buttons and load the coresponding swf to the stage.[code]

View 9 Replies

How To Communicate Between 2 SWFs In Separate PCs

Aug 5, 2009

I was able to use LocalConnection to have 2 swfs communicating when both sitting in the same PC, or upload those on to the server and accessing those from the same PC. Is there any way to do this between two PCs, one PC running send.swf, controlling another PC running receive.swf? I checked adobe site for LocalConnection and it looks like this only works within one client PC.

View 2 Replies

ActionScript 3.0 :: Best Way To Communicate Between 2 SWFs

Jan 10, 2011

I need to write or pass some variables from swf 1 to swf 2. This doesn't have to be done in real time and this is not going on a server believe it or not. All local. ie, swf 1 is the backend that sets variables for swf 2 to read. swf 2 can be started after swf 1 is done. Was thinking that swf 1 could write a text file and then swf 2 could read it... but was wondering if there was a better/easier way to do this? Also, swf 1 doesn't have to be a swf! If I could create an interface in html or something to allow the variable passing that would work too..

View 3 Replies

Actionscript 3 :: Communicate Two Swfs Using Javascript

Aug 9, 2011

If I playing one swf, the other swfs should pause if it was playing. I can able to communicate two swfs using javascript(both swfs are different name). But come to multiple swfs, I don't know how to differentiate the swfs beacause all are same name. I have embed 3 swf files in my html page using the following script.

[Code]....

View 1 Replies

ActionScript 2.0 :: Getting Nested SWFs To Communicate?

Jan 9, 2009

Whats the simplest way to get a nested swf to modify the value of a variable located in the parent's swf? I'm not sure localConnection is what I need.

Here is a simplified example of my situation:

main.swf
content01.swf
content02.swf

main.swf loads and unloads content SWFs ontop of it's stage.

A piece of script in each content.swf needs to modify the _hieght of a movieclip in main.swf

(imagine the movieclip is a visual container for content, and content that takes up for space needs a taller content box; hence, changing the _height of the movieclip content box)

I'm also animating the movieclip's height expanding using actionscript:

ActionScript Code:
import mx.transitions.Tween;
import mx.transitions.easing.*;
var bodySize:Tween = new Tween(BOX_Body, "_height", Strong.easeOut, 200, 500, 2, true);

I figured I could put these lines of code on the first frame of the content.swfs, but change them to affect the "Box_Body" MC on the main.swf stage?

View 4 Replies

ActionScript 2.0 :: Communicate Between 2 Nested Swfs

Feb 26, 2011

I am using a flipbook that I purchased on activeden. It loads swf files as pages. If have one video on page 1 (page1.swf) and one video on page 2 (page2.swf). Both pages are on the same spread. I want the video on page 2 to start after the video on page 1 has finished. So on page 2 I want to listen for a .complete from the video on page one. This is the code that I am using to load the video on page 1 where I need to listen for the .complete.

[Code]...

View 0 Replies

ActionScript 2.0 :: Can 2 Swfs On The Same Page Communicate With Each Other Directly

Mar 5, 2009

Can 2 swfs on the same page communicate with each other directly? Or do you have to do something tricky like setting variables in a stored object from one swf and then constantly checking for updates to it in the other swf?

View 1 Replies

ActionScript 1/2 :: Communicate Between Two Swfs Residing In Different Webpages

Oct 9, 2009

I know about Local connection class connecting two swfs in the same web page.But kindly let me know if there is any way to connect to two swfs residing in different web pages.

View 1 Replies

ActionScript 3.0 :: Communicate Between Two Swfs Residing In Different Webpages?

Oct 9, 2009

I know about communication between two swfs in the same webpage.

Is there any way to communicate between two swfs residing in different web page?

View 5 Replies

ActionScript 2.0 :: CS3 Buttons In Loaded Swfs Loading Other External Swfs Into The Main Timeline?

Sep 11, 2009

I have a main fla file which loads an external swf into an empty movieclip on the main timeline which works fine but I want a button in the external swf to load another external swf into another empty movie clip on the main timeline.eg. start.swf loads UKEIAMap.swf into (empty movie clip within start.swf) MapLoader_mc then a button havant_b within UKEIAMap.swf needs to load HavantProjectSheet.swf into (empty movie clip within start.swf) ProjectSheetLoader_mc without unloading UKEIAMap.swf

View 3 Replies

Communicate Between Loaded And Parent Swf?

Mar 8, 2009

I started learning the basics of as3.0 a year ago by doing a lot of experiments.. I never read a book or took lessons or something.. I guess i'm still missing important logics when i'm programming. I'm creating my personal flash imagegallery but I can't figure out how to communicate between a loaded swf and its parent swf.

I have a main.swf file with document class main.as which loads external swf files into a movie container. I am also loading a background sound like[code]...

The only work around I was thinking about would be to keep showing the stop/start sound button from the main.swf when a slideshow instance is called.. but then I'll screw up my design I want a second button inside the slideshow that can also stop the main bg sound.

View 1 Replies

ActionScript 2.0 :: How To Communicate With Loaded Swf

Dec 23, 2010

I have a external swfs that I am using as skins for a app launcher. They are loaded in to the main movie via xml and loadMovie.How can I pass intervals and as commands to my skins. I need to send things like:button command for closing projectorvar clockValue for clock text fields in the skinxml menu info to nested movieclip in skin.swfI was thinking shared libraries, but I want to load the skin.swf dynamically with my xml, and I want the skin to maintain its structure so the ui style can be completely changed, instead of just placing mc's in the same place each time with only a slightly different theme

View 8 Replies

ActionScript 2.0 :: Loading Other Swfs From Loaded Swfs?

Aug 2, 2006

Flash - 8 : Above is an example of what I would like to do/have done. I've gotten as far as loading the "loaded.swf" into the "start.swf" but my problem is I'd love to use that little loading action I made earlier without copying and pasting into the new movie the same actions for a different link. So, how do I load "loaded2.swf" into "loaded.swf" via the link in "loaded.swf"?

View 1 Replies

ActionScript 2.0 :: How To Communicate With Loaded Movies

Aug 3, 2006

I have a site I am building in AS3. I have a main SWF, site.swf, that loads the subsections as seperate SWF's only when a user clicks on them (to save on initial load time).or my subsections, I need to be able to communicate with the SWF that loaded it. In AS2, this was simple enough - just say something like_parent._parent.gotoAndPlay("something"), and step up enough levels to speak to movie clips in the main SWF.Trying to do this in AS3, however, results in errors such as this when trying to compile my subsection SWF:Code:TypeError: Error #1009: Cannot access a property or method of a null object reference.... because it thinks I am trying to communicate with something that doesn't exist. The result is that I can't compile my subsection SWF's.For example, I am unable to reference a variable in the main SWF using this code in my subsection SWF:

View 8 Replies

ActionScript 3.0 :: Communicate With External Loaded SWF?

Mar 5, 2010

I am building a highscore system for my site, and I was wondering how to communicate with classes that are included in an external swf that i've loaded in.

Basically, how does mindjolt do this:

[Code]....

View 1 Replies

ActionScript 3.0 :: Communicate A Variable From A Main Swf To An Loaded Swf?

Jun 25, 2010

I am comming from AS2, obviously. I have looked at many of the post people have to get "something" to be avaialble on a root type method, but I haven't found anything that has worked for this yetFor those who are saying "you're missing the point", and the rest of the "this is a bad idea" or "not needed" comments would you mind detailing the process of making a variable avaiable from a subMovie to a mainMovie and from mainMovie back to subMovie; or changing the property to an object inside of a SWF that has been added to a movie using addChild()?These are the constraints I have to work within. I can't restructure the 100-150 some odd pieces that are already in existance using AS3. New funtionality is needed that requires communication between the two movies.

View 6 Replies

ActionScript 3.0 :: Communicate With Page Class That's Not Loaded Yet?

Mar 6, 2011

I have an app with a setup page that requires the user to select a scenario for a quiz. Their choice determines the content that's loaded next.

With as2 I would have used a global variable to indicate the users choice but of course that's not longer an option, and I don't think I can send an event because the next page isn't loaded yet.

So how do I communicate with a class belonging to a dynamically loaded swf that isn't loaded yet?

View 1 Replies

ActionScript 3.0 :: Dynamically Loaded Swf To Communicate With MovieClip On The Stage?

Apr 6, 2011

I have a heck of time here with an issue. I have an xml document that when a certain button on the stage is clicked it loads it's corresponding external swf into an empty movieclip on the stage. This empty movie clip is a holder for all external swfs.So what I'm trying to do is when an external swf is loaded that has buttons on it, I need those buttons to communicate with the main timeline and remove a mc that is on the Stage. I need the currently loaded swf(s) to be able to do this.So whatever the currently loaded external swf is that's loaded, I need it to talk to the main timeline. (I have quite a few external swfs that need to do this) So I imagine I need to somehow target the currently loaded external swf to get it to talk to the main timeline.The code below in summary doesn't work but it doesn't give errors either. I don't pretend to know what I'm doing and I haven't been successful in searching for a solution to this particular issue.

// main timeline object
var index:Object=this;
function loadComplete (e:Event) {

[code].....

View 3 Replies

ActionScript 3.0 :: Loaded Swfs Not Working When Loaded Through Xml?

Jun 10, 2010

I have a "photo" gallery that loads numerous SWFs through xml, one by one on click. All works fine. All my SWF work fine stand alone. But when I load them into the player, many swf dont work properly.in example, I have textinput textfields in many of the swfs, which work fine on their own but not when loaded into the player. Then I have a word search game that works fine when alone, not when in player. I can see there is something as my mouse cursor changes into the "button finger", but nothing visual.

All drag and drop assigments work fine etc. I have no idea whats up. I have receantly switched to as3 and in as2 there was _lockroot declaration that solved similar problems, but now in as3 (where it supposedly should be automatic) it doesnt work. As it seems that it cannot recognise it own stage value, or selection_focus when loadedinside another swf through xml.Using cs4, as3.

View 4 Replies

ActionScript 2.0 :: CS3 Relative Paths - Can't Seem To Make Movie2.swf Communicate With Movie3.swf

Mar 22, 2009

My situation is this I have 4 movies which load each other, meaning: movie1.swf loads movie2.swf which loads movie3.swf which loads movie4.swf movie3.swf communicates with movie2.swf though the _parent path and it works. but i can't seem to make movie2.swf communicate with movie3.swf since movie2 is _parent i assumed movie3 is a _child...but it does not work so my question is what do i replace _child with?

PHP Code: _child.mc.gotoAndStop("subM" + no); ps: would apreciate it if u could tell me a bit about levels ex: _level10/_level0 what do they mean and how can i tell on what level i have something

View 1 Replies

ActionScript 2.0 :: Make Flash 'communicate' With Notepad File To Store Information?

Jun 17, 2003

i want to make a discussion/message board. but a very very simple one. no username, password.. just a board where people can wite one or two lines. thats all.its very hard to find one out there. i think if i can manipulate a guestbook files, i can make a simple discussion board. The problem is that i dont understand how to make flash 'communicate' with notepad file to store information like how they did in guestbook. this is link to one of flash message board i found, but it has too many section - like kirupa forum. i dont have any ideas to make it as simple as i want. i dont understand the AS

View 2 Replies

ActionScript 2.0 :: Controlling Duplicate Movieclips - Communicate With Those Clips Specifically To Make Them Draggable

Aug 5, 2004

how to communicate with those clips specifically to make them draggable and also to change the _rotation with Key.Right, Key.Left.

View 7 Replies

Actionscript 3 :: How Can A Loaded Child Swf 1 Communicate To Next Child Swf, Child Swf 2, Which Is Currently Not Loaded

Oct 14, 2011

I have a parent swf with three buttons: next button, back button, ticker on/off button.I have three child swfs, each with a ticker mc. When I click on ticker button on parent swfit dispatches a custom event which brings ticker MC on stage and thus ticker becomes visible (ticker off button displaces it out of stage by changing the value of ticker_mc.y).

the problem I am facing is when ticker is on and I click next or back button to load next or previous child swf, the ticker goes off. How can I make sure that ticker is on all the time and closes only when I close it. How can a loaded child swf 1 communicate to next child swf, child swf 2, which is currently not loaded, that since the ticker is on on swf 1 so you please keep the ticker on on swf 2 as well?!

I think I know the problem. I have put a default value of ticker_mc = 160 (makes ticker inactive) on every child swf. So, the ticker becomes inactive everytime I load a new child swf. If someone could guide how can I do this, my problem will be solved: When first child swf is loaded, the default value of ticker_mc.y should be 160. I want to hold this value in a variable. When I click ticker active btn, position of ticker_mc changes to 194 so the value of variable should change to 194. When I click next btn, the variable value (160 or 194) should be sent to next child swf and ticker_mc.y should be equal to variable value.

This is the code so far

"Next button"
go_mc.next_btn.addEventListener(MouseEvent.CLICK, playNext);
function playNext(e:MouseEvent):void {
if (swf_no < (clips.length-1)) {

[code]....

View 1 Replies

ActionScript 3.0 :: Using New() On Loaded Swfs?

Aug 7, 2010

Usually when I want to create multiples instances of a same movieclip (that's already in the main .fla library) I use new mcClassName()but what if the clip is external, for example Ball.fla, Ball.as and Ball.swf? I've loaded Ball.swf into the main .fla and I don't know what to do now

View 4 Replies

ActionScript 1/2 :: Loaded Swfs Distorting?

May 5, 2009

I've made a simple portfolio web site which loads a swf file containing the navigation at the top and then the navigation loads individual swf files containing full page images.The problem is the full page images are distorting very slightly when they are loaded in. I've attached two images, the first image (picture2.png) is how looks when I just open the image's swf file, and the second image (picture3.png) is how it looks after its loaded in by the navigation.

View 2 Replies

ActionScript 3.0 :: Unloading Xml Loaded Swfs?

Sep 29, 2008

how to unload the swfs in as3 once you click a button to load a new one.

My file works great, with the exception of the videos playing over each other. slight bummer.

I have five buttons that each pull an external swf that is controlled by an xml file. If there were not sound it would not be an issue, but the sound overlaps if you click to the next link before the first video finishes playing.

I uploaded all the files here, including two test flv files. the files were too big to upload to the kirupa forum.

[URL]

View 3 Replies

ActionScript 2.0 :: Two SWFs Loaded - Possible To Control One With Another

Nov 22, 2009

I m loading 2 .swf in one flash file and want to control one with another. The first contain small animation and other has play and stop button. Now I want to control that animation with these 2 button.
Files details:
test1.swf: It has the animation
test2.swf: It has the 2 buttons
test3.swf: It is the main file, in which I m loading the 2 files i.e. test1.swf and test2.swf

View 1 Replies

ActionScript 3.0 :: Keep Menu On Top Of Loaded Swfs?

Jan 9, 2011

This may seem a stupid question but I just started learning AS3, Is it possible to keep my menu on top of externally loaded swfs? My menu is sitting on the main timeline as movieclip and the externally loaded swf overlap my main timeline completely completely covering my menu.[code]....

View 5 Replies







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