Flash CS3 - Flash CS4

Free tutorials and scripts for all.
Actionscript 3.0

Accessing Movieclip object inside a button

This is a discussion on Accessing Movieclip object inside a button within the advanced Actionscript 3.0 forums, part of the Flash CS3 eng category; Hi Flep, Thank you so much for this amazing forum you got. Although I still can't understand some of ...


Go Back   Forum Flash CS3 Flash CS4 > English Forums > Flash CS3 eng > advanced Actionscript 3.0

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 28-01-08, 04:53
Junior Member
 
Join Date: Jan 2008
Posts: 7
Rep Power: 0
rexus is on a distinguished road
Accessing Movieclip object inside a button

Hi Flep,

Thank you so much for this amazing forum you got. Although I still can't understand some of the topics here, but I really like it.

Btw, I've got a question regarding simpleButton.
I just made a button and inside that Button, I have Up and Over State.

I put a movie clip in there so that I can trigger the timeline in the movieclip when the user had the mouse over the button.

on the main timeline, here is my code.

PHP Code:
function bBgAnimate(evt:MouseEvent):void{
    
//controling the movieclip action
}

bArch.addEventListener(MouseEvent.MOUSE_OVERbBgAnimate); 
bArch is basically my button instance name.
inside that button, I have a movieclip I named with mBg.

please help me on this,
Thank you in advance.

rexus
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #2 (permalink)  
Old 28-01-08, 08:06
Administrator
 
Join Date: Jul 2007
Location: Cesena
Posts: 4,486
Rep Power: 6
Flep is on a distinguished road
Re: Accessing Movieclip object inside a button

Hi

try this:
Code:
function bBgAnimate(evt:MouseEvent):void{
    trace(evt.target.bArch);
}

bArch.addEventListener(MouseEvent.MOUSE_OVER, bBgAnimate);
__________________

 


I recommend: Essential Actionscript 3.0

- Non rispondo ai messaggi privati con domande tecniche. Apri una discussione sul forum !
- I do not reply technicians pvt messages. Open a thread !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #3 (permalink)  
Old 28-01-08, 09:29
Junior Member
 
Join Date: Jan 2008
Posts: 7
Rep Power: 0
rexus is on a distinguished road
Re: Accessing Movieclip object inside a button

Hi Flep,

here's the result:

PHP Code:
ReferenceErrorError #1069: Property bArch not found on flash.display.SimpleButton and there is no default value. 
at index_fla::MainTimeline/bBgAnimate() 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #4 (permalink)  
Old 30-01-08, 08:12
Administrator
 
Join Date: Jul 2007
Location: Cesena
Posts: 4,486
Rep Power: 6
Flep is on a distinguished road
Re: Accessing Movieclip object inside a button

ops... sorry,
this is the right code:
Code:
function bBgAnimate(evt:MouseEvent):void{
    trace(evt.target.mBg);
}

bArch.addEventListener(MouseEvent.MOUSE_OVER, bBgAnimate);
__________________

 


I recommend: Essential Actionscript 3.0

- Non rispondo ai messaggi privati con domande tecniche. Apri una discussione sul forum !
- I do not reply technicians pvt messages. Open a thread !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools
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

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

Similar Threads

Thread Thread Starter Forum Replies Last Post
movieclip button... how to define a smaller hit area?? dpcdpc11 Flash CS4 eng 6 06-11-08 20:31
Actionscript 3 Accessing Dictionary Object from Function Pherankh advanced Actionscript 3.0 1 28-10-08 13:52
Actionscript 3 Accessing Programmatically Created Textfield Pherankh advanced Actionscript 3.0 0 21-10-08 01:51
accessing dynamic text field inside MC generated by addchild gwulfwud Actionscript 3.0 newbies 13 01-05-08 12:07
stop swf inside swf unreal2200 advanced Actionscript 3.0 6 17-01-08 08:21


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


Powered by vBulletin versione 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC4
Forum SiteMap


FlepStudio
by Filippo Lughi
P.IVA 03605860406