Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Extensions and Plugins > Components

Reply
 
Thread Tools Rate Thread Display Modes
Old 07-07-2002, 09:45 PM   #1
moheb
Registered User
 
Join Date: Jun 2002
Posts: 17
Send a message via ICQ to moheb Send a message via Yahoo to moheb
Thumbs down 2 swf's Communicate?

hi,
I have 2 swf's
1.swf and 2.swf
1 is very long, 2 is very short
so that creates an L shape ... but since im already trying to use some HTML on the compliment of the L shape so i cant make them both into 1 block or 1 swf ... i have 2 make them 2 ...

I just want 2 have a button in 1.swf to simply LOAD 2.swf NEXT to 1.swf (& not over it) .... thats all
it sounds so simple but i just cant figure out a thing

I heard that Flash MX can make 2 swf's communicate but i never found that in the help .... also if the only way is JS can someone make up a mock file 2 show me the exact coding needed to acheive this interaction?
Thanks
moheb is offline   Reply With Quote
Old 07-07-2002, 10:08 PM   #2
JHallam
Dosed...By Flash!
 
Join Date: Feb 2001
Location: England - Nottm
Posts: 1,192
Send a message via Yahoo to JHallam
Default

If you look in the actionscript dictionary there is a command which is usefull in this process.

basically, on a button use;
ActionScript Code:
on(release) { loadMovie("swf2.swf", _root) }

If you want it in a certain place on the movie, then you need to load it into a empty MC.

so create a MC (movieClip) don't put anything in it and then put it on the _root and place it where you want the swf to show.
Instance the MC to whatever you like.

then use on a button;
ActionScript Code:
on(release) { _root.mcINSTANCE.loadMovie("swf2.swf") }

Simple
__________________
[ JHallam | FOLIO.root | EMAIL.root
JHallam is offline   Reply With Quote
Old 07-07-2002, 11:55 PM   #3
Billy T
Oops I did it again
 
Billy T's Avatar
 
Join Date: Oct 2001
Location: Melbourne
Posts: 8,579
Default

cant you just load them into separate html frames?

yes mx has some new stuff for separate swfs to talk to each other - have a read of this - http://www.actionscripts.org/tutoria...ns/index.shtml

cheers
__________________
Billy
Online Galleries
iPhone Safety App - iStaySafe
Free Flash Video Tutorials
Photo Website Template

Don't email or PM me questions...
Billy T is offline   Reply With Quote
Old 07-08-2002, 02:23 AM   #4
korayem
Registered User
 
Join Date: Jul 2002
Posts: 1
Thumbs up

perfect!!!......
korayem is offline   Reply With Quote
Old 07-08-2002, 07:34 AM   #5
moheb
Registered User
 
Join Date: Jun 2002
Posts: 17
Send a message via ICQ to moheb Send a message via Yahoo to moheb
Default

hi
thanx alot for your help
now i was wondering if I could use this technique to make 1 movie actually load the other movie THEN goto a flagged frame (or frame number) in it ... is that possible?
moheb is offline   Reply With Quote
Old 07-08-2002, 07:39 AM   #6
Billy T
Oops I did it again
 
Billy T's Avatar
 
Join Date: Oct 2001
Location: Melbourne
Posts: 8,579
Default

should be possible - did you try it?
__________________
Billy
Online Galleries
iPhone Safety App - iStaySafe
Free Flash Video Tutorials
Photo Website Template

Don't email or PM me questions...
Billy T is offline   Reply With Quote
Old 07-08-2002, 07:41 AM   #7
moheb
Registered User
 
Join Date: Jun 2002
Posts: 17
Send a message via ICQ to moheb Send a message via Yahoo to moheb
Default

Well, I'm trying to but I'm pretty much terrible with actionscripting ... could u take a look at it please?
moheb is offline   Reply With Quote
Old 07-08-2002, 12:54 PM   #8
Billy T
Oops I did it again
 
Billy T's Avatar
 
Join Date: Oct 2001
Location: Melbourne
Posts: 8,579
Default

I have to go to bed

if I get time to play with it tomorrow I will

I just did a quick test and you dont seem to be able to communicate with a movie that is not already loaded (which is understandable) but there is probably some sort of work-around

cheers
__________________
Billy
Online Galleries
iPhone Safety App - iStaySafe
Free Flash Video Tutorials
Photo Website Template

Don't email or PM me questions...
Billy T is offline   Reply With Quote
Old 07-08-2002, 01:02 PM   #9
moheb
Registered User
 
Join Date: Jun 2002
Posts: 17
Send a message via ICQ to moheb Send a message via Yahoo to moheb
Default

ok i dont need to interact with an unloaded movie
i'll load a movie with a blank first frame
thats all i need

if u've been able to do that with two loaded movies can u please attach them as a zip file and post them here?
moheb is offline   Reply With Quote
Old 07-08-2002, 11:37 PM   #10
Billy T
Oops I did it again
 
Billy T's Avatar
 
Join Date: Oct 2001
Location: Melbourne
Posts: 8,579
Default

ok here's a bit of a dodgy hack up of Jesse's code

cheers
Attached Files
File Type: zip localconnection.zip (7.9 KB, 187 views)
__________________
Billy
Online Galleries
iPhone Safety App - iStaySafe
Free Flash Video Tutorials
Photo Website Template

Don't email or PM me questions...
Billy T is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Variables between 2 swfs in seperate htmls holtzy ActionScript 1.0 (and below) 18 06-23-2006 10:17 PM
How can I detect when 2 swf's loaded into a movie touch? BuckD ActionScript 1.0 (and below) 3 12-17-2003 01:44 PM
2 Button Clicks = 1 Action? Pyroclasm ActionScript 1.0 (and below) 3 12-03-2003 07:04 PM
conditional checking between 2 swfs? shindavid ActionScript 1.0 (and below) 3 11-10-2003 06:26 AM
2 SWF's on 1 HTMLpage one controls the other - Help! PiNtuP Server-Side Scripting 2 06-20-2002 07:12 AM


All times are GMT. The time now is 11:54 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.