Creating Hyperlink inside a Loader component

  • samo
  • Born
  • Born
  • samo
  • Posts: 2

Post 3+ Months Ago

Im working on a flash website but i am unable to create hyperlinks to external files from within mx.controls.Loader component.

I have a mx.controls.Loader component that sits on the page where i load pages .swf files externally but within the mx.controls.loader component, i am unable to create hyperlink to other page using either of these code:

about_btn.onRelease = function () {
getURL("mypage.swf", "myLoader");
}

OR

about_btn.onRelease = function () {
myLoader.contentPath = "firstpage.swf"
}

I have almost been frustrated. Any assistance will be highly appreicated.

Im am using Flash 8 Professional, AS2 & Flash Player9.

Thanking you all in advance.
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

getURL is like typing a new address in your browser, but you should use it like: getURL("mypage.swf", "_self");

while the second approach will load the swf inside your current flash.

Code looks fine, only thing to wonder is that if it is actually triggered. Debug your code by adding:
Code: [ Select ]
trace("button pressed");
in your function and see if it appears in the flash output.
  • samo
  • Born
  • Born
  • samo
  • Posts: 2

Post 3+ Months Ago

Thank you very much for your reply.

I have found a way around it. What I did was to put each page in a different Scene from there, I was now calling each pages with hyperlink and they are working fine.

I really appreciate your reply and concern. Sorry for not replying on time.

Your suggestion has also helped me to start using trace command in my code.

Have a great time.

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 5 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.