5
Contributors
7
Replies
8
Views
6 Years
Discussion Span
Last Post by robertburns155
0

0 down vote

if you want to link a piece of flash to a web site simply in the .fla . Insert a new layer , name this layer a (for actionscript/actions) . Inside type the following, say the thing you wanted someone to click on was a button which you named ,as a movie clip * mcbutton * :

mcbutton.onRelease = function:void () {
getURL("http://www.yahoo.com");
};

Wasim Ullah Sulehri

Edited by mike_2000_17: Fixed formatting

0

0 down vote

This will work in Actionscript 3

you need to use the navigateToURL() command which requires a URLRequest. Add a mouseclick event listener to the stage and in the function that is called in the event listener call the navigateToURL() command, passing the URLRequest of the url you want it to link to.

// add the click event listener to the stage
stage.addEventListener(MouseEvent.CLICK, onClickHandler);
//define the onClickHandler function to go to the url
  function onClickHandler(evt:MouseEvent):void{
      navigateToURL(new URLRequest("http://www.google.com"));
    }

Wasim Ullah Sulehri

Edited by mike_2000_17: Fixed formatting

0

I cant edit the flash files. that is my requirment.
Can we achive this through html?
Basically what i want is the video slider like youtube use to have – where the video playing is at top and underneath it in small boxes are the other videos. There is also an arrow to the right and to the left where you can scroll through the other videos at the bottom and if you select one it will start playing up above in the larger area.

I have done some research and finally finds a slider similar to youtube but that is for images. If i changes it to videos i cant make them link

I hope you understand my problem?

0

That needs flash. You can link to the flash file like so:

<a href="http://example.com/your_flash_object.swf">Link text</a>

or you can embed it in the page:

<object width="500" height="400">
<param name="flash_thing" value="your_flash_file.swf">
<embed src="your_flash_file.swf" width="550" height="400">
</embed>
</object>
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.