Part of the EllisLab Network
   
 
Help with Adobe Flash and CodeIgniter URL
Posted: 29 July 2009 11:13 PM   [ Ignore ]  
Summer Student
Total Posts:  3
Joined  07-29-2009

Hi,

I’m new at developing with PHP and CodeIgniter and I have a question about using Adobe Flash and the CodeIgniter URL.

I’m using a controller to make an output of the database into XML format

function client()
    
{
        $data[
'page'"client";
        
        
$this->db->where('client_id'$this->uri->segment(3));
        
$query $this->db->get('portfolio');
        
        
$xml_data "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n";
        
$xml_data .= "<client>\n";
        
        if (
$query->num_rows() > 0)
        
{
            
foreach($query->result() as $row):
                
$this->db->where('gallery_id'$row->id);
                
$query_image $this->db->get('image');
            
                
$xml_data .= "\t<portfolio>\n";
                
$xml_data .= "\t\t<project id=" '"' $row->type_id '"' .">" $row->type ."<project>\n";
                
$xml_data .= "\t\t<client id=" '"' $row->client_id '"' .">" $row->client ."<client>\n";
                
$xml_data .= "\t\t<name>" $row->name ."<name>\n";
                
$xml_data .= "\t\t<gallery>\n";
                
                if (
$query_image->num_rows() > 0)
                
{
                    
foreach($query_image->result() as $row_image):
                        
$xml_data .= "\t\t\t<image path=" '"' $row_image->path '"' ">" $row_image->name "</image>\n";
                    endforeach;
                
}
                
                
                $xml_data 
.= "\t\t</gallery>\n";
                
$xml_data .= "\t</portfolio>\n";
            endforeach;
        
}
        
        $xml_data 
.= "</client>";
        
        
$data['xml_data'$xml_data;
        
        
$this->load->view('portfolio'$data);
    

With Actionscript I load the data into Flash

xmlloader = new URLLoader();
xmlloader.load(new URLRequest("http://www.mysite.com/index.php/portfolio/client/1")); 

My question is: will the CodeIgniter URL work in Flash, or am I better off using the controller to write an XML file??

Thanks.

Profile
 
 
Posted: 30 July 2009 09:06 AM   [ Ignore ]   [ # 1 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  119
Joined  09-07-2008

I have used URLs like the one in your example in my swfs and they worked for me.

 Signature 

Condos in Saint Louis
Branson Getaway Trips

Profile
 
 
Posted: 30 July 2009 09:33 PM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  3
Joined  07-29-2009

Thanks!

Profile
 
 
Posted: 08 March 2011 11:42 PM   [ Ignore ]   [ # 3 ]  
Grad Student
Avatar
Rank
Total Posts:  58
Joined  12-22-2010

[deleted by chazy]

Profile