how to change button action into a movieclip button action

This is a discussion on "how to change button action into a movieclip button action" within the Flash & Multimedia Forum section. This forum, and the thread "how to change button action into a movieclip button action 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 Nov 21st, 2007, 10:40
Junior Member
Join Date: Feb 2007
Location: England
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
how to change button action into a movieclip button action

Can anyone help with this simple problem
How do I edit this button action

AS
on (release) {
if(_root.currMovie != "collectionsb"){
_root.currMovie = "collectionsb";
containerone_mc.loadMovie("collectionsb.swf");
}else{
if (containerone_mc._currentframe >= containerone_mc.midframe) {
containerone_mc.play();
}
AS

so I can put it onto a frame in a movieclip button which starts off like this

AS
stop();

this.onEnterFrame = function(){

if(rewind == true){

prevFrame();

}

}

this.onRollOver = function(){

rewind = false;
play();

}

this.onRollOut = function(){

rewind = true;

}
AS

Thankyou to anyone who can help me
Reply With Quote

  #2 (permalink)  
Old Nov 21st, 2007, 10:53
marSoul's Avatar
Moderator
Join Date: Sep 2007
Location: Tehran - Iran
Age: 28
Posts: 411
Blog Entries: 2
Thanks: 3
Thanked 4 Times in 4 Posts
Send a message via MSN to marSoul Send a message via Yahoo to marSoul
Re: how to change button action into a movieclip button action

if you could send the .fla file it will be better to help you...
__________________
Designing For Communicating
Website : http://www.datisdesign.com
Weblog : http://blog.datisdesign.com

Last Blog Entry: Throughout IRAN (Dec 10th, 2007)
Reply With Quote
  #3 (permalink)  
Old Nov 21st, 2007, 13:00
Junior Member
Join Date: Feb 2007
Location: England
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
how to change button action into a movieclip button action

Thanks here is an example of the problem attached
so I need to replace this movieclip action on the first frame of the actionscript layer in MC Collections

AS
this.onRelease = function(){

getURL("http://www.kirupa.com","_blank");

}

AS

with this button action

AS
on (release) {
if(_root.currMovie != "collectionsb"){
_root.currMovie = "collectionsb";
containerone_mc.loadMovie("collectionsb.swf");
}else{
if (containerone_mc._currentframe >= containerone_mc.midframe) {
containerone_mc.play();
}
AS

Thanks
Attached Files
File Type: fla example1.fla (48.0 KB, 5 views)
Reply With Quote
  #4 (permalink)  
Old Nov 21st, 2007, 13:41
marSoul's Avatar
Moderator
Join Date: Sep 2007
Location: Tehran - Iran
Age: 28
Posts: 411
Blog Entries: 2
Thanks: 3
Thanked 4 Times in 4 Posts
Send a message via MSN to marSoul Send a message via Yahoo to marSoul
Re: how to change button action into a movieclip button action

can you describe more for what you want to do ?
still i didnt get what you want
__________________
Designing For Communicating
Website : http://www.datisdesign.com
Weblog : http://blog.datisdesign.com

Last Blog Entry: Throughout IRAN (Dec 10th, 2007)
Reply With Quote
  #5 (permalink)  
Old Nov 21st, 2007, 14:13
Junior Member
Join Date: Feb 2007
Location: England
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Re: how to change button action into a movieclip button action

I just need to edit the script which opens external file
Quote:
collectionsb.swf
into a container called
Quote:
containerone_mc
this is what I need to edit

Quote:
on (release) {
if(_root.currMovie != "collectionsb"){
_root.currMovie = "collectionsb";
containerone_mc.loadMovie("collectionsb.swf");
}else{
if (containerone_mc._currentframe >= containerone_mc.midframe) {
containerone_mc.play();
}
so that it can be put onto a movieclip button at the moment it is written for a button not a movieclip and I don't know how exactly to change it
It starts
Quote:
on (release) {
and I know I think for a moveiclip it should sart
Quote:
this.onRelease = function(){
or something like that and I don't know how to change the rest
Reply With Quote
  #6 (permalink)  
Old Nov 21st, 2007, 15:07
marSoul's Avatar
Moderator
Join Date: Sep 2007
Location: Tehran - Iran
Age: 28
Posts: 411
Blog Entries: 2
Thanks: 3
Thanked 4 Times in 4 Posts
Send a message via MSN to marSoul Send a message via Yahoo to marSoul
Re: how to change button action into a movieclip button action

You mean something like this :

Code: Select all
this.onRelease = function() {
    if (_root.currMovie != "collectionsb") {
        _root.currMovie = "collectionsb";
        containerone_mc.loadMovie("collectionsb.swf");
    }
    if (containerone_mc._currentframe>=containerone_mc.midframe) {
        containerone_mc.play();
    }
};
__________________
Designing For Communicating
Website : http://www.datisdesign.com
Weblog : http://blog.datisdesign.com

Last Blog Entry: Throughout IRAN (Dec 10th, 2007)
Reply With Quote
  #7 (permalink)  
Old Nov 21st, 2007, 16:24
Junior Member
Join Date: Feb 2007
Location: England
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Re: how to change button action into a movieclip button action

Yes I think something like that Thankyou the only problem is that the external file does not load in the container
There is a output syntax error telling me that the function name is expected on this line
this.onRelease = function{
Do you know what I should do next?
I could just give up and use normal buttons but I'd still like to learn how to do this properly Cheers
Reply With Quote
  #8 (permalink)  
Old Nov 21st, 2007, 17:07
marSoul's Avatar
Moderator
Join Date: Sep 2007
Location: Tehran - Iran
Age: 28
Posts: 411
Blog Entries: 2
Thanks: 3
Thanked 4 Times in 4 Posts
Send a message via MSN to marSoul Send a message via Yahoo to marSoul
Re: how to change button action into a movieclip button action

maybe putting _root before containerone_mc solve the problem...
the problem is that i could not see this in action, and its hard to understand which part is not working properly
__________________
Designing For Communicating
Website : http://www.datisdesign.com
Weblog : http://blog.datisdesign.com

Last Blog Entry: Throughout IRAN (Dec 10th, 2007)
Reply With Quote
Reply

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
Image button triggers <form> action rcflyer2005 JavaScript Forum 1 Apr 18th, 2008 07:21
preserve the back button action when doing AJAX calls pesho318i JavaScript Forum 2 Nov 28th, 2007 12:37
[SOLVED] Movieclip button active state problem !! Help Please !! alladeen Flash & Multimedia Forum 6 Oct 25th, 2007 14:40
BUTTON will not take an action script griffonwing Flash & Multimedia Forum 2 Jun 8th, 2007 12:33
Condition on button action artdog Flash & Multimedia Forum 1 Sep 14th, 2006 19:45


All times are GMT. The time now is 22:45.


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