PDA

View Full Version : .swf in Web Object - can't jump to AMS page


DrCode
11-23-2006, 09:02 AM
Hi All!

I'm evaluating AMS 6, but I need some help please. Please bear with me this is a long post ;)

Alrighty, I have embedded this flash Calender (very cool, check it out here: http://ctl.mc.maricopa.edu/_ctl_SD/resources/helpdocs/workshops/flash_components/FlashXMLCalendar.html ) inside a Web Object in an AMS 6 project.

I have changed the XML for the calendar in one of the days according to the AMS help for "Interact with Embedded Web Objects"(to navigate to a AMS page).

My aim is to have a HTML link in a day's comments, which a user will click, then jump to the relevant AMS page. Now, according to the Help this is easily done with:

<a href="#Page2">Go to Page 2</a>

and the code in the "On Navigate event" for the Web Object like so:

-- search from right to left for a number sign (#)
nPos = String.ReverseFind(e_URL, "#", true);

-- did we find a # ?
if nPos then
-- get everything to the right of the #
strPage = String.Mid(e_URL, nPos + 1, -1);

--[[ jump to the page name that we extracted from
the URL. If there is no page by that name,
the Page.Jump won't do anything. ]]
Page.Jump(strPage);
end

Now, the problem is that when I click on the HTML link in the calendar(a flash object imbedded in a Web Object remember), it does not navigate to the AMS page. If I have the same link ("<a href="#Page2">Go to Page 2</a>") in the body of the HTML below the flash object, and when clicking on it, it works 100%.

I checked, and the "e_URL" variable, when clicking on the link in the Flash calendar, does not get populated correctly. It seems as though the "e_URL" variable is not populated at all when following the link in the flash object.

I also tried this with Multimedia Builder(MMB) and it works great. But AMS is in all other functionality superior, so I would like to get it to work in AMS.

Anyway, any insights will be much appreciated.

PS: Just a pity AMS is so much more expensive than MMB :wow

usernameCasper
11-23-2006, 09:45 AM
AMS is very userfriendly instead of many other program languages.
Im using AMS for making applications in fast time.
Otherwise im using C++ and Java for more complex things.
You get worth for your money, trust me.
Otherwisde go open-source like java.

DrCode
11-24-2006, 01:07 AM
Hi Casper, thanks for the reply. I am very impressed with AMS so far, I am just stuck with this problem at this time which is driving me nuts.

Is there ANYBODY that might have a solution to this?

It is very strange that the destination URL is not being populated in "e_URL".

Any help will be greatly appreciated.

DrCode
11-24-2006, 03:03 AM
Apologies for the shameless *BUMP* :rolleyes , but surely somebody must have come across this before?

Thanks! :)

usernameCasper
11-24-2006, 03:58 AM
could you post the application as an attachment?
than I can have a look at your problem or post your code for pageJump.
I need some more specific information, as for <a href="#Page2">Go to Page 2</a>.
The error could be everywhere yet.


--[[ jump to the page name that we extracted from
the URL. If there is no page by that name,
the Page.Jump won't do anything. ]]
Page.Jump(strPage);
end

Maybe pagename isnt correct ?
or if e_URL == .... then .... ??

Maybe i can help you out if you give me more specific information.

Kind Regards,
Casper

DrCode
11-24-2006, 05:38 AM
Hi Casper, thanks for the effort, it is much appreciated.

Attached is the project. You will see that in the Web Object, there is a normal link "Go to Page 2", that when you click on it, takes you to page 2. This is how it should work.

In the Calendar, go to November 26th. You will see there is also a link to page two (it is exactly the same HTML as the one outside the .swf). When you click on it, it does NOT go to page two.

I have set up a dialog that displays the contents of the e_URL variable. Here one can see the problem, the e_URL variable is not being correctly populated when clicking on the link in the calendar(under 26 Nov). It seems as if AMS is not passing the destination URL from the flash object into e_URL.

Thanks again for helping out :cool

usernameCasper
11-24-2006, 06:04 AM
Hey DrCode,

np for helping :)
Im at work, when I'm home, I'll put the source code on this post.
Maybe that helps you out.
Can't do much as I've got no AMS on work :(
I'll be back in 6 hours :)

Good luck meanwhile

-Casper

DrCode
11-24-2006, 09:33 AM
Thanks Casper, looking forward to hear what wisdom you might come up with :)

As a work around(hopefully only until this is resolved and it works in AMS), I am doing the calendar in MMB and the rest of the App in AMS. But it complicates things and I would like to have it all working in AMS rather.

:cool

TJS
11-24-2006, 10:23 AM
@DrCode

I'm not sure if there is a way to get anything useful (like URL navigation events) out of a flash object without using FSCommands. I took a look at the link you provided and it sounds like the source code for the flash object is not provided. Perhaps you could put in a feature request to the developer to have the calendar pass a "nav" FSCommand containing the target URL as an argument. Then you could embed the calendar into your project as a flash object (as opposed to a web object) and trap the info you need to jump pages. I think you'll find that the appearance of the calendar is a little clearer in a flash object as well.

I did some searching and came up with the link below as an alternative in case you can't get any love from the author of the code you are currently using:

He sells a flash based calendar for 5 bucks and provides the source code if you're up for that:
http://www.tufat.com/s_advanced_flash_calendar.htm

I've also seen a few decent integrations of the google calendar that might work for your purposes, but would require your users to be connected to the Internet.

Lorne
11-24-2006, 12:10 PM
Attached is the project. You will see that in the Web Object, there is a normal link "Go to Page 2", that when you click on it, takes you to page 2. This is how it should work.

In the Calendar, go to November 26th. You will see there is also a link to page two (it is exactly the same HTML as the one outside the .swf). When you click on it, it does NOT go to page two.Strange...I just tried your project here and it works exactly as intended -- I click on the link, it shows the contents of e_URL in a dialog (including the #Page2 part), and then jumps to Page2.

(I tested it on version 6.0.4.0.)

DrCode
11-24-2006, 01:44 PM
Hi TJS and Lorne, thanks so much for your help.

@TJS: The code (.fla file) is freely available(follow the link in my first post), the calendar has a creative commons license. I will hack around the .fla and try some of your suggestions. The tricky part is that the text for each day is pulled in from an XML file, and thus variable, so it would not be suitable for hard coding.

@Lorne: Did you try the link IN THE CALENDAR that shows up when you click on Nov the 26th? The one below the calendar is there for testing and yes, that one works fine. It is the one in the calendar that I cannot get working.

Thanks for the assistance guys! :yes

Lorne
11-24-2006, 01:46 PM
@Lorne: Did you try the link IN THE CALENDAR that shows up when you click on Nov the 26th? The one below the calendar is there for testing and yes, that one works fine. It is the one in the calendar that I cannot get working.Yes, the link in the calendar is the one I tested.

DrCode
11-24-2006, 03:26 PM
Lorne, that is FANTASTIC news. Bad news is that I don't know what I am doing wrong on my side then :huh

So, just to double-check, you followed both the one in Nov 26 and the one below the calender in the Web Object and BOTH worked?? e_URL had the correct info?

I have another PC than the one I have been developing and will test the same project on that one.

You are also using 6.0.4.0, no new updates or patches applied that is not in the evaluation version?

Sorry for sounding like a "non-believer" - just trying to find out what I am doing wrong :)

CASPER, or anybody else that can test the project, please let me know if you are having the same success as Lorne.

Thanks Lorne! :lol

DrCode
11-24-2006, 03:42 PM
*SIGH* It fails on my other PC too. :huh

I'll download the latest Flash player and see if that makes a difference ...

Lorne
11-24-2006, 05:39 PM
Lorne, that is FANTASTIC news. Bad news is that I don't know what I am doing wrong on my side then :huh:)

So, just to double-check, you followed both the one in Nov 26 and the one below the calender in the Web Object and BOTH worked?? e_URL had the correct info?Yeppers.

You are also using 6.0.4.0, no new updates or patches applied that is not in the evaluation version?Yep, plain vanilla 6.0.4.0.

Sorry for sounding like a "non-believer" - just trying to find out what I am doing wrong :):)

It might have something to do with the version of iexplore being used...I have IE7 installed on this system.

(Specifically: 7.0.5730.11)

Dermot
11-24-2006, 06:03 PM
Works fine for me too. I also have IE 7.0.5730.11

DrCode
11-24-2006, 11:23 PM
Hi Lorne/Dermot, thanks for the feedback, I will install ver 7 MIE and test again. Thanks for the pointer ;)

I wonder if one would be able to install only the IE7 "runtime" without installing the whole thing - to make it easier for end users - any way, that's a problem for another day.

Will let you know if I finally got it to work. :)

DrCode
11-25-2006, 02:05 AM
Woohoo! It is working! :D

Who woulda thought :p

This is great, but now raises the issue: How do I ensure users have IE7 installed? I'll trawl the web and see if I can figure ut which files users would need - maybe it is not necessary to install the whole IE7.

Anybody that can shed some light, please feel free to share the wisdom.

Lorne/Dermot, thanks, AMS rocks!! :)

usernameCasper
11-27-2006, 07:08 AM
Yes, works fine :)
Sorry for not telling status, but had a very busy week !
but it works on IE 7 (beta) im trying today on IE 6.
I'll let you know when im home.

-Casper

DrCode
11-29-2006, 04:45 AM
Thanks for your help Casper.

The only issue really now is how to ensure the users have IE7 installed. I have a work-around that installs IE7 in the background(a silent install). I guess I will just have to let users know that their IE will be updated to IE7.

Please let me know your experience on IE6 as well.

Keep well! :)