Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Problem With Buttons In Flash
Nani Cheri
post Feb 9 2006, 02:57 PM
Post #1


Super Member
*********

Group: Members
Posts: 370
Joined: 22-April 05
Member No.: 6,024



I have made a couple of buttons in Flash, but not with the button symbols, but as a movieclip.

QUOTE
b1.onRollOver = over;
b1.onRollOut = out;
b1.buttText.buttonText.text = "HOME"

b2.onRollOver = over;
b2.onRollOut = out;
b2.buttText.buttonText.text = "ABOUT ME"

b3.onRollOver = over;
b3.onRollOut = out;
b3.buttText.buttonText.text = "PORTFOLIO"

b4.onRollOver = over;
b4.onRollOut = out;
b4.buttText.buttonText.text = "NAIL-ART GALLERY"

b5.onRollOver = over;
b5.onRollOut = out;
b5.buttText.buttonText.text = "LINKS"

b6.onRollOver = over;
b6.onRollOut = out;
b6.buttText.buttonText.text = "CONTACT ME"


function over() {
this.gotoAndPlay(2);
}

function out() {
this.gotoAndPlay(7);
}


But the problem is that I can't seem to find a way to put this code to those (movieclip)buttons!
This code links to external text that will load after clicking on the buttons.

QUOTE
on(release) {
unloadMovie(_root.content);
loadMovie("home.swf",_root.content);
}


I made those buttons with a tutorial from gotoandlearn.com, but it is not explained how to put a function like above to them. So what I'd like to do, is when I click on one of those buttons I made, I want the movieclip 'content' to go away and replaced by another (swf)movie!

Does anyone understand what I mean, and if you do can you help me? Please reply. Thank you


You can see the buttons on my site! http://www.nanicheri.trap17.com/Flash/n3.htm
Go to the top of the page
 
+Quote Post
spy_charly
post Feb 12 2006, 05:48 PM
Post #2


Premium Member
********

Group: Members
Posts: 195
Joined: 18-November 05
Member No.: 14,521



hi buddy! well your code:

on(release) {
unloadMovie(_root.content);
loadMovie("home.swf",_root.content);
}

tells to flash to load the "home.swf" INSIDE the MC so what you need to do is to write either _parent or _root so you can load, make or move OUTSIDE the MC you are actually pressing....
if you have still doubts visit my board www.asb-labs.com/board and post your questions I guarantee to answer :-)
Go to the top of the page
 
+Quote Post
Nani Cheri
post Feb 13 2006, 11:17 PM
Post #3


Super Member
*********

Group: Members
Posts: 370
Joined: 22-April 05
Member No.: 6,024



HI!
I found out what to do to get the result what I wanted with this:

QUOTE

b1.onRollOver = over;
b1.onRollOut = out;
b1.onRelease = home1;
b1.buttText.buttonText.text = "HOME"

function home1() {
unloadMovie(_parent.content);
loadMovie("home1.swf",_parent.content);
}

b2.onRollOver = over;
b2.onRollOut = out;
b2.onRelease = about;
b2.buttText.buttonText.text = "ABOUT ME"

function about() {
unloadMovie(_parent.content);
loadMovie("about.swf",_parent.content);
}

b3.onRollOver = over;
b3.onRollOut = out;
b3.onRelease = portfolio;
b3.buttText.buttonText.text = "PORTFOLIO"

function portfolio() {
unloadMovie(_parent.content);
loadMovie("portfolio.swf",_parent.content);
}

b4.onRollOver = over;
b4.onRollOut = out;
b4.onRelease = nail;
b4.buttText.buttonText.text = "NAIL-ART GALLERY"

function nail() {
unloadMovie(_parent.content);
loadMovie("nail.swf",_parent.content);
}

b5.onRollOver = over;
b5.onRollOut = out;
b5.onRelease = links;
b5.buttText.buttonText.text = "LINKS"

function links() {
unloadMovie(_parent.content);
loadMovie("links.swf",_parent.content);
}

b6.onRollOver = over;
b6.onRollOut = out;
b6.onRelease = contact;
b6.buttText.buttonText.text = "CONTACT ME"

function contact() {
unloadMovie(_parent.content);
loadMovie("contact.swf",_parent.content);
}


function over() {
this.gotoAndPlay(2);
}

function out() {
this.gotoAndPlay(7);
}



I just tried something, and then it worked! But I did something different what you said earlier,spy_charly, about _parent!! that was necesary 2! in stead of _root.content, I put _parent.content
But I have another problem with the content! The dynamic text shows, but the buttons to scroll I made are not. And when Im in the movie where I put the dyynamic content, it does show! you can see it at the site:

CLICK HERE for my site

hahahaha or maybe I can send my fla file to you? Only if you got time ofcourse, and if other people think they can help me, please reply..

Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. What is the best USB Flash Disk outhere?(8)
  2. Did You Face Problem Opening Pdf With Firefox?(15)
  3. Balloon Duel - Flash Game(2)
  4. 60 Seconds Countdown That Shutdown The Pc(15)
  5. Problem Installing Sims 2 Nightlife(26)
  6. Ie And Firefox Crash(5)
  7. Upload Component - Failed(6)
  8. Remote Assistance Problem(9)
  9. Laptop Keyboard Problem(8)
  10. Playing Flash Movies Without The One-click Activation: Simple Insertion Of Javascript(4)
  11. Dandruff Problem(29)
  12. Virus On Your Flash Disk? (usb Devices)(15)
  13. Sharing Files And Printer Between Windows Vista And Xp(9)
  14. Pop-up Virus / Trojan Problem(10)
  15. I Need Some Help With Flash And Div Overlay(5)
  1. Which Flash Drive Do You Use?(26)
  2. Flash Tutorial Simple Motion Tween(0)
  3. Flash And Transparency(7)
  4. Free (legal) Flash Editor? Anyone?(9)
  5. Firefox 3 Cookies Problem(4)
  6. Flash Video Recorder(2)
  7. Hosting Credits Problem? [resolved](9)
  8. Counter Strike Problem(2)
  9. Flash Action Scripting Help Needed(6)
  10. Problem With The Trap17 Forum(4)
  11. Attachment Problem In Pmwiki(0)
  12. What Is My (power) Problem?(4)
  13. Problem With Hosting(4)


 



- Lo-Fi Version Time is now: 7th October 2008 - 01:08 PM