Here is sample that I used to show off several Edge files:
Use the next and back arrows on your keyboard to navigate through the images..
Click on the image of the Edge file and a "pop-up" window with an iFrame linked to that Edge file pops up.
I appreciate you taking the time to respond. Unfortunately, I'm still at a loss. If I'm building animations in Edge Animate and I want to navigate to a label along the timeline, I would apply an action to my button by selecting "play" and adding the script ....sym.play("label_name_here");
However, I am building a series of edge animations (html files) that will be stored within the same folder, and must allow the user to navigate back and forth between the related html files. As a result, how would I approach the scripting process when i apply actions to these buttons? If I'm in "movie_A" and hope for my button to navigate me to open "movie_B.html", do I select "play", "openURL", "play from"???? (when applying actions) and what would this code look like?
I fear my animations will be too complex to try and compile several into a single animation and must find a solution which allows me to navigate back and forth between resulting html files. I'm sure this is a simple solution, I'm just not hip to the software and completely clueless with the scripting. I've consulted several tutorial type examples which are helpful explaining how you can navigate wihtin a single edge file, but no one states an obvious solution to navigating between edge animations.
Here is a simple sample of the same concept:
I have four files I created in Edge...
and one main file I created in Edge...
In the Main file I created 4 buttons and one place to display the Edge animation files...
Each button opens a new/seperate Edge animation file...
@Schrene The 4 external files do not need to load at runtime, correct? If so, this is a very useful tip.
If you look at my sample you will see....
Each external Edge file "loads" or rather is viewed through an iframe that loads... when the button is clicked...
Then when another button is clicked the file is temporarily removed using jQuery .detach()...
No external files actually "load" at runtime or any time...
How do you make external edge files load through an i-frame?
Look at the sample file....
You add code like this:
sym.$("theFile").append('<iframe id="file1"src="http://www.meschrene.puremadnessproductions.net/Samples/Multiple/file-one.html" frameborder="0" scrolling="no"></iframe>');
"theFile" is a rectangle I created on the Stage...
I've been looking for an example like this to see how to build a basic player to navigate through a set of pages of content.
Couple of questions ..
Is the use of Z-indez just a way of holding a var to say which btn was last selected?
I'm trying to make a generic 'player' that i can re-use. But for each re-use the number of pages will be different. Typically ranging between 10 and 30 pages.
If i new upfront the number of pages, and called them page1.html, page2.html, etc, I could initially load page1.
After that fwd and back buttons could move through them storing a var for the 'currentPage'.
What would be syntax for a 'loadNextPage' func, that used a loop to detach all possible pages, then load 'currentPage' into the iFrame.
The z-index is what I use to determine if the code for that button should execute or not...
Without that if you click on any button twice in a row it will try to execute the code twice which will make the file glitch.
Thanks Schrene. I wasnt sure, but figured it was being used like that.
My background is basic Flash actionscript, so not really come across Z-index before. Or iFrames.
Lots to learn.
Can the append to iFrame code use variables to specify an id , and a file to load in.
And can the file be local? ie, not an http://etc.
Yes you can link to files locally (relative) rather than using http://...(absolute).
Yes you can use variables to specify id in your iFrame as I did in my sample..
Got that working.
At least I thought I had.
Just come back to it after doing something else, and it seems its not.
Schrene, I based my simple page player on your example posted earlier.
Pages load fine using << and >> buttons. But after resizing the placeholder (for the iFrame) to make it be page size, I noticed that the pages are being cropped and not appearing full size.
I've spent the last hour scratching my head.
If you have a spare minute or two, could you see if you can spot my error.
Well at first glance ...
This won't work...
You have both of these on click of a button...
You are appending and detaching the file with an id of "currentPageHolder" at the same time???
If you look at my code:
sym.$('#file4').detach();///removes file 4
sym.$('#file3').detach();///removes file 3
sym.$('#file2').detach();///removes file 2
sym.$("theFile").append('<iframe id="file1" ///this adds file1
You will see that I am detaching all other iframes that may have been previously appended and appending a new one
So I cant use the same id name each time i load a page?
I thought that so long as i do a detach on that id, before using same id again for the new append, which is what i'm doing, all would be fine.
I took this approach because I may have 30 or more pages, and want to keep it simple and avoid detach() detach() detach() ...
The different pages are clearly being loaded ok. Just not appearing full size.
You think the cropping is to do with the reuse of same id?
I would give the using a different id method a try, but I'm at home now, without Edge. Will have to wait until tomorrow.
Once again, thanks for you help. This forum is proving better than any manual
You might be able to use same id if you set it up different...
Instead of onclick set up the detach on mouse down then the append on mouse up
I'll try that in the morning.
So you thinking I'm not getting a successful detach before I do the append ?
Just seems strange that each page does load successfully.
I did notice that just before each page loads there is a flash of a white rectangle, and this rectangle is the same size as my pages get cropped to. ??
I'm thinking that the learning curve from Flash to Animate, for functionality like this, is going to be more difficult than I first thought.
I looked a little more into your files and I am not sure what is determining the size of the iframe...
but you could fix that by setting it in your codes....
just add this to iframe codes width="1204" height="637"
Also the next and back seem to be working ok on click.
Oh no.. the sample files were removed...
Can put it back, please?
My server is down right now am going to find a new server.
thanks, Schrene. Hope it will be up soon!
+1 I really need your files to learn Schrene hehe.
Thanks a lot in advance
Wouaw your just amazing Schrene !
Thanks a million time =P