View Full Version : Menu System - Adding GSB IFRAME nightmare
mikeymike
07-05-2007, 08:56 PM
Guys,
Firstly, yes this is my first post, I have spent pretty much the last available 30 hours of my life researching or trying to get an answer, so please don't flame me.
Secondly, please view the attached files, its a flash version of how I want my menu system to work. and the swi version for anyone who can fix the issue
Basically this is my live cv, I have 6 pages, each having seperate details and information which I need to populate from an external file. (preferably html)
the movie its self is made of 6 containers, each with an action to come to the top when clicked.
What i need is each container to have a GSB iframe as well, which is called to the top, or sunk again depending on what the user is looking at.
The GSB iframe is to fit the area between the white dashes on each card.
I believe i will then need to make 6 seperate HTML pages with the info for each iframe.
I have been trying to get this working for the last 30 hours as mentioned (I even got one to work, but it was always visible, i deleted the swi in anger doh!!), and this is the only way I can do the project (i want to use html pages so i dont have to keep editing the flash everytime i have an update of work etc)
Can some (or prey to god GSB) please give there comments.
Is what I am asking even possible, I know I might not make sense, but I have been trying this for the last 14 straight and need a break.
All comments are gratefully received.
Please don't flame me or tell me to search (i help ppl a hell of alot on other forums such as xbox-scene etc) I just want your thoughts and maybe even solutions
Cheers
Mikeymike
Medyman
07-06-2007, 02:14 AM
Hey Mikeymike...
What you want to do is certainly possible. I've done it many times. The "accordian" menu is one of the biggest requests that I get when making flash-based websites (along with the "carousel").
The way you're going about it might be a bit flawed. If I were you, I would look into XML. XML is by far the easiest way you can maintain a flash-based dynamic website.
If you search this forum (the flash section), I've posted many examples of XML. If you need more help, feel free to post back here.
mikeymike
07-06-2007, 12:00 PM
Cheers Medy,
I actually had an indepth conversation with GSB last night (I am in the uk, didn't finish speaking to him to about 6am!!)
He should me this little beauty he made:
http://www.gypsytrader.com/SWiSHmax/stageServices/scaleable/index.php?movie=.%2Fgregs.swf&debug=2#9258732486932566975 (http://www.gypsytrader.com/SWiSHmax/stageServices/scaleable/index.php?movie=.%2Fgregs.swf&debug=2#9258732486932566975)
The man has more coding talent in his little finger, than I do in my entire body...
Basically I am a designer, i usually hire a coder for web dev, but as this is a personal project, there is no budget hence no coder!!
I have tried looking for xml info, and it seems it could be what I need, I just can't find an idiot proof sample.
Have you looked at the menu system, basically when you click a card I want the dynamic content loading into it.
Is it possible to put the xml scroller inside a container (as I have a container for each card, with a script that brings it to the top when click, so I would want the content for the corresponding page bringing to the top as well)
Cheers in advance I really need this fixing asap, its driving me insane!!
mikeymike
Medyman
07-06-2007, 02:36 PM
It's possible to all of that with XML.
Lee Brimelow has some good tutorials at gotoandlearn.com/download.php.
You'll have to create a new XML object for each of your containers. Then, add a scroler to the container MC.
OR
You could just have one container and have the content switch out when you click for the next section.
mikeymike
07-11-2007, 12:22 PM
Medyman,
Cheers for the reply, only just back from camping (fell in a bloody lake, anyone want a wet n70???)
Anyway, I have spent the last hour trying to find a 'simple' example of xml to swishmax. I don't require a scoller on the page as the information is made to fit the box (card), if you could do me a favour and point me to an example which is basically a text box that pulls from an xml file, i would greatly appreciate it, as I have today and today only to get the site finished...
Right I am going to put cream on my face (tried lighting a BBQ rather drunkenly with liquid meths!!))
Cheers Medy and anyone who can help!!
mikeymike
07-11-2007, 08:31 PM
Right... i guessed I couldn't ask for help till I tried it myself...
7 hours and i came up with this...
mikeymikes shocking attempt @ xml into flash (http://files-upload.com/362454/mysite.zip.html)
Right I managed to get the xml file into flash and to display the right xml file when the container is clicked. (I used an xml flash menu link tut can't remember who made it, but thanks!!)
basically I need my xml file to contain 3 things (tags)...
Standard text (so I can type information about my boring self)
Pictures (No bigger than 200 x 200)
Hyperlinks (urm yeah hyperrrrrr links)
Now the example I use, already includes hyperlinks (again thanks to the tut!!) but I can't seem to add any plain non linked text, and as for pictures, I am stuffed!!
I know the XML file has to define what is a picture etc and that the script in Swishmax has to determine what is a picture from the tags in the XML file, but I can't code...
If anyone (MEDYMAN PRETTY PLEASE!!) can look at the swi files and the two xml files attached, maybe setup one xml file to include no link text and maybe a picture, I can complete the site...
And... I will write an idiot proof guide to xml with pictures/links/text (i am a document writer for trade)...
I haven't found an xml to flash that is specific for text, hyperlinks and pictures thats all...
Cheers
Mikey (I am going to design the site completely from html if i don't get an answer in 24 hours lol!!!) Mike
Medyman
07-11-2007, 08:53 PM
Well, I've helped a lot of people with XML-related issues. If you did a search, I'm sure you could find some useful materials.
In any case, I've put together this quick little demo.
The example is here (http://www.demos.designsbyvishal.com/dynamicdrive/xml.html).
The .xml file is here (http://www.demos.designsbyvishal.com/dynamicdrive/sample.xml).
The .fla is here (http://www.demos.designsbyvishal.com/dynamicdrive/xml.fla).
In the example, the image and the text in the upper right are brought in via XML.
I didn't get much time to comment out the .fla. If you (or anyone else viewing this in the future) have any questions, please feel free to post back.
Medyman
07-11-2007, 09:04 PM
Hey...just saw your previous post. I didn't notice that before I posted the above.
Have a look and let me know if it helps you at all.
If not, I'll have a look at your files and see if I can help. I don't use swishmax though...not sure if i can open then in flash 8 or not but i'll try.
mikeymike
07-11-2007, 09:08 PM
Hi Medyman,
Cheers for posting back...
I have search countless times, and maybe i am being a fool, but can't find anything thats says 'how to setup and use xml with swishmax' and nothing on 'pictures, text and hyperlinks via xml within swishmax'
Do you use swishmax medyman??
Is there any chance you could look at my .swi
I presume what ever details i use in my script in swish, the tags have to relate to the XML file, thats where I am getting stuck!
Cheers
Mikeymike
mikeymike
07-11-2007, 09:09 PM
Medyman....
Damn we are out of sync, if you could try with and edit myfiles, I have a shiny gold star for you!!
I would really appreciate it, as my site is now behind schedule!
Cheers
Medyman
07-11-2007, 09:19 PM
As I suspected, I can't open the .swi.
But, I'm downloading the free trial of swishmax and see if i can make any sense of it.
It seems like there might be some syntax differences between swishmax and AS2.0. Not sure...
I'll post back if i can figure it out.
mikeymike
07-11-2007, 09:27 PM
Medyman,
FCUKING STAR!!!! right, basically the swi file I have attached allows me to include hyperlinks.
I have no idea how to include plain text or pictures, the swi & the xml will needed editing for this!!
I am so excited!!
Medyman
07-11-2007, 09:54 PM
Ok, so I looked at it.
It's really the same as flash.
Take a look at the examples I posted. The technicque is the exact same.
mikeymike
07-11-2007, 09:58 PM
Cheers Medyman,
The only problem is I can't open the .fla files as I don't have Flash!!
Can you post the action script??
Sorry if it seems I am being lazy, I just can't code!
Medyman
07-11-2007, 10:08 PM
Oh, sorry!
Sure...
// XML Object
var xml:XML = new XML()
xml.ignoreWhite = true;
xml.onLoad = function(success) {
if (success) {
parent = this.firstChild
loadContent();
}
else {
textBox.text = "ERROR LOADING XML"
}
}
xml.load("sample.xml")
function loadContent() {
for (i=0;i<8;i++) {
var tmpClip:MovieClip = eval ("btn" + i)
tmpClip.id = i
tmpClip.onRollOver = over;
tmpClip.onRollOut = out;
tmpClip.onRelease = function() {
var picPath = parent.childNodes[this.id].childNodes[0].childNodes[0]
var txt = parent.childNodes[this.id].childNodes[1].childNodes[0]
this._parent.holder.loadMovie(picPath);
this._parent.textBox.text = "YOU CLICKED ON " + txt
}
}
}
To make this work, you'll need 2 things:
1) A textbox with an instance name of "textBox"
2) 8 buttons each labelled as "btn0" through "btn7"
If you want the same layout for the text, the script above will get rid of the need for you to have seperate containers for each of your pages.
If you have seperate layouts, then you might want to create a seperate xml object in each container. If you do this, get rid of the for loop.
Post back with any issues. :)
mikeymike
07-11-2007, 10:53 PM
Right,
I tried, and I seem to have gone a step backwards....
I have attached my swi files, xml files etc
but here is the code i am using...
By the way I am going with the seperate xml object in each container route...
onLoad () {
xml = new XML();
xml.ignoreWhite = true;
xml.onLoad = function(success) {
if (success) {
parent = this.firstChild;
loadContent();
}
else {
textBox.text = "ERROR LOADING XML"
}
};
xml.load("sample.xml");
}
function loadContent() {
}
onFrame (1) {
stop();
}
onFrame (5) {
stop();
}
Ok the movie is setup as follows:
Scene1 - Scene
container1 - Sprite
| | | | | | | | | | |
v v v v v v v v v v
container6 - Sprite
In each of the containers, there is an image and further sprite called XML
That is where I have placed the above code (is this correct)
Inside the XML sprite is a textbox called = textBox
I believe I have done everything write...
Feel free to edit my swi file (hint hint!!)
Medyman, by the way, cheers for all the help, I know it must get annoying going over the same stuff, I appreciate it!!:) :D :) :cool:
FILES - Second god awful attempt! (http://files-upload.com/362744/mysite2.zip.html)
Medyman
07-12-2007, 02:11 AM
Hey...
Again, I'm not too familiar with swishmax and your files keep giving me a whole lot of errors which I have no idea how to fix.
Is there a reason that you want to use swishmax? If you have a day or two to spare, I suggest switching to Flash 8. I can think of two very good tutorials on how to do what you're doing right off the top of my head.
In referring to your problem...
1) You don't have anything inside the loadContent function.
You'll want to replase the loadContent() {} with:
function loadContent() {
var txt = THE XML PATH GOES HERE, DEPENDS ON YOUR XML
textBox.text = txt
}
That will bring in your text
for images, add in the following
function loadContent() {
var txt = THE XML PATH GOES HERE, DEPENDS ON YOUR XML
textBox.text = txt
var picPath = THE XML PATH GOES HERE
holder.loadMovie(picPath)
}
I don't know how to load in images with swishmax...but that is how you would do it in flash.
}
mikeymike
07-12-2007, 03:23 AM
Medyman,
Cheers for looking at the files, yeah the files always error on mine too, its mainly because it can't find the .xml in SwishMax, plays fine when compliled.
Can you send me the two tuts for Flash 8, I have just installed it, if off the top of your head you can find one for bringing containers to the front when the user clicks them I would appreciate it!
Cheers and thanks again for the help...
I will let you know on the progress, its 4:23 am here and I am still rocking!!
Medyman
07-12-2007, 03:35 AM
One is a user-submitted tutorial by Erik Hallendar at gotoAndLearn (a great flash resource, if you're looking).
http://www.gotoandlearn.com/forum/viewtopic.php?t=10604
That should be a good start. I'll post the other one as soon as I can track the URL.
The AS is identical to what you've used in the swishmax though, so you shouldn't have a problem.
mikeymike
07-12-2007, 06:27 PM
Medyman,
Right I have started learning Flash 8 (damn Swishmax is so so more user friendly)
thanks for the tut, the example the tut is based on http://www.temel.com/site_pharma/ is just what i want, the tut gives no help with adding the xml etc.
Here is another one i love http://www.jumpeyecomponents.com/Flash-Components/User-Interface/Accordion-Panel-V3-40/
The orange one!!!
Do you know of any tuts to do either of the above??
Cheers
Mike
Medyman
07-12-2007, 06:33 PM
There is a video tutorial at gotoAndLearn by Lee Brimelow at www.gotoandlearn.com/download.php.
You want the "The Tree Component" tutorial. He even shows you how to add XML to it.
Also take a look at the Accordian Video App tutorial.
As for adding XML, I showed the technique in my demo. You just want to create 5 (i believe you have 5 pages) different xml objects and load 5 different xml files (if you choose to go that route).
You can alternately, just create one xml object and just access different nodes with your coding.
mikeymike
07-13-2007, 05:16 PM
Hi Medyman,
Just thought I would fire a few words as to where I am up to!!
I went COMPLETE THE OTHER WAY!!!
I have decided on using javascript (well prototype/moofx library)
I found an excellent example of accordion menus here moofx accordion menus (http://www.nyokiglitter.com/blog/fxaccordion)
the beauty of this system (apart from being so damn small in size) is its easy to edit, I have a fairly good knowledge of html (the java always stays the same, so knowledge required is minimal) and in the last few hours have customized it to use seperate colours for each tab and include an iframe on each of the divs to include my external html files...
Thank you for all the help medyman, when I have something more complete I will post and let you look... i am thinking I may need a flash mp3 player though ;)
For now its on to lightbox! (and the benefits that my site will now get picked up by google!!)
Again Medyman & GSB for all the help, its been useful understanding the principles to get this working in flash, but for me, moofx is so much easier....
PEACE!
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.