14 Replies - 2530 Views - Last Post: 15 August 2007 - 12:12 AM

#1 brainy_creature  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 177
  • Joined: 07-August 06

connecting button in flash to url

Posted 12 August 2007 - 10:28 AM

can somebody please tell me what action script to write to make a button to connect to a url??
actually my index.html is the flash page so will the url be complete url or like in html it'll be "home.html"
?????
some body please help :(
Is This A Good Question/Topic? 0
  • +

Replies To: connecting button in flash to url

#2 skyhawk133  Icon User is offline

  • Head DIC Head
  • member icon

Reputation: 1858
  • View blog
  • Posts: 20,275
  • Joined: 17-March 01

Re: connecting button in flash to url

Posted 12 August 2007 - 10:31 AM

You just want a "link" in flash? Or something more...
Was This Post Helpful? 0
  • +
  • -

#3 brainy_creature  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 177
  • Joined: 07-August 06

Re: connecting button in flash to url

Posted 12 August 2007 - 10:37 AM

View Postskyhawk133, on 12 Aug, 2007 - 10:31 AM, said:

You just want a "link" in flash? Or something more...

look at the page http://hansapparelsco.awardspace.com
this is for my dad..
i have created a button can you tell me wat actionscript to connect to the next page which is home.html
Was This Post Helpful? 0
  • +
  • -

#4 DilutedImage  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 14
  • View blog
  • Posts: 646
  • Joined: 20-November 06

Re: connecting button in flash to url

Posted 12 August 2007 - 12:30 PM

Quote

some body please help :(

No.

This is an instance where some simple research will answer your question. Google is your friend. :D

And really, in this case, the Flash Help Documentation is probably your best friend. ;)
Was This Post Helpful? 0
  • +
  • -

#5 salimsheikh  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 13-August 07

Re: connecting button in flash to url

Posted 13 August 2007 - 03:50 AM

View Postbrainy_creature, on 12 Aug, 2007 - 10:28 AM, said:

can somebody please tell me what action script to write to make a button to connect to a url??
actually my index.html is the flash page so will the url be complete url or like in html it'll be "home.html"
?????
some body please help :(



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

//if the instance of button is home then type code

home.onRelease=function()
{
getURL("index.html");
}

other method

Select button press f9(action script)

on(Release)
{
getURL("index.html");
}
Was This Post Helpful? 0
  • +
  • -

#6 brainy_creature  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 177
  • Joined: 07-August 06

Re: connecting button in flash to url

Posted 13 August 2007 - 07:52 AM

View Postsalimsheikh, on 13 Aug, 2007 - 03:50 AM, said:

View Postbrainy_creature, on 12 Aug, 2007 - 10:28 AM, said:

can somebody please tell me what action script to write to make a button to connect to a url??
actually my index.html is the flash page so will the url be complete url or like in html it'll be "home.html"
?????
some body please help :(



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

//if the instance of button is home then type code

home.onRelease=function()
{
getURL("index.html");
}

other method

Select button press f9(action script)

on(Release)
{
getURL("index.html");
}


am getting this error-->Statement must appear within on handler

wat dos it mean??
Was This Post Helpful? 0
  • +
  • -

#7 brainy_creature  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 177
  • Joined: 07-August 06

Re: connecting button in flash to url

Posted 13 August 2007 - 07:58 AM

View Postbrainy_creature, on 13 Aug, 2007 - 07:52 AM, said:

View Postsalimsheikh, on 13 Aug, 2007 - 03:50 AM, said:

View Postbrainy_creature, on 12 Aug, 2007 - 10:28 AM, said:

can somebody please tell me what action script to write to make a button to connect to a url??
actually my index.html is the flash page so will the url be complete url or like in html it'll be "home.html"
?????
some body please help :(



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

//if the instance of button is home then type code

home.onRelease=function()
{
getURL("index.html");
}

other method

Select button press f9(action script)

on(Release)
{
getURL("index.html");
}


am getting this error-->Statement must appear within on handler

wat dos it mean??

ok i made it ok.. now am gonna update it and see if it work!!
fingers crossed :)
Was This Post Helpful? 0
  • +
  • -

#8 brainy_creature  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 177
  • Joined: 07-August 06

Re: connecting button in flash to url

Posted 13 August 2007 - 08:11 AM

awwww :(
its not working
i know its too simple but am stuck so any help would be appreciated
i tried using button.onRelease=function()
{
getURL("home.html");
}

button is the name of the symbol... is that right???
Was This Post Helpful? 0
  • +
  • -

#9 DilutedImage  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 14
  • View blog
  • Posts: 646
  • Joined: 20-November 06

Re: connecting button in flash to url

Posted 13 August 2007 - 08:26 AM

Where did you place that code on the button, or the timeline it lives in? It needs to be in the parent object's timeline. And yes, button is the instance name.

Can you attach a sample of the file your working on? It would make it a lot easier to see how you've got things setup.
Was This Post Helpful? 0
  • +
  • -

#10 brainy_creature  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 177
  • Joined: 07-August 06

Re: connecting button in flash to url

Posted 13 August 2007 - 08:56 AM

Please open this link it contains the flash file
http://brainy-creature.4shared.com
and please cheeck and temme where am going wrong
am sorry but am very new to flash plus nobody to help am trying everything on my own!!
thanks:)
Was This Post Helpful? 0
  • +
  • -

#11 DilutedImage  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 14
  • View blog
  • Posts: 646
  • Joined: 20-November 06

Re: connecting button in flash to url

Posted 13 August 2007 - 03:54 PM

You didn't give your button an instance name. Click on your button, look at the Properties window, and change "<Instance Name>" (gray text) to "button".

Quite frankly, this could have been solved with 5 minutes of reading. Perhaps this might be a good time to start reading some of the documentation (that's a link) included with Flash?

2
Was This Post Helpful? 0
  • +
  • -

#12 brainy_creature  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 177
  • Joined: 07-August 06

Re: connecting button in flash to url

Posted 14 August 2007 - 09:07 AM

oh i suppose i have given the name... don't know wats happening but i have given the instance name..
when i left click the button the properties tool bar show...
instance of :button
and when i right click the button the name says button??
btw where is the actionscript supposed to be... on the first timeline in the main page ,right??
or at the hit of the button??
Was This Post Helpful? 0
  • +
  • -

#13 DilutedImage  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 14
  • View blog
  • Posts: 646
  • Joined: 20-November 06

Re: connecting button in flash to url

Posted 14 August 2007 - 10:01 AM

The ActionScript is fine where it is.

No, your button still has no instance name. The part that says "instance of" means that it's an instance of the "button" clip from the Library. Each instance of that button clip can have it's own name, called an "instance name". The instance you are trying to work with has no instance name. And without one, you cannot access it.

I've determined the cause of your problem, explained how to fix it, and provided you with a source from which you could have solved the problem yourself (as well as many other future problems). I'm sorry, but there's just nothing more I can do.

This post has been edited by DilutedImage: 14 August 2007 - 10:01 AM

Was This Post Helpful? 0
  • +
  • -

#14 brainy_creature  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 177
  • Joined: 07-August 06

Re: connecting button in flash to url

Posted 14 August 2007 - 10:32 AM

bloody brilliant... i found the attribute name
and i filled it.. my god i cant believe i was missing something like this hahaha :D
its fine now!!
thanks for your paitence!!
Was This Post Helpful? 0
  • +
  • -

#15 DilutedImage  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 14
  • View blog
  • Posts: 646
  • Joined: 20-November 06

Re: connecting button in flash to url

Posted 15 August 2007 - 12:12 AM

Excellent. :D
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1