p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > Web Programming > Adobe Web Programming > Flash (all versions)
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read

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.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 4th, 2009, 05:25 AM
Registered User
Points: 12, Level: 1
Points: 12, Level: 1 Points: 12, Level: 1 Points: 12, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old August 10th, 2009, 07:46 AM
Registered User
Points: 62, Level: 1
Points: 62, Level: 1 Points: 62, Level: 1 Points: 62, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2009
Posts: 18
Thanks: 2
Thanked 0 Times in 0 Posts
Default

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old August 10th, 2009, 10:03 AM
Registered User
Points: 12, Level: 1
Points: 12, Level: 1 Points: 12, Level: 1 Points: 12, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

tnx i will try
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #4 (permalink)  
Old August 10th, 2009, 10:27 PM
Friend of Wrox
Points: 941, Level: 11
Points: 941, Level: 11 Points: 941, Level: 11 Points: 941, Level: 11
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2007
Location: San Diego, CA, USA.
Posts: 278
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Quote:
Originally Posted by mitjko View Post
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #5 (permalink)  
Old August 11th, 2009, 03:13 AM
Registered User
Points: 12, Level: 1
Points: 12, Level: 1 Points: 12, Level: 1 Points: 12, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

tnx!!it hellped
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chap 13 pg448: Object reference not set to an instance of an object tomche BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 15 August 8th, 2009 07:14 AM
how to make an object draggable? catchrohith Classic ASP Basics 2 July 9th, 2007 01:27 PM
make object floatable catchrohith Classic ASP Basics 0 November 18th, 2006 01:17 AM
create a Line object ,Box object in CR at Runtime? thanhnt Pro VB 6 1 May 16th, 2005 07:51 AM
Beg --Object required: '' ? what error did i make? kecik101 Classic ASP Databases 3 April 28th, 2004 10:19 PM



All times are GMT -4. The time now is 05:05 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc