Actionscript + Javascript = Fail on imvu?
Goto page 1, 2  Next
 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IMVU Forum Index -> Homepage Building and Design
View previous topic :: View next topic  
Author Message
Aesica

Aesica's page


Joined: 30 Jun 2006
Posts: 5631
Location: USA - WA

PostPosted: Sat Jan 22, 2011 2:14 pm    Post subject: Actionscript + Javascript = Fail on imvu? Reply with quote

So like, I've been playing around with making homepage layouts entirely with flash, and I've run into a few snags:

1) Is there any way for me to have my swf file call javascript functions on imvu? The following code:
Code:
getURL("javascript:alert('the imvu javascript popups are not working properly from within flash. :(');");

Works just fine when tested within flash, or when the swf is accessed directly from my webspace, but when that same swf is used on my imvu homepage, it doesn't work at all.

Am I doing something wrong, or am I just out of luck because of imvu's security settings?

2) How do I go about getting the url to my current display pic? I mean yeah,
Code:
http://userimages-akm.imvu.com/catalog/includes/modules/phpbb2/images/avatars/1941988_4780685084d3a9816c24f3.png

Links to what I'm using right now, but if I change this picture in the future, that link will still lead to the same picture you see now.

I'd like the loadMovie() line in my swf to pull up the most current picture, without me having to manually edit the url in the code each time.

So yeah, do any of you know how to solve these issues? I realize it's a shot in the dark, since there doesn't seem to be many flash users here. Sad Still worth a shot!
_________________

Shop full of garbage | Flash Sticker Tutorial
Back to top
View user's profile Send private message  
Aesica

Aesica's page


Joined: 30 Jun 2006
Posts: 5631
Location: USA - WA

PostPosted: Tue Jan 25, 2011 3:45 am    Post subject: Reply with quote

Bump. Nobody knows anything about this? Does imvu have some sort of block in place to prevent flash files (swf) from calling javascript functions?
_________________

Shop full of garbage | Flash Sticker Tutorial
Back to top
View user's profile Send private message  
LadyKonstantine

LadyKonstantine's page


Joined: 22 Oct 2010
Posts: 422
Location: United Kingdom

PostPosted: Tue Jan 25, 2011 4:04 am    Post subject: Reply with quote

Well Hun What i do (and it works perfectly) is I put the Imvu Script in a Div with in a .js file and with the flash i use a import flash.external.ExternalInterface code to call on the .js And in the js file i have the code :
Code:

 function Gallery(){

var options = {
continuous: true,
counterType: "skip"
};

var img1 = {
    player:     'html',
    content:    '<center><div style="background-color: transparent; color:#FFFFFF; font-size:14px"><b>Welcome to my website! <br> To know me is to love me! Poet, Music Addict, <br> and IMVU video maker!! <br> Like my vids, want one made or want to <br> be featured in one, leave me a message!! <br></b></div> <br><br><br><br> <div><object width="200" height="200"><param name="movie" value="http://www.youtube.com/v/7IAJo7ebOgI?fs=1&amp;hl=en_GB"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/7IAJo7ebOgI?fs=1&amp;hl=en_GB" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="200" height="200"></embed></object></div> <br><br><br><br> <div><object width="200" height="200"><param name="movie" value="http://www.youtube.com/v/V92UIB7a1W0?fs=1&amp;hl=en_GB"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/V92UIB7a1W0?fs=1&amp;hl=en_GB" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="200" height="200"></embed></object></div></center>',
    height:        300,
    width:        452,
    options:    options
};



Shadowbox.open([img1]);


};


Now with the flash code it tells the button that is pressed to go and find 'Gallery' in the .js file like so : import flash.external.ExternalInterface;

FButton.onRelease = function() {
ExternalInterface.call("Gallery");
}

so the flash code is calling on the Gallery so it finds it in the js file and the code with in the js file pops up the correct page.

Its all about getting the flash to work with html and directing the codes proply.

Now this is what i think you are having trouble with your trying to use Imvu by its self . . . . Dont use a 2nd site and build all of it on there and then once you are done go to imvu and place your work from the site you was making it from In an Iframe then it works fine (assuming it works on the 1st site which u built it from)

what i use to open the content or open the imvu script:
Flash with import external code
1 js file to hold the page contents
1 js file to tell the internet how to open it (such as do i want it to fade into place etc and to control the content and to let it work with flash also conrtols some of my pop up functions so it pops up more stylish without a window or in a box etc)
1 css file to tell it the style and how to open, such as should the page content have a background etc this also work with the 2nd .js file to control the pop up box what style it should be poped up in.
and then the html in the main page to direct it all.

Hope this helps


Edit Edit - I forgot to Say in the Js file Gallery
were it says Content: 'blah blah blah code here blah',
That is were you would put your Imvu JavaScript code.



The get Url code you are using you need to have a script in your html telling it to Pop up then the flash reads it and pops it up in a content box just that a basic way of doing it to pop it up in more of style box and not a simple internet window you need to use Css, Js and Dhtml.


--You need the script on your webspace dont try to call it from the Imvu site--

I Also Display it all in 1 iframe on imvu.


Last edited by LadyKonstantine on Tue Jan 25, 2011 4:14 am; edited 1 time in total
Back to top
View user's profile Send private message  
LadyKonstantine

LadyKonstantine's page


Joined: 22 Oct 2010
Posts: 422
Location: United Kingdom

PostPosted: Tue Jan 25, 2011 4:08 am    Post subject: Reply with quote

As for the Picture what are you trying to do? Make it a Button? Or Call over pictures i Dont Quite understand the Picture thing.
Back to top
View user's profile Send private message  
Aesica

Aesica's page


Joined: 30 Jun 2006
Posts: 5631
Location: USA - WA

PostPosted: Tue Jan 25, 2011 1:30 pm    Post subject: Reply with quote

For the display picture, I'm trying to make it execute this when clicked:

Code:
javascript:IMVU.AvatarCard.showPopup(1941988);


If you copy/paste it directly into your address bar, it brings up my avatar card--both here and on my homepage. Unfortunately, it won't work when this same line is called within the swf.

This is the swf that is on my homepage. To test things out, I (temporarily) made the message button show a basic javascript alert popup. It works fine when clicked on my site, but does nothing on my imvu homepage, even though it's the exact same file attempting to bring up the exact same alert popup.

So I think it's safe to say imvu somehow prevents flash from interacting with javascript. Which is lame. Sad
_________________

Shop full of garbage | Flash Sticker Tutorial
Back to top
View user's profile Send private message  
LadyKonstantine

LadyKonstantine's page


Joined: 22 Oct 2010
Posts: 422
Location: United Kingdom

PostPosted: Tue Jan 25, 2011 2:38 pm    Post subject: Reply with quote

**Imvu Doesnt Prevent it You Just Dont have all The Coding that is Reqired to do it** read below.



i had that Problem Make sure the Iframe ID isnt the same as any id you are using on your webspace also put your swf in a html page and use the html to display the swf not the swf url its self.

