|
|
 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Flash (all versions) section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

August 4th, 2009, 05:25 AM
|
|
Registered User
|
|
Join Date: Aug 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
how to make one object disapire and new one came up
Hello,im working on some project and i cant figure how to make when i click on one button to make one object on screen disapire and new one came on his place....When my site open there is a welcome not i wont when i click on "about us" button to welcome note disapire and "about us" note came insted:)
tnx
Mitjko
|

August 10th, 2009, 07:46 AM
|
|
Registered User
|
|
Join Date: Aug 2009
Posts: 18
Thanks: 2
Thanked 0 Times in 0 Posts
|
|
You could add some action script on button. Give those objects a name, i mean instance name and in button behaviours (those four states - Up, down...) add code.
Take look at some of this tutorials: http://www.kirupa.com/developer/flash/index.htm
Code should be like this:
onEnterFrame()
{
object1.alpha-=10;
object2.alpha+=10;
}
Object1 and 2 are those "about us" and "Welcome" notes.
p.s. first you have to create instances of your objects.
Last edited by Lupus81 : August 10th, 2009 at 07:49 AM.
|

August 10th, 2009, 10:03 AM
|
|
Registered User
|
|
Join Date: Aug 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
tnx i will try
|

August 10th, 2009, 10:27 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2007
Location: San Diego, CA, USA.
Posts: 278
Thanks: 0
Thanked 4 Times in 4 Posts
|
|
Quote:
Originally Posted by mitjko
tnx i will try
|
You can also handle this via animation.
1. Create a keyframe with your initial state
2. Create a second keyframe with your final state
3. use actionscript to stop the second keyframe, ie: stop();
4. use actionscript to program the button on the keyframe with the initial state. If the second keyframe is on frame 3, then...
Code:
on (release) {
gotoAndPlay(3);
}
__________________
-------------------------
Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe
When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper
Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.
|

August 11th, 2009, 03:13 AM
|
|
Registered User
|
|
Join Date: Aug 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
tnx!!it hellped
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |