dcsimg
A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: how to control another swf within the SAME html page

Hybrid View

  1. #1
    Junior Member
    Join Date
    Jun 2002
    Posts
    17
    ok guys, i've searched for 2 hours in this site and in flash but can't find a answer. i hope some of you can help with this. what i'm trying to do is very straight-forward:

    - html page containing 2 tables, "table1" and "table2".

    - each table contains a swf file, "swf1" and "swf2" respectively.

    - "swf2" is set to stop initially, and i want to click on "swf1" so that "swf2" will start playing. how can i set the code in "swf1" so it sees "swf2" when placed in the same html page?

    i've tried using the "loadmovie" command and tweaking with target and movie level settings, but they don't seem to work. i'm using dreamweaver mx, and tried labeling names to each of the swf files, and have the actual swf file call out that name. still to no avail.

    can somebody please provide a sample code that enables one swf to detect and control another swf within the same html page? the two swfs are in the same directory.

    MUCH THANKS in advance! *wipes sweat off forehead*



  2. #2
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Although not done in DW, all you need to know is in the html:

    http://odin.prohosting.com/~oldnew/movie1.html

  3. #3
    Junior Member
    Join Date
    Jun 2002
    Posts
    17

    wow...

    thank you, oldnewbie.

    quite a bit of extra coding involved, but i understood your page. macromedia gotta make this easier for us! might be a good feedback topic to submit to them for flash's next upgrade, heh.

    thanks again.


  4. #4
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Well, you can check the localConnection bit:

    http://www.macromedia.com/support/fl...connection.htm

    Seems much more powerful than my html...
    But to say it would be easier might be an euphemism!

  5. #5
    Product Designer keyone.it's Avatar
    Join Date
    Aug 2001
    Location
    Rome, Italy.
    Posts
    1,625
    I actually can't understand why you don't like local connection....it's far more cross-platform compatible than javascript.. and I find it really easy to use (I'm a dork so if I can use it anybody can................)

  6. #6
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    It's not that I don't like it... I'm just saying that it might be an overkill sometimes!
    As for cross-platform compatibility, I don't care for any of it. As long as it works with IE on a PC, that satisfies me! Mac and Netscape users can upgrade if they so wish! It's their problem, not mine!


  7. #7
    Product Designer keyone.it's Avatar
    Join Date
    Aug 2001
    Location
    Rome, Italy.
    Posts
    1,625
    Well, I'd like any "not compatible user" just to burn out of the way and let us have phun with experimental tricks...but unfortunatelly clients get angry when they recieve contact from angry visitors with apple computers...heheeh

    and I find mac is a lot better that pc (as regarding to DCC software...it's all about G4 cpu's....and actually if you go check any professional video editor, he will be using Avid systems, which are all integrated with Mac computers..(their internal bus's are a lot better for huge-bandwidth-sucking applications..)

    I have a pc ANYWAY (Pro/Engineer doesn't work on mac...)

  8. #8
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    It so happens that I'm a film/video editor that's been working on Avid for the last 12 years! After closing down our 15 years old company, I even have two old systems (Quadras not G4!) at home.
    Even used FCP on a G4 Titanium recently... Works pretty good! But after my day's work, it's my PC and nothing else!

    http://us.imdb.com/Name?Gill,+Fran%E7ois
    [Edited by oldnewbie on 09-17-2002 at 11:18 PM]

  9. #9
    Product Designer keyone.it's Avatar
    Join Date
    Aug 2001
    Location
    Rome, Italy.
    Posts
    1,625
    I don't know but I have a weird attraction for Mac...probably being a product designer and seeing the excellent marketing job they did...and the beautiful style that came out of it!
    I find that Apple has taken the right way...giving good quality contents in a beautiful dress. An example can be the i-Pod, which is the only darn mp3 player to have decent memory...and a neat quality-to-cost ratio...all the other products on the market are absolutely rediculus...

    But in the end yes, I prefer my good old (very old) pc...with an open side and a full atx agp card acting as a terrace just in the middle of it...

  10. #10
    Junior Member
    Join Date
    Jun 2002
    Posts
    17
    that's interesting. i'm a mac and pc user as well, but as i progress into more pc work lately, the only thing i really miss on the mac are the hotkey layouts. the command button on the mac is so much easier to access than the pc's control button. which programmer ever decided to implement the control button as a hotkey?? you almost need 6 fingers to use it efficiently.

  11. #11
    Senile member! :)
    Join Date
    Dec 2001
    Location
    Saunaswamp (transl)
    Posts
    2,296
    A little caution with the LocalConnection:

    Open the example page from macromedia above. then open it in a second browser window. The text sent in the secondly opened browser window ends up in the reciever of the first page. Oooops!!!

    If a user decides to open your site in multiple windows (It happens, I usually do!) your LocalConnection is screwed up! Of course there's a cure!

    here is a way I've created:
    http://www2.norsjo.net/mirandir/frames.html

    the fla files here:
    http://www2.norsjo.net/mirandir/sender.fla
    http://www2.norsjo.net/mirandir/reciever.fla

    /Mirandir

  12. #12
    Junior Member
    Join Date
    Jun 2002
    Posts
    17
    mirandir,

    thank you for the resource.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center