FORUMS: list search recent posts

Insert url into movie clup button flash cs5

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Steve George
Insert url into movie clup button flash cs5
on Nov 22, 2010 at 9:41:08 am

I need to add a url to my movie clip button.

Can somebody please give me the code with a dummy url and tell me where to insert it within my existing actions.

here's my code for the button
-------------

import flash.events.MouseEvent;

btn_mc.buttonMode = true;
btn_mc.addEventListener(MouseEvent.ROLL_OVER, onButtonOver);
btn_mc.addEventListener(MouseEvent.ROLL_OUT, onButtonOut);

function onButtonOver(e:MouseEvent):void
{
e.currentTarget.gotoAndPlay("over");
}

function onButtonOut(e:MouseEvent):void
{
e.currentTarget.gotoAndPlay("out");
}

------------------

Im using flash profession cs5 and dreamweaver cs5 on windows xp



thanks in advance :-)

stevie


Return to posts index

Steve Brame
Re: Insert url into movie clup button flash cs5
on Nov 22, 2010 at 1:29:32 pm

Since you're using CS5, I wont give you the AS. You really need to learn about the 'Snippets' panel. It will make your life so much easier.

Select your button.
Go to the 'Snippets' panel.
Open the 'Actions' folder.
Double click the very first action - 'Click to Go to Web Page'
The correct actionscript is written for you, complete with additional instructions for changing the URL.

Steve Brame
creative illusions Productions


Return to posts index

Steve George
Re: Insert url into movie clup button flash cs5
on Nov 22, 2010 at 1:54:15 pm

There is no actions folder in my snippets panel :-(

http://hotfile.com/dl/84223922/2a0bd7a/noactions.jpg.html

This seems like a great feature though. do i need to create an actions folder ?

Thanks

Stevie


Return to posts index


Steve Brame
Re: Insert url into movie clup button flash cs5
on Nov 22, 2010 at 2:27:05 pm

The JPG indicates that you're in Dreamweaver...not Flash. The panel you're looking for is in Flash and is named 'Code Snippets'.

Steve Brame
creative illusions Productions


Return to posts index

Steve George
Re: Insert url into movie clup button flash cs5
on Nov 22, 2010 at 5:11:20 pm

Thanks for bearing with me Another schoolboy error on my part :-s

Ok, so i have successfully accomplished this..
http://djstevieg.limewebs.com/

however when the button (link) is pressed the url opens in a new tab.
How can i change this, to basically go to a different page in the same site (act like a regular link.

This is my current code....

-------------------------------

btn_mc.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage);

function fl_ClickToGoToWebPage(event:MouseEvent):void
{
navigateToURL(new URLRequest("http://www.djstevieg.limewebs.com/history/index.html"), "_blank");
}

-------------------------------

Can i modify this code ? or do i need a new one ?

Also im getting this error code when i put them,


Files with errors: 2
Scripts\swfobject_modified.js
Scripts\expressInstall.swf


How can i fix this please ?


Thanks very much you guys. Extremely helpful


Stevie


Return to posts index

Steve Brame
Re: Insert url into movie clup button flash cs5
on Nov 22, 2010 at 5:19:21 pm

Replace '_blank' with '_same'. This opens the URL in the same browser window.

Steve Brame
creative illusions Productions


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]