See Hun What you are trying to do with the code you have now Is Call Somthing from your web space you havnt got the right files on your webspace to call it up see your site is missing a Few .js file Witch Imvu has and uses to pop up the avi info for example your web space doesnt have this code
Code:
if(!IMVU) IMVU = {};
if(!IMVU.AvatarCard) {
    IMVU.AvatarCard = {};

    IMVU.AvatarCard.cidsDirty = false;
    IMVU.AvatarCard.domReady = false;
    IMVU.AvatarCard.pingTimeoutId = 0;

    IMVU.AvatarCard.avatarPopup = new YAHOO.widget.Dialog('avatar-popup', {
        width:'480px'
        ,modal:true
        ,zIndex:5900
        ,draggable:false
        ,fixedcenter:true
        ,close:true
        ,visible:false
    });
    IMVU.AvatarCard.showPopup = function(cid) {
        // Note that this gets called through a wrapper on web_mypage.php, see
        // the bottom of that file for implementation.
        IMVU.badgeTooltip.hide();
        IMVU.AvatarCard.avatarPopup.hide();
        IMVU.loading.showPopup("Loading...");
        IMVU.AvatarCard.avatarPopup.render(document.body);
        IMVU.AvatarCard.avatarPopup.innerElement.style.display = "block";

        var showErrorDialog = function (errorHtml) {
            var errorDialog = new YAHOO.widget.SimpleDialog(
                "avatarWidgetErrorDialog",
                {
                    modal: true,
                    visible: false,
                    draggable: false,
                    width: "500px",
                    fixedcenter: true
                }
            );
            errorDialog.setHeader("Error");
            errorDialog.setBody(errorHtml);
            errorDialog.render(document.body);
            errorDialog.show();
        };
       
        var cb = {
            success: function(o) {
                var error = "", redirect_url = "";
               
                try {
                    var userInfo = JSON.parse(o.responseText);
                    if (userInfo.error) {
                        error = userInfo.error;
                    } else if (!userInfo.avname) {
                        error = "An unknown error occurred.";
                    }
                }
                catch(e) {
                    error = "An unknown error occurred.";
                }
               
                if (error == "") {
                    IMVU.AvatarCard.updateData(userInfo);
                } else {
                    IMVU.AvatarCard.avatarPopup.hide();
                    IMVU.loading.hidePopup();
                   
                    var errorHtml = "Sorry, we were unable to show you information on the avatar you requested.\n<br>" + error;
                    showErrorDialog(errorHtml);
                }
            },
            failure: function(o) {
                IMVU.AvatarCard.avatarPopup.hide();
                IMVU.loading.hidePopup();
               
                showErrorDialog("A network error has occurred.");
            }
        };
       
        YAHOO.util.Connect.setForm();
        YAHOO.util.Connect.asyncRequest('GET', '/api/avatarcard.php?cid='+cid, cb);
    }
    function _setLocation(country, state) {
        var source = YAHOO.util.Dom.getElementsByClassName('l10n-cntry-' + country);
        var target = YAHOO.util.Dom.get('avatar-popup-location');
        if (source && source[0]) {
            target.innerHTML = source[0].innerHTML + (state ? ' - ' + state : '');
        } else {
            target.innerHTML = '';
        }
    }
    function _setGender(gender) {
        var source = YAHOO.util.Dom.getElementsByClassName('l10n-gndr-' + gender);
        var target = YAHOO.util.Dom.get('avatar-popup-gender');
        if (source && source[0]) {
            target.innerHTML = source[0].innerHTML;
        } else {
            target.innerHTML = '';
        }
    }
    IMVU.AvatarCard.populateUserInfo = function (userInfo) {
        YAHOO.util.Dom.get('avatar-popup-name').innerHTML = userInfo.avname;
        YAHOO.util.Dom.get('avatar-popup-pic-link').href = userInfo.url;
        YAHOO.util.Dom.get('avatar-popup-pic').src = userInfo.avpic_url;
        YAHOO.util.Dom.get('avatar-popup-since').innerHTML = userInfo.registered;
       
        _setGender(userInfo.gender ? userInfo.gender.toLowerCase() : '');
        _setLocation(userInfo.country_code, userInfo.location_state);

        if(userInfo.age != 'NA') {
            YAHOO.util.Dom.get('avatar-popup-age').style.display = '';
            YAHOO.util.Dom.get('avatar-popup-age-years').innerHTML = userInfo.age;
        } else {
            YAHOO.util.Dom.get('avatar-popup-age').style.display = 'none';
        }
        YAHOO.util.Dom.get('avatar-popup-last-logged-on').innerHTML = userInfo.last_login;
        var apNode = YAHOO.util.Dom.get('avatar-popup-ap');
        if (apNode) {
            if(userInfo.show_ap) {
                apNode.style.display = '';
            } else {
                apNode.style.display = 'none';
            }
        }
        if(userInfo.show_ageverify) {
            YAHOO.util.Dom.get('avatar-popup-age-verify').style.display = '';
        } else {
            YAHOO.util.Dom.get('avatar-popup-age-verify').style.display = 'none';
        }
        if(userInfo.show_vip) {
            YAHOO.util.Dom.get('avatar-popup-vip').style.display = '';
        } else {
            YAHOO.util.Dom.get('avatar-popup-vip').style.display = 'none';
        }
        if(userInfo.show_staff) {
            YAHOO.util.Dom.get('avatar-popup-staff').style.display = 'block';
            YAHOO.util.Dom.addClass('avatar-popup-body', 'staff_watermark_blk');
        } else {
            YAHOO.util.Dom.get('avatar-popup-staff').style.display = 'none';
            YAHOO.util.Dom.removeClass('avatar-popup-body', 'staff_watermark_blk');
        }
        if(userInfo.is_creator) {
            YAHOO.util.Dom.get('my_shop').href = "http://tr.imvu.com/shop/web_search.php?manufacturers_id=" + userInfo.cid + "&r=acw";
            YAHOO.util.Dom.get('my_shop').style.display = 'block';
        }
        if(userInfo.show_badgecount) {
            YAHOO.util.Dom.get('avatar-popup-badge-count').style.display = '';
            YAHOO.util.Dom.get('avatar-popup-badge-number').innerHTML = userInfo.badge_count;
            YAHOO.util.Dom.get('avatar-popup-badge-count').className = 'badgecount-link sprite-holder level-'+userInfo.badge_level;
            YAHOO.util.Dom.get('avatar-popup-badge-count').title = userInfo.badge_count + ' badges';
            YAHOO.util.Dom.get('avatar-popup-redundant-badge-count').innerHTML = '('+userInfo.badge_count+')';
        } else {
            YAHOO.util.Dom.get('avatar-popup-badge-count').style.display = 'none';
        }
        YAHOO.util.Dom.get('avatar-popup-tagline').innerHTML = userInfo.tagline;
        if(userInfo.online) {
            if (userInfo.availability === 'Creating') {
                YAHOO.util.Dom.removeClass('avatar-popup-creating', 'hidden');
                YAHOO.util.Dom.get('avatar-popup-online').style.display = 'none';
                YAHOO.util.Dom.get('avatar-popup-invite').style.display = 'none';
                YAHOO.util.Dom.get('avatar-popup-offline').style.display = 'none';
            } else {
                YAHOO.util.Dom.get('avatar-popup-online').style.display = '';
                YAHOO.util.Dom.get('avatar-popup-invite').style.display = '';
                YAHOO.util.Dom.get('avatar-popup-invite').href = 'imvu:StartIM?avatar='+userInfo.avname+'&fromSite=1';
                YAHOO.util.Dom.addClass('avatar-popup-creating', 'hidden');
                YAHOO.util.Dom.get('avatar-popup-offline').style.display = 'none';
            }
        } else {
            YAHOO.util.Dom.get('avatar-popup-online').style.display = 'none';
            YAHOO.util.Dom.get('avatar-popup-invite').style.display = 'none';
            YAHOO.util.Dom.addClass('avatar-popup-creating', 'hidden');
            YAHOO.util.Dom.get('avatar-popup-offline').style.display = '';
        }
        YAHOO.util.Dom.get('avatar-popup-visit-homepage').href = userInfo.url;
        if(userInfo.is_friend) {
            YAHOO.util.Dom.get('avatar-popup-add-buddy').style.display = 'none';
            YAHOO.util.Dom.get('avatar-popup-remove-buddy').style.display = '';
        } else {
            YAHOO.util.Dom.get('avatar-popup-add-buddy').style.display = '';
            YAHOO.util.Dom.get('avatar-popup-remove-buddy').style.display = 'none';
        }
        YAHOO.util.Dom.get('avatar-popup-badges-owner').innerHTML = userInfo.avname;

        for(var badgeid in userInfo.badge_layout) {
            var info = userInfo.badge_layout[badgeid];
            IMVU.badgeTooltip.setDesc(badgeid, info.description);
        }
        YAHOO.util.Dom.get('avatar-popup-badges-list').innerHTML = userInfo.badge_area_html;

        for (var badgeid in userInfo.badge_layout) {
            YAHOO.util.Event.purgeElement(badgeid);
            YAHOO.util.Event.addListener(badgeid, 'click', bind(IMVU.badgeTooltip, IMVU.badgeTooltip.show, null, badgeid));
        }
    };
    IMVU.AvatarCard.updateData = function(userInfo) {
        var avname = userInfo.avname || avnameRequired;
        IMVU.AvatarCard.populateUserInfo(userInfo);
        IMVU.AvatarCard.avatarPopup.setHeader(avname);
        IMVU.AvatarCard.avatarPopup.render(document.body);
        IMVU.AvatarCard.avatarPopup.innerElement.style.display = "block";

        IMVU.AvatarCard.avatarPopup.center();
        IMVU.AvatarCard.avatarPopup.show();
        IMVU.loading.hidePopup();
        YAHOO.util.Event.purgeElement('avatar-popup-send-message');
        YAHOO.util.Event.addListener('avatar-popup-send-message', 'click', function(e) {
            YAHOO.util.Event.stopEvent(e);
            IMVU.AvatarCard.avatarPopup.hide();
            IMVU.messagePopupShow({force_recipient_id:userInfo.cid});
            return false;
        });
        YAHOO.util.Event.purgeElement('avatar-popup-ok');
        YAHOO.util.Event.addListener('avatar-popup-ok', 'click', function() {
            IMVU.AvatarCard.avatarPopup.hide();
            return false;
        });
        YAHOO.util.Event.purgeElement('avatar-popup-add-buddy');
        YAHOO.util.Event.addListener('avatar-popup-add-buddy', 'click', IMVU.AvatarCard.addBuddy, userInfo);
        YAHOO.util.Event.purgeElement('avatar-popup-remove-buddy');
        YAHOO.util.Event.addListener('avatar-popup-remove-buddy', 'click', IMVU.AvatarCard.removeBuddy, userInfo);
        YAHOO.util.Event.purgeElement('avatar-popup-block-user');
        YAHOO.util.Event.addListener('avatar-popup-block-user', 'click', IMVU.AvatarCard.blockUser, userInfo);
    }
    IMVU.AvatarCard.addBuddy = function(e, userInfo) {
        YAHOO.util.Event.stopEvent(e);
        IMVU.AvatarCard.avatarPopup.hide();
        IMVU.loading.showPopup("Working...");
        var cb = {
            success: function(o) {
                IMVU.loading.hidePopup();
                var result;
                try { result = JSON.parse(o.responseText);}
                catch(e) { return; }
                if ('error' in result) {
                    IMVU.okMessageBox.showPopup('Error', result.error);
                } else if ('status' in result) {
                    if (result.status == 0) {
                        IMVU.okMessageBox.showPopup('Friend Added', userInfo.avname+' is already your friend!');
                    } else {
                        IMVU.okMessageBox.showPopup('Friend Added', 'A friend request has been sent to '+userInfo.avname);
                    }
                }
            },
            failure: function(o) {
                IMVU.loading.hidePopup();
                IMVU.okMessageBox.showPopup('Error', 'There was an error communicating with the server.<br>  Please try again later.');
            }
        };
        YAHOO.util.Connect.asyncRequest('POST', '/api/service/buddies/buddy_requests_service.php', cb, 'otheruser='+userInfo.cid+'&command=accept&dont_want_list=1&sauce='+IMVU.sauce);
    }
    IMVU.AvatarCard.removeBuddy = function(e, userInfo) {
        YAHOO.util.Event.stopEvent(e);
        IMVU.AvatarCard.avatarPopup.hide();
        IMVU.loading.showPopup("Working...");
        var cb = {
            success: function(o) {
                IMVU.loading.hidePopup();
                var result;
                try { result = JSON.parse(o.responseText); }
                catch(e) { return; }
                if ('error' in result) {
                    IMVU.okMessageBox.showPopup('Error', result.error);
                } else {
                    IMVU.okMessageBox.showPopup('Friend Removed', userInfo.avname + ' has been removed from your friend list.');
                }
            },
            failure: function(o) {
                IMVU.loading.hidePopup();
                IMVU.okMessageBox.showPopup('Error', 'There was an error communicating with the server.<br>  Please try again later.');
            }
        };
        YAHOO.util.Connect.asyncRequest('POST', '/api/service/buddies/buddy_requests_service.php', cb, 'otheruser='+userInfo.cid+'&command=remove&dont_want_list=1&sauce='+IMVU.sauce);
    }
    IMVU.AvatarCard.blockUser = function(e, userInfo) {
        YAHOO.util.Event.stopEvent(e);
        IMVU.AvatarCard.avatarPopup.hide();
        IMVU.loading.showPopup("Working...");
        var cb = {
            success: function(o) {
                IMVU.loading.hidePopup();
                var result;
                try { result = JSON.parse(o.responseText); }
                catch(e) { return; }
                if ('error' in result) {
                    IMVU.okMessageBox.showPopup('Error', result.error);
                } else {
                    IMVU.okMessageBox.showPopup('User Blocked', userInfo.avname + ' will no longer be able to send you messages<br>or chat with you.<br><br>Go to your <a href="/catalog/web_blocked_list.php">Block List</a> to manage who you have blocked.');
                }
            },
            failure: function(o) {
                IMVU.loading.hidePopup();
                IMVU.okMessageBox.showPopup('Error', 'There was an error communicating with the server.<br>  Please try again later.');
            }
        };
        YAHOO.util.Connect.asyncRequest('POST', '/api/service/buddies/buddy_requests_service.php', cb, 'otheruser='+userInfo.cid+'&command=block&dont_want_list=1&sauce='+IMVU.sauce);
    }
    IMVU.AvatarCard.olcids = {};
    IMVU.AvatarCard.observeOnlineStatus = function(cid) {
        cid = parseInt(cid);
        IMVU.AvatarCard.olcids[cid] = 1;
        IMVU.AvatarCard.cidsDirty = true;
        if (IMVU.AvatarCard.domReady) {
            IMVU.AvatarCard.schedulePing(100);
        }
    }

    IMVU.AvatarCard.schedulePing = function(timeout) {
        if (IMVU.AvatarCard.pingTimeoutId != 0) {
            clearTimeout(IMVU.AvatarCard.pingTimeoutId);
        }
        timeout = timeout || 5*60*1000;
        IMVU.AvatarCard.pingTimeoutId = setTimeout("IMVU.AvatarCard.onlinePing()", timeout);
    }

    IMVU.AvatarCard.onlinePing = function() {
        var olstr='';
        IMVU.AvatarCard.cidsDirty = false;
        for(var cid in IMVU.AvatarCard.olcids) {
            if(olstr) olstr += ",";
            olstr += cid;
        }
        if (!olstr) return;

        var http_server = 'http://tr.imvu.com';
        if (-1 != window.location.href.indexOf('localhost.imvu.com') || -1 != window.location.href.indexOf('local-customer-sandbox.com')){
            http_server = 'http://localhost.imvu.com';
        }

        $.getJSON(http_server+'http://www.imvu.com/catalog/web_status_updater.php?ol=1&list='+olstr+'&callback=?', function(result){
            for(var cid in result) {
                var elts = YAHOO.util.Dom.getElementsByClassName('awonline-'+cid, 'div');
                if(result[cid]) {
                    YAHOO.util.Dom.addClass(elts, 'olstatus-available');
                } else {
                    YAHOO.util.Dom.removeClass(elts, 'olstatus-available');
                }
            }
        });
        IMVU.AvatarCard.pingTimeoutId = 0;
        IMVU.AvatarCard.schedulePing();
    }

    YAHOO.util.Event.onDOMReady(function() {
        IMVU.AvatarCard.domReady = true;
        if (IMVU.AvatarCard.cidsDirty) {
            IMVU.AvatarCard.schedulePing(100);
        }
    });
}



