Solved

deep linking with frame anchors doesn't load external swfs

Posted on 2011-09-27
11
206 Views
Last Modified: 2012-05-12
Hi, I'm using Frame Anchors to jump straight to certain points on a timeline.

This does work, but code to load an external swf on that frame is unsuccessful.

when I go to:
http://www.idealogyltd.com/test/id/newGallery/test.html     the red shape swf loads

but

when I force the playhead to the frame via an anchor:
http://www.idealogyltd.com/test/id/newGallery/test.html#advertising

the red shape doesn't load! I know it is successfully going to the anchor though because the green square is only on that frame!

Anybody any ideas?

Thanks, Paul

0
Comment
Question by:Sideas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
11 Comments
 
LVL 29

Expert Comment

by:dgofman
ID: 36712369
Strange problem can you add base param in into your embed HTML object and set path to URL without anchor flag (let's try to change content URL for loader)

http://kb2.adobe.com/cps/127/tn_12701.html

base - [base directory] or [URL]. Specifies the base directory or URL used to resolve all relative path statements in the SWF. This attribute is helpful when your SWF file is kept in a different directory from your other files.

0
 
LVL 2

Author Comment

by:Sideas
ID: 36717458
Hi dgofman - I've put the base URL in, but no luck. html now looks like below:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="717" height="531" id="test" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="test.swf" /><param name="quality" value="high" /><param name="base" value="http://www.idealogyltd.com/test/id/newGallery/"><embed src="test.swf" quality="high" bgcolor="#ffffff" width="717" height="531" name="test" align="middle" swLiveConnect="true" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer"/>
</object>
<!--bookmarks used in the movie-->
<a name="advertising"></a>


why would the anchor stop it loading though?

The AS3 is just a loader for a swf in the same folder!

var swfLoader1:Loader = new Loader();
            placeHolder.addChild(swfLoader1);
            var bgURL1:URLRequest = new URLRequest("loaded.swf");
            swfLoader1.contentLoaderInfo.addEventListener(Event.COMPLETE, loadProdComplete);
            swfLoader1.load(bgURL1);



0
 
LVL 29

Expert Comment

by:dgofman
ID: 36718395
That strange problem can you submit your FLA file I will play  I think the probelm in Flash Player so we need to find workaround. I never use an anchor in my URL
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Author Comment

by:Sideas
ID: 36813477
Hi dgofman - It won't let me attach the files for some reason! You can download them here:

http://www.idealogyltd.com/test/anchors.zip

(the reason I need to use anchors is that I need to be able to jump straight to certain sections of a gallery)

Cheers, Paul
0
 
LVL 29

Expert Comment

by:dgofman
ID: 36817433
Don't ask me why but If I will change in test.fla in the anchors layout frame one you frame name from "advertising" to any other such as "myadvertising" I can use "advertising" anchor

test.html#advertising

However you will get the same error by using test.html#myadvertising

I think frame name shouldn't be match to the anchor URL


0
 
LVL 29

Expert Comment

by:dgofman
ID: 36817492
The workaround to create on first frame a keyframe as blank and on the second frame create a keyframe with name "advertising"

after loading complete go to the second frame

I attached new FLA

test.fla
0
 
LVL 2

Author Comment

by:Sideas
ID: 36909237
Hi dgofman, mmmm, thanks for that - although it doesn't load the swf at that frame still.

BUT! doesn't give an error as it sets the 'success' MC (red graphic) to visible on Event.COMPLETE

http://www.idealogyltd.com/test/id/newGallery/fixed/test.html#advertising

but what it should display is like here:

http://www.idealogyltd.com/test/id/newGallery/fixed/test.html

It's really weird.

Any more ideas?
0
 
LVL 29

Accepted Solution

by:
dgofman earned 500 total points
ID: 36918871
No, this is right behavior, when you are using "advertising" anchor you are forcing Flash Player to jump to frame 121 and skip loading SWF in 120
0
 
LVL 2

Author Comment

by:Sideas
ID: 36954571
Hi dgofman...but I want the SWF to load and it's not! That's the problem!

Any ideas?

Thanks, Paul
0
 
LVL 29

Assisted Solution

by:dgofman
dgofman earned 500 total points
ID: 36956715
If you want to get the same behavior as not using an anchor just simply remove or rename a frame name
0
 
LVL 2

Author Comment

by:Sideas
ID: 37081463
OK thanks everyone
0

Featured Post

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question