Creative COW SIGN IN :: SPONSORS :: ABOUT US :: CONTACT US
ADOBE FLASH: Adobe Flash ForumAdobe Flash TutorialsAdobe Flash Video TutorialsWeb Streaming ForumAdobe Flash

URL from XML in Flash

Cow Forums : Adobe Flash
URL from XML in Flash
by Darren Walker on Oct 13, 2008 at 3:02:09 pm

Hi everyone, I'm quite new to Flash, even more so to AS and even newer to the Cow so I wonder if you'll find it in your heart to help a newbie!

I've created a carousel from the excellent tutorial at Creating 3D Carousels 3 tutorial (files/code available), making my own amendments to fit my design. The "icons" in the carousel are pulled into Flash via an XML file.

Now, rather than using the file's animation whereby the icons slide to one side and pull up content into a textfield via XML I'd like to instead open a new page, relating to whichever item is clicked.

I understand the principle of this, in that I have to put the URL in my XML file and call it up in the AS so the correct page is opened to the corresponding icon. However, I can't for the life of me work out how to write the code or assign it to the gotoURL or getURL functions.


each line of my XML looks something like this:

icon image="icon4.png" producturlur="page4.swf" tooltip="Fourth Item"

...where I'm pressuming "producturl" is the URL I need to bring into Flash when the item is clicked.


Am I on the right lines? Please help before I pull the rest of my hair out.

Many thanks
DW

Respond to this post   •   Return to posts index

Re: URL from XML in Flash
by Darren Walker on Oct 14, 2008 at 10:12:43 am

Ive actually found an answer to this question here (5th entry): http://blog.vamapaull.com/?page_id=12

which has created a new problem. the link now opens in a new html window rather than within the Flash window inself as "_self" (which doesnt seem to work (rather than "_blank")

can this be done, replacing the original "page" with the link, as the new html page effectively works as a pop-up, which conflicts with some peoples browers if they have pop-ups turned off.

Cheers
DW



Respond to this post   •   Return to posts index

Re: URL from XML in Flash
by Darren Walker on Oct 14, 2008 at 10:37:12 am


I should add, I've also tried a gotoAndStop command to go to another frame on the timeline but couldn't work out how to pull in the XML for the correct frame. Would this be easier?



Respond to this post   •   Return to posts index


Re: URL from XML in Flash
by Darren Walker on Oct 14, 2008 at 11:45:13 am


Ok, I might be talking to myself here (!) but I've established that you can't change the content of the Flash player window using this method so I'd have to change it to a gotoandstop command.

Question (now) is how to I pull in the correct frame number from the XML that corresponds to the correct item clicked!

My brain hurts

DW



Respond to this post   •   Return to posts index

Re: URL from XML in Flash
by darren walker on Oct 15, 2008 at 7:34:21 am

(If any one is interested) I managed to get this to work using the code:


function released(){
gotoAndStop(this._parent.linkURL);


After this I came up with the problem of the carousel still being there when we went to the next frame but by using the 2nd tutorial I shrank them back down when you are on the next page.

All well and good until I put a back button on the next frame and it screws up the carousel when we return to frame 1! I know what I want but not the syntax.




Respond to this post   •   Return to posts index

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>


FORUMSTUTORIALSMAGAZINEDVDsBOOKSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

© CreativeCOW.net All rights are reserved.

[Top]