And that code is one code that controls the pop up if you want to pop it up your going to have to read all the coding and Download all the files imvu uses to make the content pop up.

Its Like Somone trying to run with one leg They have some of it to do it but are missing the rest so it wont work, you need the rest of the scripts from imvu its a little bit harder than you think it involes a little bit more than just one javascript and 1 flash code.
Back to top
View user's profile Send private message  
Aesica

Aesica's page


Joined: 30 Jun 2006
Posts: 5631
Location: USA - WA

PostPosted: Tue Jan 25, 2011 4:13 pm    Post subject: Reply with quote

Oh, the imvu javascript isn't the only thing failing. If you look on my homepage, below the whole UI/layout is a big "Click Me! ^^" that I put there to illustrate my problem.

If you click it, you'll notice that it probably doesn't do anything. However, if you go here (it's the flash object in the pink div) and click it, it'll show an alert. As I'm sure you know, alert() is a core function of javascript and doesn't require imvu's js files in order to work. As such, it should work anywhere.

Basically, it works on my site as you can see, but not on my imvu homepage.

THAT is what I'm trying to get to the bottom of. Wink
_________________

Shop full of garbage | Flash Sticker Tutorial
Back to top
View user's profile Send private message  
LadyKonstantine

LadyKonstantine's page


Joined: 22 Oct 2010
Posts: 422
Location: United Kingdom

PostPosted: Tue Jan 25, 2011 4:32 pm    Post subject: Reply with quote

What is the iFame code you are using Could you send it to me Please
Back to top
View user's profile Send private message  
Aesica

Aesica's page


Joined: 30 Jun 2006
Posts: 5631
Location: USA - WA

PostPosted: Tue Jan 25, 2011 5:38 pm    Post subject: Reply with quote

There is absolutely NO iframe code at all. It's all one big, angry div. Very Happy
_________________

Shop full of garbage | Flash Sticker Tutorial
Back to top
View user's profile Send private message  
LadyKonstantine

LadyKonstantine's page


Joined: 22 Oct 2010
Posts: 422
Location: United Kingdom

PostPosted: Tue Jan 25, 2011 6:00 pm    Post subject: Reply with quote

I Mean the Iframe code you are going to use to get your flash up with
Back to top
View user's profile Send private message  
Aesica

Aesica's page


Joined: 30 Jun 2006
Posts: 5631
Location: USA - WA

PostPosted: Wed Jan 26, 2011 2:30 am    Post subject: Reply with quote

Again, no iframe code at all. It's currently up, using this snippet:

Code:
<!-- user html start -->
Working on a new layout, so this is getting gutted.  Yup!
 
<div id="quasibackground">Hi  Under construction, so don't mind the mess.  Or do.  I don't care either way.
 
<!-- Flash embed here -->
<table class="aes_swfcontainer"><tr><td>
<object width="900" height="600">
<param name="movie" value="http://www.aesica.net/imvu/homepage/homepage-layout.swf" />
<param name="wmode" value="transparent" />
</object>
</td></tr></table>
 
</div>
 
<!---CSS dumping ground from here on--->
<link rel="stylesheet" type="text/css" href="http://www.aesica.net/imvu/css/aes-homepage.css" />
<!-- user html end -->

_________________

Shop full of garbage | Flash Sticker Tutorial
Back to top
View user's profile Send private message  
LadyKonstantine

LadyKonstantine's page


Joined: 22 Oct 2010
Posts: 422
Location: United Kingdom

PostPosted: Wed Jan 26, 2011 7:29 am    Post subject: Reply with quote

Then Use an iframe for the flash
Back to top
View user's profile Send private message  
LadyKonstantine

LadyKonstantine's page


Joined: 22 Oct 2010
Posts: 422
Location: United Kingdom

PostPosted: Wed Jan 26, 2011 8:08 am    Post subject: Reply with quote

Code:
<!-- user html start -->
<br><br>Working on a new layout,<br> so this is getting gutted.  Yup!<br><br>
 
<div id="quasibackground">Hi  Under construction, so don't mind the mess.  Or do.  I don't care either way.
 
<div>

<center>
<iframe src="http://www.aesica.net/imvu/homepage/homepage-layout.swf"  WIDTH=700 HEIGHT=800 scrolling=no frameBorder=no ></iframe>
</center>

 
</div>
 
<!---CSS dumping ground from here on--->
<link rel="stylesheet" type="text/css" href="http://www.aesica.net/imvu/css/aes-homepage.css" />
<!-- user html end -->


Change Size to what w.e also change your flash background color in macromedia w.e flash editing programe you are using and save and upload the new flash with its new background.

Thiss Code works and is able to pop up the javascript code
Back to top
View user's profile Send private message  
LadyKonstantine

LadyKonstantine's page


Joined: 22 Oct 2010
Posts: 422
Location: United Kingdom

PostPosted: Wed Jan 26, 2011 8:21 am    Post subject: Reply with quote

Another Way witch i would use is this :

Flash code for the button :

Code:
getURL("javascript:myImvu();");


Code on Html page:

Code:
<script language="javascript">
function myImvu() {
   alert("Message goes here.");
}
</script>


Then For the Hole Html i Would Have this :

Code:


<head>
<script language="javascript">
function myImvu() {
   alert("Message goes here.");
}
</script>
</head>

<div id="quasibackground">Hi  Under construction, so don't mind the mess.<br>  Or do.  I don't care either way.<br>
Working on a new layout,<br> so this is getting gutted.  Yup!<br>
 
<center><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="819" height="580" id="flash" align="middle">
            <param name="allowScriptAccess" value="sameDomain" />
            <param name="movie" value="http://www.aesica.net/imvu/homepage/homepage-layout.swf" />

            <param name="quality" value="high" />
            <param name="bgcolor" value="#000000" />
            <embed src="http://www.aesica.net/imvu/homepage/homepage-layout.swf" quality="high" bgcolor="#000000" width="819" height="580" name="flash" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
      </object></center>


 
</div>
 
<!---CSS dumping ground from here on--->
<link rel="stylesheet" type="text/css" href="http://www.aesica.net/imvu/css/aes-homepage.css" />
<!-- user html end -->


Now that Would Work Perfectly But the Iframes coding does the Trick aswel.
Back to top
View user's profile Send private message  
LadyKonstantine

LadyKonstantine's page


Joined: 22 Oct 2010
Posts: 422
Location: United Kingdom

PostPosted: Wed Jan 26, 2011 9:04 am    Post subject: Reply with quote

Infact i Wouldnt Even Use the Alert call From Javascript Because It Doesnt look Nice And i Wouldnt Have the Geturl that opens It in a new Tab in the Broswers Id keep all of that In a Pop up and Id Use Somthing like this : HERE Insted of the Alert and New Tab pages, because that looks more Stylish and A Person comming to your home page wouldnt have a Million tabs off it, they would just have one box that poped up each time thy clicked on somthing that isnt in the flash lol i duno everyone for their own i guess Hope all that helped you anyways.
Back to top
View user's profile Send private message  
Display posts from previous:   


Hide ads? Get VIP!
Post new topic   This topic is locked: you cannot edit posts or make replies.    IMVU Forum Index -> Homepage Building and Design All times are GMT - 8 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 FAQFAQ   UsergroupsUsergroups   RegisterRegister  ProfileProfile   Log in for private messagesLog in for private messages 

Search the forums:


Powered by phpBB