How do I trigger an action when one swf is swapped for another?

This is a discussion on "How do I trigger an action when one swf is swapped for another?" within the Flash & Multimedia Forum section. This forum, and the thread "How do I trigger an action when one swf is swapped for another? are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Flash & Multimedia Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Apr 24th, 2007, 21:41
Junior Member
Join Date: Apr 2007
Location: USA
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
How do I trigger an action when one swf is swapped for another?

Well, here I go again. I am able to perform a certain action when a particular .swf is loaded into a blank movie clip.

My question is, how do I reverse what I started and trigger another action when my particular .swf is being swapped out for another? I'm new at this so I don't really have any clue at all, especially in terms of ActionScript syntax...

You can can see what I mean at www.thekeelings.org/audible - Click on "Services" and then on "Graphic Design"

In the area where the Red bar is loading ---- I want to show this area when the graphic design page is displayed, then hide it when the user moves on to another.

Last edited by Keeldog; Apr 24th, 2007 at 22:07.
Reply With Quote

  #2 (permalink)  
Old Apr 25th, 2007, 16:56
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Sgaspar11
Re: How do I trigger an action when one swf is swapped for another?

Hmm, if that section is a movie clip you can use actionscript to change the alpha of the object, therefore "hiding" it.

It'd look something like this:

Code: Select all
on (release) { 
op = _root."mcname"._alpha; 
if (op>0) { 
_root."mcname"._._alpha = 0; 
} 
if (op<=0) { 
_root."mcname"._._alpha = 100; 
} 
}
You could also use the onload function or loadmovie I am sure as well, but I'll let you have some fun figuring that out. This should start you on the right path though.

Cheers,

Scott


Last Blog Entry: Yay!? (Oct 8th, 2007)
Reply With Quote
  #3 (permalink)  
Old Apr 25th, 2007, 17:27
Junior Member
Join Date: Apr 2007
Location: USA
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How do I trigger an action when one swf is swapped for another?

Thanks getting me on the right track. I'll see what I can come up with.
Reply With Quote
  #4 (permalink)  
Old Apr 25th, 2007, 17:34
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Sgaspar11
Re: How do I trigger an action when one swf is swapped for another?

Great, let me know if you run into any snags.
Last Blog Entry: Yay!? (Oct 8th, 2007)
Reply With Quote
  #5 (permalink)  
Old Apr 28th, 2007, 06:22
JacobHaug's Avatar
SuperMember

SuperMember
Join Date: Dec 2005
Location: On Internet
Posts: 4,859
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to JacobHaug Send a message via MSN to JacobHaug
Re: How do I trigger an action when one swf is swapped for another?

Here is another slightly different method to accomplish the Alpha Transparency effect. I make it super easy to understand and reuse over and over again. Article located here.
Reply With Quote
Reply

Tags
actionscript, swapping, swf

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
trigger onchange niko79 JavaScript Forum 2 Jan 10th, 2008 12:46
how to change button action into a movieclip button action cjrollo Flash & Multimedia Forum 7 Nov 21st, 2007 17:07
IE Active X trigger? Lchad Web Page Design 0 Feb 9th, 2007 11:52
insert image trigger by variable value from a form kyk JavaScript Forum 5 Aug 19th, 2006 09:15
Help with the following action. mrmag2000 Web Page Design 3 Jul 8th, 2005 12:26


All times are GMT. The time now is 16:52.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43