PDA

View Full Version : Flash buttons link to iframe


svenny1
06-29-2008, 12:20 AM
I am using actionscript 2.0, and Adobe flash CS3. I have made an iframe and everything should theoretically work.. but when the button is clicked nothing happens.

after making all my buttons i added the actionscript, by going right back to scene 1 and right clicking each button and then Actions, i then copied in this code;

on (release) {
this.contact.onRelease = function() {
getURL("http://www.netxtend.co.uk", "content");
};
}


Btw, my html code for the iframe is;

<!--Iframe-->
<iframe name="content" src="http://www.netxtend.co.uk/rzz/" width="502" height="419" align="middle" scrolling="auto" frameborder="0" allowtransparency="true" scrolling="no"></iframe>
<!--End Iframe-->

okay.. basically when i click the link nothing happens. I have no idea why.. I was hoping one of you could help me :D.

The link i am working on is http://www.netxtend.co.uk/rrz/index.html .

Thank you very much in advance!

Also here is my html for the flash object.
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="150" height="100">
<param name="wmode" value="transparent">
<param name="movie" value="menu.swf" />
<param name="quality" value="high" />
<embed src="menu.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="150" height="100" wmode="transparent"></embed>
</object>

_Aerospace_Eng_
06-29-2008, 01:19 AM
You are referencing a button that has instance name contact that is within the contact button so it won't work.

Create a new layer on the main timeline and call it actions and lock it. Now place this in the first frame of that layer
contact.onRelease = contact.onReleaseOutside = function() {
getURL("http://www.netxtend.co.uk", "content");
}
Do the same for the rest of your buttons being sure to change the instance names.

svenny1
06-29-2008, 04:34 PM
cheers mate, works perfectly! sorry i'm still new to all this actionscript :).

Thanks again!