Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22

Thread: Menu System - Adding GSB IFRAME nightmare

  1. #11
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    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.

  2. #12
    Join Date
    Jul 2007
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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!!

  3. #13
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    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.

  4. #14
    Join Date
    Jul 2007
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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!

  5. #15
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Oh, sorry!

    Sure...


    Code:
    // 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.

  6. #16
    Join Date
    Jul 2007
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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...

    Code:
    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!!

    FILES - Second god awful attempt!

  7. #17
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    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:

    Code:
    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

    Code:
    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.
    }

  8. #18
    Join Date
    Jul 2007
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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!!

  9. #19
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    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.

  10. #20
    Join Date
    Jul 2007
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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/Fla...n-Panel-V3-40/
    The orange one!!!

    Do you know of any tuts to do either of the above??

    Cheers

    Mike

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •